Class RandomInventoryItemsBuilder
Builder for configuring startup items and random cash for NPCs. Public surface uses strings/primitives only. All configurations are optional.
public sealed class RandomInventoryItemsBuilder
- Inheritance
-
RandomInventoryItemsBuilder
- Inherited Members
- Extension Methods
Methods
WithClearInventoryEachNight(bool)
Configures whether the inventory should be cleared each night. Default: true if only random items are configured, false if startup items are configured (to preserve them).
public RandomInventoryItemsBuilder WithClearInventoryEachNight(bool clearEachNight)
Parameters
clearEachNightboolIf true, inventory is cleared on sleep. If false, items persist across sleep cycles.
Returns
WithRandomCash(int, int)
Enables and configures random cash generation.
public RandomInventoryItemsBuilder WithRandomCash(int min, int max)
Parameters
Returns
WithStartupItem(string)
Adds a single startup item that will be present in the NPC's inventory when spawned.
public RandomInventoryItemsBuilder WithStartupItem(string itemId)
Parameters
itemIdstringThe ID of the item to add.
Returns
WithStartupItems(params string[])
Adds multiple startup items that will be present in the NPC's inventory when spawned.
public RandomInventoryItemsBuilder WithStartupItems(params string[] itemIds)
Parameters
itemIdsstring[]Array of item IDs to add.