Skip to content

Commit

Permalink
Update fnc_getMapData.sqf
Browse files Browse the repository at this point in the history
  • Loading branch information
OverlordZorn committed Apr 9, 2024
1 parent 8fb4423 commit a57d114
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions addons/weather/functions/fnc_getMapData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,13 @@ private _cfgPath = (configFile >> "CfgWorlds" >> _worldName);
private _nonInheritedArrays = configProperties [_cfgPath, "isArray _x", false];
// And check if any custom non-inherited weather is defined through config and use that if so
if ((_cfgPath >> "ACE_TempDay") in _nonInheritedArrays) exitWith {
if (isArray (_cfgPath >> "ACE_TempDay")) then {
GVAR(TempDay) = getArray (_cfgPath >> "ACE_TempDay");
};
if (isArray (_cfgPath >> "ACE_TempNight")) then {
GVAR(TempNight) = getArray (_cfgPath >> "ACE_TempNight");
};
if (isArray (_cfgPath >> "ACE_Humidity")) then {
GVAR(Humidity) = getArray (_cfgPath >> "ACE_Humidity");
};
if (isArray (_cfgPath >> "ACE_WindSpeedMin")) then {
GVAR(WindSpeedMin) = getArray (_cfgPath >> "ACE_WindSpeedMin");
};
if (isArray (_cfgPath >> "ACE_WindSpeedMean")) then {
GVAR(WindSpeedMean) = getArray (_cfgPath >> "ACE_WindSpeedMean");
};
if (isArray (_cfgPath >> "ACE_WindSpeedMax")) then {
GVAR(WindSpeedMax) = getArray (_cfgPath >> "ACE_WindSpeedMax");
};
if (isArray (_cfgPath >> "ACE_WindDirectionProbabilities")) then {
GVAR(WindDirectionProbabilities) = getArray (_cfgPath >> "ACE_WindDirectionProbabilities");
};
if (isArray (_cfgPath >> "ACE_TempDay")) then { GVAR(TempDay) = getArray (_cfgPath >> "ACE_TempDay");};
if (isArray (_cfgPath >> "ACE_TempNight")) then { GVAR(TempNight) = getArray (_cfgPath >> "ACE_TempNight");};
if (isArray (_cfgPath >> "ACE_Humidity")) then { GVAR(Humidity) = getArray (_cfgPath >> "ACE_Humidity");};
if (isArray (_cfgPath >> "ACE_WindSpeedMin")) then { GVAR(WindSpeedMin) = getArray (_cfgPath >> "ACE_WindSpeedMin");};
if (isArray (_cfgPath >> "ACE_WindSpeedMax")) then { GVAR(WindSpeedMax) = getArray (_cfgPath >> "ACE_WindSpeedMax");};
if (isArray (_cfgPath >> "ACE_WindSpeedMean")) then { GVAR(WindSpeedMean) = getArray (_cfgPath >> "ACE_WindSpeedMean");};
if (isArray (_cfgPath >> "ACE_WindDirectionProbabilities")) then { GVAR(WindDirectionProbabilities) = getArray (_cfgPath >> "ACE_WindDirectionProbabilities");};
};

// Check if the map is among the most popular
Expand Down

0 comments on commit a57d114

Please sign in to comment.