Table of Contents

Class AdditiveDefinitionBuilder

Namespace
S1API.Items.Additive
Assembly
S1API.dll

Builder for composing additive definitions at runtime. Use fluent methods to configure additive properties before calling Build().

public sealed class AdditiveDefinitionBuilder : StorableItemDefinitionBuilderBase<AdditiveDefinitionBuilder>
Inheritance
AdditiveDefinitionBuilder
Inherited Members
Extension Methods

Methods

Build()

Builds the item definition, registers it with the game's registry, and returns a wrapper.

public AdditiveDefinition Build()

Returns

AdditiveDefinition

A wrapper around the created additive definition.

CopyPropertiesFrom(StorableItemDefinition)

Copies all properties from a source definition to the current definition.

protected override void CopyPropertiesFrom(StorableItemDefinition source)

Parameters

source StorableItemDefinition

The source definition to copy from.

CreateWrapper(StorableItemDefinition)

Creates a wrapper around the given item definition. Subclasses can override this to return a more specific wrapper type.

protected override StorableItemDefinition CreateWrapper(StorableItemDefinition definition)

Parameters

definition StorableItemDefinition

The item definition to wrap.

Returns

StorableItemDefinition

A wrapper around the given item definition.

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