Table of Contents

Class BuildableItemDefinitionBuilder

Namespace
S1API.Items.Buildable
Assembly
S1API.dll

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

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.

WithBuildSound(BuildSoundType)

Sets the sound type played when this item is built.

public BuildableItemDefinitionBuilder WithBuildSound(BuildSoundType soundType)

Parameters

soundType BuildSoundType

The build sound type.

Returns

BuildableItemDefinitionBuilder

The builder instance for fluent chaining.