PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
OpenItem Class Reference

Static Private Member Functions

static void OpenAndSwitch (ItemBase item_tool, ItemBase item_target, PlayerBase player, float specialty_weight=0)
 WIll open the 'item_target' by spawning a new entity and transferring item variables to the new one.
 
static void SwitchItems (EntityAI old_item, PlayerBase player, float spill_modificator, float specialty_weight)
 Will switch the 'item' for a new game entity, the new entity's classname will be formed by adding the 'suffix' to the classname of the old 'item'.
 

Member Function Documentation

◆ OpenAndSwitch()

static void OpenAndSwitch ( ItemBase  item_tool,
ItemBase  item_target,
PlayerBase  player,
float  specialty_weight = 0 
)
inlinestaticprivate

WIll open the 'item_target' by spawning a new entity and transferring item variables to the new one.

References Error(), Debug::LogError(), Math::RandomIntInclusive(), and SwitchItems().

Referenced by RecipeBase::Do().

◆ SwitchItems()

static void SwitchItems ( EntityAI  old_item,
PlayerBase  player,
float  spill_modificator,
float  specialty_weight 
)
inlinestaticprivate

Will switch the 'item' for a new game entity, the new entity's classname will be formed by adding the 'suffix' to the classname of the old 'item'.

Referenced by OpenAndSwitch().


The documentation for this class was generated from the following file: