Class BuildableItemDefinitionBuilder
Builder for composing buildable item definitions at runtime. Use fluent methods to configure buildable item properties before calling Build().
public class BuildableItemDefinitionBuilder : StorableItemDefinitionBuilderBase<BuildableItemDefinitionBuilder>
- Inheritance
-
BuildableItemDefinitionBuilder
- Inherited Members
- Extension Methods
Methods
Build()
Builds the item definition, registers it with the game's registry, and returns a wrapper.
public BuildableItemDefinition Build()
Returns
- BuildableItemDefinition
A wrapper around the created buildable item 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.
WithBuildSound(BuildSoundType)
Sets the sound type played when this item is built.
public BuildableItemDefinitionBuilder WithBuildSound(BuildSoundType soundType)
Parameters
soundTypeBuildSoundTypeThe build sound type.
Returns
- BuildableItemDefinitionBuilder
The builder instance for fluent chaining.