67 {
70 {
71 tmp = "Shoulder";
72 }
74 {
75 tmp = "Melee";
76 }
77
80 {
81 Debug.
Log(
"Wrong slot name used: " +
slotName,
"n/a",
"Validation",
"PlayerSpawnPresetSlotData");
82 return false;
83 }
84 if (!parent)
85 {
86 Debug.
Log(
"No parent entity found when trying to populate slot: " +
slotName,
"n/a",
"Validation",
"PlayerSpawnPresetSlotData");
87 return false;
88 }
89 if (!parent.GetInventory().HasAttachmentSlot(slotID))
90 {
91 Debug.
Log(
"Slot: " +
slotName +
" undefined on entity: " + parent.GetType(),
"n/a",
"Validation",
"PlayerSpawnPresetSlotData");
92 return false;
93 }
94
95 return true;
96 }
PlayerSpawnPreset slotName
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