diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index a80c1bcfe..75d025931 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -45,7 +45,7 @@ if (isServer) then { }] call CBA_fnc_addEventHandler; [QGVAR(applyWeather), { - params ["_forced", "_overcast", "_rain", "_lightning", "_rainbow", "_waves", "_wind", "_gusts", "_fog"]; + params ["_forced", "_overcast", "_rain", "_precipitationType", "_lightning", "_rainbow", "_waves", "_wind", "_gusts", "_fog"]; 0 setOvercast _overcast; 0 setLightnings _lightning; @@ -58,6 +58,35 @@ if (isServer) then { 0 setFog _fog; setWind _wind; + switch (_precipitationType) do { + // Reset to default + case 0: { + [] call BIS_fnc_setRain; + }; + // Set to snow + case 1: { + [ + "a3\data_f\snowflake4_ca.paa", // rainDropTexture + 4, // texDropCount + 0.01, // minRainDensity + 25, // effectRadius + 0.05, // windCoef + 2.5, // dropSpeed + 0.5, // rndSpeed + 0.5, // rndDir + 0.07, // dropWidth + 0.07, // dropHeight + [1, 1, 1, 0.5], // dropColor + 0.0, // lumSunFront + 0.2, // lumSunBack + 0.5, // refractCoef + 0.5, // refractSaturation + true, // snow + false // dropColorStrong + ] call BIS_fnc_setRain; + }; + }; + if (_forced) then { forceWeatherChange; }; diff --git a/addons/modules/functions/fnc_moduleWeather.sqf b/addons/modules/functions/fnc_moduleWeather.sqf index b45752151..5645d2cbd 100644 --- a/addons/modules/functions/fnc_moduleWeather.sqf +++ b/addons/modules/functions/fnc_moduleWeather.sqf @@ -31,10 +31,16 @@ params ["_logic"]; ], [ "SLIDER:PERCENT", - [LSTRING(ModuleWeather_Rain), LSTRING(ModuleWeather_Rain_Tooltip)], + [LSTRING(ModuleWeather_Precipitation), LSTRING(ModuleWeather_Precipitation_Tooltip)], [0, 1, rain], true ], + [ + "TOOLBOX", + [LSTRING(ModuleWeather_PrecipitationType), LSTRING(ModuleWeather_PrecipitationType_Tooltip)], + [parseNumber (rainParams select 15), 1, 2, [LSTRING(ModuleWeather_Rain), LSTRING(ModuleWeather_Snow)]], + true + ], [ "SLIDER:PERCENT", [LSTRING(ModuleWeather_Lightning), LSTRING(ModuleWeather_Lightning_Tooltip)], @@ -96,6 +102,7 @@ params ["_logic"]; "_forced", "_overcast", "_rain", + "_precipitationType", "_lightning", "_rainbow", "_waves", @@ -110,7 +117,7 @@ params ["_logic"]; private _wind = [KMH_TO_MS(_windSpeed) * sin _windDirection, KMH_TO_MS(_windSpeed) * cos _windDirection, true]; private _fog = [_fogDensity, _fogDecay, _fogAltitude]; - [QGVAR(applyWeather), [_forced, _overcast, _rain, _lightning, _rainbow, _waves, _wind, _gusts, _fog]] call CBA_fnc_globalEvent; + [QGVAR(applyWeather), [_forced, _overcast, _rain, _precipitationType, _lightning, _rainbow, _waves, _wind, _gusts, _fog]] call CBA_fnc_globalEvent; }, {}, [], QGVAR(moduleWeather)] call EFUNC(dialog,create); deleteVehicle _logic; diff --git a/addons/modules/stringtable.xml b/addons/modules/stringtable.xml index 35119b957..39c52822a 100644 --- a/addons/modules/stringtable.xml +++ b/addons/modules/stringtable.xml @@ -2212,13 +2212,24 @@ Coperto - Sets the amount of cloud cover, higher values result in a greater likelihood of rain/storms and faster wind speeds. - Legt die Bedeckung der Wolken fest, höhere Werte führen zu einer höheren Wahrscheinlichkeit von Regen/Stürmen und schnelleren Windgeschwindigkeiten. - Ustala pochmurność, wysoka wartość powoduje większe prawdopodobieństwo deszczu/burzy i szybszego wiatru. - 雲が覆う量を決定します。高い値では大雨/嵐のようになり、強い風が吹きます。 - 设定云量,数值越高,下雨/风暴的可能性越大,风速越快。 - 設定雲量,數值越高,下雨/風暴的可能性越大,風速越快。 - Imposta la quantità di copertura nuvolosa, valori più alti comportano una maggiore probabilità di pioggia/tempeste e velocità del vento più elevate. + Sets the amount of cloud cover, higher values result in a greater likelihood of precipitations/storms and faster wind speeds. + Legt die Bedeckung der Wolken fest, höhere Werte führen zu einer höheren Wahrscheinlichkeit von Niederschlägen/Stürmen und schnelleren Windgeschwindigkeiten. + + + Precipitation + Niederschlag + + + Sets the precipitation strength, requires overcast to be greater than 70%. + Legt die Niederschlagsintensität fest, erfordert, dass die Bewölkung größer als 70% ist. + + + Precipitation Type + Niederschlagstyp + + + Sets the type of precipitation. + Legt den Niederschlagstyp fest. Rain @@ -2230,14 +2241,9 @@ Piovere - - Sets the rain strength, requires overcast to be greater than 70%. - Legt die Regenstärke fest, erfordert, dass die Bewölkung größer als 70% ist. - 雨の強さを決定できますが、雲の量が 70% 以上でなければ動作しません。 - Ustaw intensywność deszczu, wymaga aby pochmurność była większa niż 70%. - 设置降雨强度,要求云量大于70%。 - 設置降雨強度,要求雲量大於70%。 - Imposta l'intensità della pioggia, richiede un cielo coperto superiore al 70%. + + Snow + Schnee Lightning