29 Debug.
Log(
"No characterTypes defined. Falling back to 'default' character type, or random, if undefined",
"n/a",
"n/a",
"PlayerSpawnPreset");
40 Debug.
Log(
"Invalid spawn weight, skipping preset: " +
name,
"n/a",
"Validation",
"PlayerSpawnPreset");
81 Debug.
Log(
"Wrong slot name used: " +
slotName,
"n/a",
"Validation",
"PlayerSpawnPresetSlotData");
86 Debug.
Log(
"No parent entity found when trying to populate slot: " +
slotName,
"n/a",
"Validation",
"PlayerSpawnPresetSlotData");
89 if (!parent.GetInventory().HasAttachmentSlot(slotID))
91 Debug.
Log(
"Slot: " +
slotName +
" undefined on entity: " + parent.GetType(),
"n/a",
"Validation",
"PlayerSpawnPresetSlotData");
101 if (!super.IsValid())
106 Debug.
Log(
"discreteItemSets for slot: " +
slotName +
" undefined",
"n/a",
"Validation",
"PlayerSpawnPresetSlotData");
136 if (!super.IsValid())
141 Debug.
Log(
"Invalid spawnWeight set for a discrete item set!",
"n/a",
"Validation",
"PlayerSpawnPresetDiscreteItemSetBase");
156 if (!super.IsValid())
163 Debug.
Log(
"No attributes defined for a discrete item set!",
"n/a",
"Validation",
"PlayerSpawnPresetDiscreteItemSetSlotData");
179class PlayerSpawnPresetDiscreteCargoSetData : PlayerSpawnPresetDiscreteItemSetBase
192 if (!super.IsValid())
ref array< ref PlayerSpawnPresetDiscreteItemSetSlotData > discreteItemSets
PlayerSpawnJsonDataBase presets
bool TranslateAndValidateSlot(EntityAI parent, inout int slotID)
Translates slot name to match something from both 'CfgSlots' and 'attachments[]' in entity's config.
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
PlayerSpawnPreset slotName
PlayerSpawnPresetItemSetBase spawnWeight
PlayerSpawnPresetComplexChildrenType healthMin
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
static proto native bool IsSlotIdValid(int slotId)
verifies existence of the slot id
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
provides access to slot configuration
bool IsValid()
sets default values throughout the freshly created structure as required
ref array< ref PlayerSpawnPresetDiscreteCargoSetData > discreteUnsortedItemSets
ref array< ref PlayerSpawnPresetSlotData > attachmentSlotItemSets
bool HasDiscreteUnsortedItemSetsDefined()
preset might be valid even with no unsorted item sets configured, checked separately
bool HasAttachmentSlotSetsDefined()
preset might be valid even with no attachmentSlotItemSets configured, checked separately
ref array< string > characterTypes
string GetRandomCharacterType()
override int GetQuickbarIdx()
used for specific hierarchical child spawning
override int GetQuickbarIdx()
int GetQuickbarIdx()
overriden later
bool simpleChildrenUseDefaultAttributes
ref array< string > simpleChildrenTypes
ref PlayerSpawnAttributesData attributes
ref array< ref PlayerSpawnPresetComplexChildrenType > complexChildrenTypes
Result for an object found in CGame.IsBoxCollidingGeometryProxy.