2015-01-20 23:18:40 +00:00
|
|
|
#include "script_component.hpp"
|
2015-04-20 11:54:22 +00:00
|
|
|
|
2015-04-25 16:56:55 +00:00
|
|
|
// Randomization
|
|
|
|
GVAR(temperatureShift) = 3 - random 6;
|
|
|
|
GVAR(badWeatherShift) = (random 1) ^ 2 * 10;
|
|
|
|
GVAR(humidityShift) = (5 - random 10) / 100;
|
|
|
|
|
2015-05-21 16:42:44 +00:00
|
|
|
GVAR(wind_period_start_time) = ACE_time;
|
|
|
|
GVAR(rain_period_start_time) = ACE_time;
|
2015-04-20 11:54:22 +00:00
|
|
|
|
2015-05-21 16:42:44 +00:00
|
|
|
"ACE_WIND_PARAMS" addPublicVariableEventHandler { GVAR(wind_period_start_time) = ACE_time; };
|
|
|
|
"ACE_RAIN_PARAMS" addPublicVariableEventHandler { GVAR(rain_period_start_time) = ACE_time; };
|
2015-01-21 03:00:06 +00:00
|
|
|
"ACE_MISC_PARAMS" addPublicVariableEventHandler {
|
2015-04-24 08:03:48 +00:00
|
|
|
if (!isServer) then {
|
|
|
|
if (GVAR(syncMisc)) then {
|
|
|
|
30 setLightnings (ACE_MISC_PARAMS select 0);
|
|
|
|
30 setRainbow (ACE_MISC_PARAMS select 1);
|
|
|
|
30 setFog (ACE_MISC_PARAMS select 2);
|
|
|
|
};
|
2015-04-21 18:41:50 +00:00
|
|
|
GVAR(temperatureShift) = (ACE_MISC_PARAMS select 3);
|
|
|
|
GVAR(badWeatherShift) = (ACE_MISC_PARAMS select 4);
|
|
|
|
GVAR(humidityShift) = (ACE_MISC_PARAMS select 5);
|
|
|
|
call FUNC(updateTemperature);
|
|
|
|
call FUNC(updateHumidity);
|
2015-01-21 04:07:33 +00:00
|
|
|
};
|
2015-01-21 03:00:06 +00:00
|
|
|
};
|
2015-01-21 03:14:51 +00:00
|
|
|
|
2015-05-01 08:19:47 +00:00
|
|
|
["ACE3 Common", QGVAR(WindInfoKey), localize "STR_ACE_Weather_WindInfoKey",
|
2015-04-06 03:02:34 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
|
|
|
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[] call FUNC(displayWindInfo);
|
|
|
|
},
|
|
|
|
{false},
|
|
|
|
[37, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + K)
|
|
|
|
|
2015-01-21 02:17:09 +00:00
|
|
|
simulWeatherSync;
|
2015-01-20 23:18:40 +00:00
|
|
|
|
2015-04-20 11:54:22 +00:00
|
|
|
[FUNC(updateTemperature), 20, []] call CBA_fnc_addPerFrameHandler;
|
|
|
|
[FUNC(updateHumidity), 20, []] call CBA_fnc_addPerFrameHandler;
|
|
|
|
[FUNC(updateWind), 1, []] call CBA_fnc_addPerFrameHandler;
|
|
|
|
[FUNC(updateRain), 2, []] call CBA_fnc_addPerFrameHandler;
|