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

Static Private Member Functions

static bool LoadData ()
 
static bool IsInitialized ()
 
static PlayerSpawnPreset GetRandomCharacterPreset ()
 
static bool ProcessEquipmentData (PlayerBase player, PlayerSpawnPreset data)
 equips character with the chosen preset
 
static private void ProcessSlotsEquipment (PlayerBase player, PlayerSpawnPreset data)
 iterates over each object and spawns alternatives
 
static private bool SelectAndSpawnSlotEquipment (PlayerBase player, PlayerSpawnPresetSlotData slotData)
 selects weighted slot equipment variant
 
static private void ProcessCargoEquipment (PlayerBase player, PlayerSpawnPreset data)
 chooses one object from the array
 
static private bool SelectAndSpawnCargoSet (PlayerBase player, PlayerSpawnPreset data)
 
static private bool SpawnDiscreteCargoItemSet (PlayerBase player, PlayerSpawnPresetDiscreteCargoSetData csd)
 
static private bool SpawnDiscreteSlotItemSet (PlayerBase player, PlayerSpawnPresetDiscreteItemSetSlotData dis, int slotID)
 
static private bool SpawnComplexChildrenItems (EntityAI parent, notnull PlayerSpawnPresetItemSetBase data)
 could spawn other items recursively. Parent item is guaranteed here.
 
static private bool SpawnSimpleChildrenItems (EntityAI parent, PlayerSpawnPresetItemSetBase data)
 
static private void HandleNewItem (notnull ItemBase item, PlayerSpawnPresetItemSetBase data)
 
static private EntityAI CreateChildItem (EntityAI parent, string type)
 
static private void ApplyAttributes (ItemBase item, PlayerSpawnAttributesData attributes)
 
static private bool IsWeaponAndMagazineType (EntityAI parent, string type)
 Used for exceptions in the system.
 

Static Private Attributes

static private bool m_Initialized
 
static ref PlayerSpawnJsonData m_Data = new PlayerSpawnJsonData()
 

Member Function Documentation

◆ ApplyAttributes()

static private void ApplyAttributes ( ItemBase  item,
PlayerSpawnAttributesData  attributes 
)
inlinestaticprivate

◆ CreateChildItem()

static private EntityAI CreateChildItem ( EntityAI  parent,
string  type 
)
inlinestaticprivate

◆ GetRandomCharacterPreset()

static PlayerSpawnPreset GetRandomCharacterPreset ( )
inlinestaticprivate

◆ HandleNewItem()

◆ IsInitialized()

static bool IsInitialized ( )
inlinestaticprivate

References m_Initialized.

Referenced by MissionBase::OnClientNewEvent().

◆ IsWeaponAndMagazineType()

static private bool IsWeaponAndMagazineType ( EntityAI  parent,
string  type 
)
inlinestaticprivate

Used for exceptions in the system.

References CFG_MAGAZINESPATH, and GetGame().

Referenced by SpawnComplexChildrenItems(), and SpawnSimpleChildrenItems().

◆ LoadData()

static bool LoadData ( )
inlinestaticprivate

◆ ProcessCargoEquipment()

static private void ProcessCargoEquipment ( PlayerBase  player,
PlayerSpawnPreset  data 
)
inlinestaticprivate

◆ ProcessEquipmentData()

static bool ProcessEquipmentData ( PlayerBase  player,
PlayerSpawnPreset  data 
)
inlinestaticprivate

equips character with the chosen preset

References PlayerSpawnPreset::IsValid(), ProcessCargoEquipment(), and ProcessSlotsEquipment().

Referenced by MissionBase::OnClientNewEvent().

◆ ProcessSlotsEquipment()

static private void ProcessSlotsEquipment ( PlayerBase  player,
PlayerSpawnPreset  data 
)
inlinestaticprivate

◆ SelectAndSpawnCargoSet()

static private bool SelectAndSpawnCargoSet ( PlayerBase  player,
PlayerSpawnPreset  data 
)
inlinestaticprivate

◆ SelectAndSpawnSlotEquipment()

static private bool SelectAndSpawnSlotEquipment ( PlayerBase  player,
PlayerSpawnPresetSlotData  slotData 
)
inlinestaticprivate

selects weighted slot equipment variant

References PlayerSpawnPresetDiscreteItemSetSlotData::IsValid(), and SpawnDiscreteSlotItemSet().

Referenced by ProcessSlotsEquipment().

◆ SpawnComplexChildrenItems()

static private bool SpawnComplexChildrenItems ( EntityAI  parent,
notnull PlayerSpawnPresetItemSetBase  data 
)
inlinestaticprivate

could spawn other items recursively. Parent item is guaranteed here.

References Class::CastTo(), CreateChildItem(), HandleNewItem(), IsWeaponAndMagazineType(), and Debug::Log().

Referenced by HandleNewItem(), and SpawnDiscreteCargoItemSet().

◆ SpawnDiscreteCargoItemSet()

static private bool SpawnDiscreteCargoItemSet ( PlayerBase  player,
PlayerSpawnPresetDiscreteCargoSetData  csd 
)
inlinestaticprivate

◆ SpawnDiscreteSlotItemSet()

static private bool SpawnDiscreteSlotItemSet ( PlayerBase  player,
PlayerSpawnPresetDiscreteItemSetSlotData  dis,
int  slotID 
)
inlinestaticprivate

◆ SpawnSimpleChildrenItems()

Field Documentation

◆ m_Data

ref PlayerSpawnJsonData m_Data = new PlayerSpawnJsonData()
staticprivate

◆ m_Initialized

private bool m_Initialized
staticprivate

Referenced by IsInitialized(), and LoadData().


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