24 string GetRandomCharacterType()
26 if (characterTypes && characterTypes.Count() > 0)
27 return characterTypes.GetRandomElement();
29 Debug.Log(
"No characterTypes defined. Falling back to 'default' character type, or random, if undefined",
"n/a",
"n/a",
"PlayerSpawnPreset");
33 override bool IsValid()
40 Debug.Log(
"Invalid spawn weight, skipping preset: " +
name,
"n/a",
"Validation",
"PlayerSpawnPreset");
48 bool HasAttachmentSlotSetsDefined()
50 return attachmentSlotItemSets && attachmentSlotItemSets.Count() > 0;
54 bool HasDiscreteUnsortedItemSetsDefined()
56 return discreteUnsortedItemSets && discreteUnsortedItemSets.Count() > 0;
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");
117 bool simpleChildrenUseDefaultAttributes;
118 ref PlayerSpawnAttributesData attributes;
136 if (!super.IsValid())
141 Debug.Log(
"Invalid spawnWeight set for a discrete item set!",
"n/a",
"Validation",
"PlayerSpawnPresetDiscreteItemSetBase");
154 override bool IsValid()
156 if (!super.IsValid())
163 Debug.Log(
"No attributes defined for a discrete item set!",
"n/a",
"Validation",
"PlayerSpawnPresetDiscreteItemSetSlotData");
172 override int GetQuickbarIdx()
179 class PlayerSpawnPresetDiscreteCargoSetData : PlayerSpawnPresetDiscreteItemSetBase
190 override bool IsValid()
192 if (!super.IsValid())
195 return itemType !=
string.Empty;
198 override int GetQuickbarIdx()