163 {
164 if (!dis)
165 {
166 Debug.Log(
"No PlayerSpawnPresetDiscreteItemSet found. Skipping spawn for slot: " + InventorySlots.GetSlotName(slotID),
"n/a",
"n/a",
"SpawnDiscreteSlotItemSet");
167 return false;
168 }
169
171 if (slotID == InventorySlots.HANDS)
172 item =
ItemBase.Cast(player.GetHumanInventory().CreateInHands(dis.
itemType));
173 else
174 item =
ItemBase.Cast(player.GetInventory().CreateAttachmentEx(dis.
itemType,slotID));
175
176 if (item)
177 {
179 }
181 {
182 Debug.Log(
"FAILED spawning item type: " + dis.
itemType +
" into slot: " + InventorySlots.GetSlotName(slotID) +
" of parent: " + player,
"n/a",
"n/a",
"SpawnDiscreteSlotItemSet");
183 return false;
184 }
185
186 return item != null;
187 }
class GP5GasMask extends MaskBase ItemBase
static void HandleNewItem(notnull ItemBase item, PlayerSpawnPresetItemSetBase data)
static const string Empty