4 private static string m_Path =
"$mission:cfgEffectArea.json";
14 PrintToRPT(
"[WARNING] :: [EffectAreaLoader CreateZones] :: No contaminated area file found in MISSION folder, your path is " +
m_Path +
" Attempting DATA folder");
22 PrintToRPT(
"[WARNING] :: [EffectAreaLoader CreateZones] :: No contaminated area file found in DATA folder, your path is " +
m_Path);
34 for (
int i = 0; i < effectAreaData.
Areas.Count(); i++ )
36 EffectAreaParams params =
new EffectAreaParams();
39 params.m_ParamName = effectAreaData.
Areas.Get( i ).AreaName;
40 string areaType = effectAreaData.
Areas.Get( i ).Type;
41 params.m_ParamTriggerType = effectAreaData.
Areas.Get( i ).TriggerType;
46 params.m_ParamRadius = data.
Radius;
65 if (particleName !=
"")
68 if (aroundPartName !=
"")
71 if (tinyPartName !=
"")
74 params.m_ParamPpeRequesterType = ppeRequesterType;
91 Error(
"[WARNING] :: [EffectAreaLoader CreateZones] :: Cast failed, are you sure your class ( 'Type:' ) inherits from EffectArea and that there are no Typos?");
95 Error(
"[WARNING] :: [EffectAreaLoader CreateZones] :: Data could not be read, please check data and syntax");
102 JsonFileLoader<JsonDataContaminatedAreas>.JsonLoadFile(
m_Path, data );
const int ECE_PLACE_ON_SURFACE
proto void GetWorldName(out string world_name)
proto native float SurfaceRoadY(float x, float z)
Super root of all classes in Enforce script.
void SetupZoneData(EffectAreaParams params)
static private string m_Path
static void CreateZones()
static JsonDataContaminatedAreas GetData()
ref array< ref JsonDataContaminatedArea > Areas
static int GetParticleID(string particle_file)
Returns particle's ID based on the path (without .ptc suffix)
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto bool FileExist(string name)
Check existence of file.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.