Class ClothingItemDefinitionBuilder
Builder for composing clothing item definitions at runtime. Use fluent methods to configure clothing properties before calling Build().
[Obsolete("Use S1API.Items.Clothing.ClothingItemDefinitionBuilder instead")]
public sealed class ClothingItemDefinitionBuilder
- Inheritance
-
ClothingItemDefinitionBuilder
- Inherited Members
- Extension Methods
Methods
Build()
Builds the clothing item definition, registers it with the game's registry, and returns a wrapper.
public ClothingItemDefinition Build()
Returns
- ClothingItemDefinition
A wrapper around the created clothing item definition.
WithApplicationType(ClothingApplicationType)
Sets how this clothing item is applied to the avatar.
public ClothingItemDefinitionBuilder WithApplicationType(ClothingApplicationType applicationType)
Parameters
applicationTypeClothingApplicationTypeThe application type.
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.
WithBasicInfo(string, string, string)
Sets the basic information for the clothing item.
public ClothingItemDefinitionBuilder WithBasicInfo(string id, string name, string description)
Parameters
idstringUnique identifier for the item (e.g., "my_custom_hat").
namestringDisplay name shown in UI.
descriptionstringItem description shown in tooltips.
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.
WithBlockedSlots(params ClothingSlot[])
Sets the list of clothing slots this item blocks when equipped.
public ClothingItemDefinitionBuilder WithBlockedSlots(params ClothingSlot[] slots)
Parameters
slotsClothingSlot[]Array of slots to block.
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.
WithClothingAsset(string)
Sets the asset path to the clothing prefab or layer.
public ClothingItemDefinitionBuilder WithClothingAsset(string assetPath)
Parameters
assetPathstringResources path to the clothing asset.
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.
WithColorable(bool)
Sets whether this clothing item can be colored.
public ClothingItemDefinitionBuilder WithColorable(bool colorable)
Parameters
colorableboolTrue if colorable, false otherwise.
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.
WithDefaultColor(ClothingColor)
Sets the default color for this clothing item.
public ClothingItemDefinitionBuilder WithDefaultColor(ClothingColor color)
Parameters
colorClothingColorThe default color.
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.
WithIcon(Sprite)
Sets the icon sprite displayed for this item in UI.
public ClothingItemDefinitionBuilder WithIcon(Sprite icon)
Parameters
iconSpriteThe sprite to use as the item icon.
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.
WithPricing(float, float)
Configures the economic properties of the item.
public ClothingItemDefinitionBuilder WithPricing(float basePurchasePrice, float resellMultiplier = 0.5)
Parameters
basePurchasePricefloatBase price when buying from shops.
resellMultiplierfloatFraction of purchase price recovered when selling (0.0 to 1.0).
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.
WithSlot(ClothingSlot)
Sets the clothing slot this item occupies.
public ClothingItemDefinitionBuilder WithSlot(ClothingSlot slot)
Parameters
slotClothingSlotThe clothing slot.
Returns
- ClothingItemDefinitionBuilder
The builder instance for fluent chaining.