Table of Contents

Class AdditiveDefinitionBuilder

Namespace
S1API.Items
Assembly
S1API.dll

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

AdditiveDefinition

WithBasicInfo(string, string, string, ItemCategory)

Sets the basic information for the additive.

public AdditiveDefinitionBuilder WithBasicInfo(string id, string name, string description, ItemCategory category)

Parameters

id string
name string
description string
category ItemCategory

Returns

AdditiveDefinitionBuilder

WithDemoAvailability(bool)

Sets whether this additive is available in the demo version of the game.

public AdditiveDefinitionBuilder WithDemoAvailability(bool available)

Parameters

available bool

Returns

AdditiveDefinitionBuilder

WithDisplayMaterial(Material)

Sets the display material for this additive.

public AdditiveDefinitionBuilder WithDisplayMaterial(Material material)

Parameters

material Material

Returns

AdditiveDefinitionBuilder

WithEffects(float, float, float)

Sets the effect values for this additive.

public AdditiveDefinitionBuilder WithEffects(float yieldMultiplier, float instantGrowth, float qualityChange)

Parameters

yieldMultiplier float
instantGrowth float
qualityChange float

Returns

AdditiveDefinitionBuilder

WithIcon(Sprite)

Sets the icon sprite displayed for this additive in UI.

public AdditiveDefinitionBuilder WithIcon(Sprite icon)

Parameters

icon Sprite

Returns

AdditiveDefinitionBuilder

WithLegalStatus(LegalStatus)

Sets the legal status of the additive.

public AdditiveDefinitionBuilder WithLegalStatus(LegalStatus status)

Parameters

status LegalStatus

Returns

AdditiveDefinitionBuilder

WithPricing(float, float)

Configures the economic properties of the additive.

public AdditiveDefinitionBuilder WithPricing(float basePurchasePrice, float resellMultiplier = 0.5)

Parameters

basePurchasePrice float
resellMultiplier float

Returns

AdditiveDefinitionBuilder

WithStackLimit(int)

Sets the maximum stack size for this additive.

public AdditiveDefinitionBuilder WithStackLimit(int limit)

Parameters

limit int

Returns

AdditiveDefinitionBuilder