22 class FreshSpawn_Preset
extends PresetSpawnBase
26 FindAndTakeToHandsFromInventory(
"Plum");
31 class Farmer_Preset
extends PresetSpawnBase
39 class AntiHazard_Preset
extends PresetSpawnBase
43 EntityAI mask = FindItem(
"AirborneMask");
47 auto debugParams = DebugSpawnParams.WithPlayer(player);
48 mask.OnDebugSpawnEx(debugParams);
55 class Update117_Preset
extends PresetSpawnBase
60 randompos = player.GetPosition();
61 foreach (
EntityAI itm : m_ItemsPreset)
66 itempos[0] =
Math.RandomFloat(-1,1);
67 itempos[2] =
Math.RandomFloat(-1,1);
71 itmBase.SetPosition(randompos + itempos);
72 itmBase.SetQuantity(100);
80 class Update118_Preset
extends PresetSpawnBase
85 randompos = player.GetPosition();
86 foreach (
EntityAI itm : m_ItemsPreset)
91 itempos[0] =
Math.RandomFloat(-1,1);
92 itempos[2] =
Math.RandomFloat(-1,1);
96 itmBase.SetPosition(randompos + itempos);
97 itmBase.SetQuantity(100);
104 class BBMaterials_Preset
extends PresetSpawnBase
107 override void OnPresetSpawn(
PlayerBase player)
109 randompos = player.GetPosition();
110 foreach (
EntityAI itm : m_ItemsPreset)
115 itempos[0] =
Math.RandomFloat(-1,1);
116 itempos[2] =
Math.RandomFloat(-1,1);
117 itm.SetPosition(randompos + itempos);
125 class Military_Light_Preset
extends PresetSpawnBase
127 override void OnPresetSpawn(
PlayerBase player)
129 EntityAI weapon = FindItem(
"AK101");
131 auto debugParams = DebugSpawnParams.WithPlayer(player);
132 weapon.OnDebugSpawnEx(debugParams);
134 FindAndTakeToHandsFromInventory(
"AK101");
145 class PresetSpawnBase
157 m_ItemsPreset = player.m_PresetItems;
159 OnPresetSpawn(player);
161 foreach (
auto item:m_ItemsPreset)
179 if (
GetGame().IsDedicatedServer())
190 void FindAndTakeToHandsFromInventory(
string classname)
193 foreach(
EntityAI item:m_ItemsInventory)
195 if (item.ClassName() == classname)
206 foreach(
EntityAI item:m_ItemsInventory)
208 if (item.ClassName() == classname)