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

◆ OnSpawnByObjectSpawner()

override void Land_WarheadStorage_Main::OnSpawnByObjectSpawner ( ITEM_SpawnerObject item)
inlineprotected

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

184 {
185 super.OnSpawnByObjectSpawner(item);
186
187 if (item.customString == string.Empty)
188 return;
189
190 JsonUndergroundTriggers jsonData = UndergroundAreaLoader.GetData();
191 if (jsonData && jsonData.Triggers)
192 {
193 foreach (int index, auto triggerData : jsonData.Triggers)
194 {
195 if (triggerData.CustomSpawn)
196 {
197 //JSON: "customString": "undergroundTriggerTag=TAG_NAME"
198 TStringArray customStringData = new TStringArray();
199 item.customString.Split(";", customStringData);
200
201 foreach (string entry : customStringData)
202 {
203 TStringArray optionValuePair = new TStringArray();
204 entry.Split("=", optionValuePair);
205 if (optionValuePair[0] == "undergroundTriggerTag")
206 {
207 if (optionValuePair[1] == triggerData.Tag)
208 {
209 JsonUndergroundTriggers.SpawnTriggerCarrier(this, index, triggerData);
210 }
211 }
212 }
213 }
214 }
215 }
216 }
string customString
Определения ObjectSpawner.c:107
ref array< ref JsonUndergroundAreaTriggerData > Triggers
Определения UndergroundAreaLoader.c:3
class array< Class T > TStringArray
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 и TStringArray.