DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnSpawnByObjectSpawner()

override void Land_WarheadStorage_Main::OnSpawnByObjectSpawner ( ITEM_SpawnerObject item)
inlineprotected

См. определение в файле Land_WarheadStorage_Main.c строка 179

180 {
181 super.OnSpawnByObjectSpawner(item);
182
183 if (item.customString == string.Empty)
184 return;
185
186 JsonUndergroundTriggers jsonData = UndergroundAreaLoader.GetData();
187 if (jsonData && jsonData.Triggers)
188 {
189 foreach (int index, auto triggerData : jsonData.Triggers)
190 {
191 if (triggerData.CustomSpawn)
192 {
193 //JSON: "customString": "undergroundTriggerTag=TAG_NAME"
194 TStringArray customStringData = new TStringArray();
195 item.customString.Split(";", customStringData);
196
197 foreach (string entry : customStringData)
198 {
199 TStringArray optionValuePair = new TStringArray();
200 entry.Split("=", optionValuePair);
201 if (optionValuePair[0] == "undergroundTriggerTag")
202 {
203 if (optionValuePair[1] == triggerData.Tag)
204 {
205 JsonUndergroundTriggers.SpawnTriggerCarrier(this, index, triggerData);
206 }
207 }
208 }
209 }
210 }
211 }
212 }
string customString
Определения ObjectSpawner.c:107
ref array< ref JsonUndergroundAreaTriggerData > Triggers
Определения UndergroundAreaLoader.c:3
array< string > TStringArray
Определения EnScript.c:712
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
Определения EnString.c:396
static const string Empty
Определения EnString.c:7

Перекрестные ссылки ITEM_SpawnerObject::customString, string::Empty, UndergroundAreaLoader::GetData(), JsonUndergroundTriggers::SpawnTriggerCarrier(), string::Split() и JsonUndergroundTriggers::Triggers.