class PlayerSpawnHandlerSource
Members 2
private static bool m_Initializedstatic ref PlayerSpawnJsonData m_Data = new PlayerSpawnJsonData()Methods 17
static bool LoadData()Referenced by MissionServer.OnInit()
static PlayerSpawnPreset GetRandomCharacterPreset()Referenced by MissionServer.OnClientNewEvent()
static PlayerSpawnPreset GetCharacterPresetByName(string presetName)References PlayerSpawnPreset.IsValid(), m_Data, PlayerSpawnPreset.name
Show 1 more
, PlayerSpawnJsonData.presetsstatic bool ProcessEquipmentData(PlayerBase player, PlayerSpawnPreset data)equips character with the chosen preset
Referenced by MissionServer.OnClientNewEvent()
private static void ProcessSlotsEquipment(PlayerBase player, PlayerSpawnPreset data)iterates over each object and spawns alternatives
References PlayerSpawnPreset.HasAttachmentSlotSetsDefined(), Debug.Log(), SelectAndSpawnSlotEquipment()
Show 1 more
, PlayerSpawnPreset.attachmentSlotItemSetsReferenced by ProcessEquipmentData()
private static bool SelectAndSpawnSlotEquipment(PlayerBase player, PlayerSpawnPresetSlotData slotData)selects weighted slot equipment variant
References array.Count(), array.Count(), array.Get()
Show 8 more
, array.GetRandomElement(), array.Insert(), PlayerSpawnPresetDiscreteItemSetSlotData.IsValid(), PlayerSpawnPresetSlotData.IsValid(), SpawnDiscreteSlotItemSet(), PlayerSpawnPresetSlotData.TranslateAndValidateSlot(), PlayerSpawnPresetSlotData.discreteItemSets, and PlayerSpawnPresetDiscreteItemSetBase.spawnWeightReferenced by ProcessSlotsEquipment()
private static void ProcessCargoEquipment(PlayerBase player, PlayerSpawnPreset data)chooses one object from the array
References PlayerSpawnPreset.HasDiscreteUnsortedItemSetsDefined(), Debug.Log(), and SelectAndSpawnCargoSet()
Referenced by ProcessEquipmentData()
private static bool SelectAndSpawnCargoSet(PlayerBase player, PlayerSpawnPreset data)Referenced by ProcessCargoEquipment()
private static bool SpawnDiscreteCargoItemSet(PlayerBase player, PlayerSpawnPresetDiscreteCargoSetData csd)Referenced by SelectAndSpawnCargoSet()
private static bool SpawnDiscreteSlotItemSet(PlayerBase player, PlayerSpawnPresetDiscreteItemSetSlotData dis, int slotID)Referenced by SelectAndSpawnSlotEquipment()
private static bool SpawnComplexChildrenItems(EntityAI parent, notnull PlayerSpawnPresetItemSetBase data)could spawn other items recursively. Parent item is guaranteed here.
private static bool SpawnSimpleChildrenItems(EntityAI parent, PlayerSpawnPresetItemSetBase data)private static void HandleNewItem(notnull ItemBase item, PlayerSpawnPresetItemSetBase data)private static void ApplyAttributes(ItemBase item, PlayerSpawnAttributesData attributes)References Class.Cast(), Object.ConfigGetBool(), Magazine.GetAmmoMax()
Show 13 more
, ItemBase.GetQuantityMax(), ItemBase.GetQuantityMin(), Object.IsMagazine(), Math.Lerp(), Math.RandomFloatInclusive(), Math.Round(), Magazine.ServerSetAmmoCount(), Object.SetHealth01(), ItemBase.SetQuantity(), PlayerSpawnAttributesData.healthMax, PlayerSpawnAttributesData.healthMin, PlayerSpawnAttributesData.quantityMax, and PlayerSpawnAttributesData.quantityMinUsed for exceptions in the system