Class AdditiveDefinitionBuilder
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
sourceStorableItemDefinitionThe 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
definitionStorableItemDefinitionThe 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
materialMaterial
Returns
WithEffects(float, float, float)
Sets the effect values for this additive.
public AdditiveDefinitionBuilder WithEffects(float yieldMultiplier, float instantGrowth, float qualityChange)