4 private static string m_Path =
"$mission:cfgeffectarea.json";
6 static void CreateZones()
14 PrintToRPT(
"[WARNING] :: [EffectAreaLoader CreateZones] :: No contaminated area file found in MISSION folder, your path is " + m_Path +
" Attempting DATA folder");
17 GetGame().GetWorldName( m_Path );
18 m_Path =
string.Format(
"dz/worlds/%1/ce/cfgeffectarea.json", m_Path );
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;
45 vector pos =
Vector( data.Pos[0], data.Pos[1], data.Pos[2] );
46 params.m_ParamRadius = data.Radius;
47 params.m_ParamPosHeight = data.PosHeight;
48 params.m_ParamNegHeight = data.NegHeight;
49 params.m_ParamInnerRings = data.InnerRingCount;
50 params.m_ParamInnerSpace = data.InnerPartDist;
51 params.m_ParamOuterToggle = data.OuterRingToggle;
52 params.m_ParamOuterSpace = data.OuterPartDist;
53 params.m_ParamOuterOffset = data.OuterOffset;
54 params.m_ParamVertLayers = data.VerticalLayers;
55 params.m_ParamVerticalOffset = data.VerticalOffset;
56 string particleName = data.ParticleName;
60 string aroundPartName = playerData.AroundPartName;
61 string tinyPartName = playerData.TinyPartName;
62 string ppeRequesterType = playerData.PPERequesterType;
65 if (particleName !=
"")
66 params.m_ParamPartId =
ParticleList.GetParticleID( particleName );
68 if (aroundPartName !=
"")
69 params.m_ParamAroundPartId =
ParticleList.GetParticleID( aroundPartName );
71 if (tinyPartName !=
"")
72 params.m_ParamTinyPartId =
ParticleList.GetParticleID( tinyPartName );
74 params.m_ParamPpeRequesterType = ppeRequesterType;
81 pos[1] =
GetGame().SurfaceRoadY( pos[0], pos[2] );
89 newZone.SetupZoneData( params );
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 if (!JsonFileLoader<JsonDataContaminatedAreas>.LoadFile(m_Path, data, errorMessage))