7 class JsonUndergroundAreaBreadcrumb
24 return Vector(Position[0],Position[1],Position[2]);
29 return Vector(Orientation[0],Orientation[1],Orientation[2]);
33 return Vector(Size[0],Size[1],Size[2]);
39 float EyeAccommodation;
40 float InterpolationSpeed;
49 private static string m_Path =
"$mission:cfgundergroundtriggers.json";
59 PrintToRPT(
"[WARNING] :: [UndergroundAreaLoader GetData()] :: file not found in MISSION folder, your path is " + m_Path +
" Attempting DATA folder");
62 GetGame().GetWorldName(worldName);
63 m_Path =
string.Format(
"dz/worlds/%1/ce/cfgundergroundtriggers.json", worldName);
67 PrintToRPT(
"[WARNING] :: [UndergroundAreaLoader GetData()] ::file not found in DATA folder, your path is " + m_Path);
74 if (!JsonFileLoader<JsonUndergroundTriggers>.LoadFile(m_Path, data, errorMessage))
81 static void SpawnAllTriggerCarriers()
85 m_JsonData = GetData();
88 if (!m_JsonData || !m_JsonData.Triggers)
93 foreach (
int i,
auto data:m_JsonData.Triggers)
95 SpawnTriggerCarrier(i, data);
106 carrier.SetIndex(index);
107 carrier.SetOrientation(data.GetOrientation());
114 GetGame().RPCSingleParam(
null,
ERPCs.RPC_UNDERGROUND_SYNC,
new Param1<JsonUndergroundTriggers>(m_JsonData),
true, identity);
121 Param1<JsonUndergroundTriggers> data =
new Param1< JsonUndergroundTriggers>(
null);
123 if ( ctx.Read(data) )
125 m_JsonData = data.param1;
129 ErrorEx(
"UndergroundAreaLoader datasynced - failed to read");