Table of Contents

Class CustomProductSaveDescriptor

Namespace
S1API.Products
Assembly
S1API.dll

Immutable scalar data used to recreate a generic custom product while loading a save.

public sealed class CustomProductSaveDescriptor
Inheritance
CustomProductSaveDescriptor
Inherited Members
Extension Methods

Remarks

This descriptor deliberately contains no Unity objects, asset references, delegates, or process-local references. A provider may use ProviderData for its own bounded scalar configuration. It must recreate assets and callbacks from local mod resources.

Constructors

CustomProductSaveDescriptor(int, string, string, string, string, float, string, string?, int, string)

Initializes a descriptor supplied to a registered content provider.

public CustomProductSaveDescriptor(int formatVersion, string productId, string ownerId, string productName, string description, float initialPrice, string productKindId, string? providerId, int providerVersion, string providerData)

Parameters

formatVersion int
productId string
ownerId string
productName string
description string
initialPrice float
productKindId string
providerId string
providerVersion int
providerData string

Properties

Description

Gets the saved description.

public string Description { get; }

Property Value

string

FormatVersion

Gets the S1API descriptor format version.

public int FormatVersion { get; }

Property Value

int

InitialPrice

Gets the saved initial price.

public float InitialPrice { get; }

Property Value

float

OwnerId

Gets the product owner's stable ID.

public string OwnerId { get; }

Property Value

string

ProductId

Gets the stable custom product ID.

public string ProductId { get; }

Property Value

string

ProductKindId

Gets the saved logical product-kind ID.

public string ProductKindId { get; }

Property Value

string

ProductName

Gets the saved display name.

public string ProductName { get; }

Property Value

string

ProviderData

Gets the provider-owned scalar payload.

public string ProviderData { get; }

Property Value

string

ProviderId

Gets the optional content-provider ID.

public string? ProviderId { get; }

Property Value

string

ProviderVersion

Gets the provider-specific descriptor version.

public int ProviderVersion { get; }

Property Value

int