Class AdditiveDefinitionBuilder
Builder for composing additive definitions at runtime. Use fluent methods to configure additive properties before calling Build().
[Obsolete("Use S1API.Items.Additive.AdditiveDefinitionBuilder instead")]
public sealed class AdditiveDefinitionBuilder
- Inheritance
-
AdditiveDefinitionBuilder
- Inherited Members
- Extension Methods
Methods
Build()
Builds the additive definition, registers it with the game's registry, and returns a wrapper.
public AdditiveDefinition Build()
Returns
WithBasicInfo(string, string, string, ItemCategory)
Sets the basic information for the additive.
public AdditiveDefinitionBuilder WithBasicInfo(string id, string name, string description, ItemCategory category)
Parameters
idstringnamestringdescriptionstringcategoryItemCategory
Returns
WithDemoAvailability(bool)
Sets whether this additive is available in the demo version of the game.
public AdditiveDefinitionBuilder WithDemoAvailability(bool available)
Parameters
availablebool
Returns
WithDisplayMaterial(Material)
Sets the display material for this additive.
public AdditiveDefinitionBuilder WithDisplayMaterial(Material material)
Parameters
materialMaterial
Returns
WithEffects(float, float, float)
Sets the effect values for this additive.
public AdditiveDefinitionBuilder WithEffects(float yieldMultiplier, float instantGrowth, float qualityChange)
Parameters
Returns
WithIcon(Sprite)
Sets the icon sprite displayed for this additive in UI.
public AdditiveDefinitionBuilder WithIcon(Sprite icon)
Parameters
iconSprite
Returns
WithLegalStatus(LegalStatus)
Sets the legal status of the additive.
public AdditiveDefinitionBuilder WithLegalStatus(LegalStatus status)
Parameters
statusLegalStatus
Returns
WithPricing(float, float)
Configures the economic properties of the additive.
public AdditiveDefinitionBuilder WithPricing(float basePurchasePrice, float resellMultiplier = 0.5)
Parameters
Returns
WithStackLimit(int)
Sets the maximum stack size for this additive.
public AdditiveDefinitionBuilder WithStackLimit(int limit)
Parameters
limitint