diff --git a/addons/overheating/CfgVehicles.hpp b/addons/overheating/CfgVehicles.hpp index 61b619a79b..928a22420a 100644 --- a/addons/overheating/CfgVehicles.hpp +++ b/addons/overheating/CfgVehicles.hpp @@ -34,7 +34,7 @@ class CfgVehicles { displayName = CSTRING(CheckTemperatureSpareBarrelsShort); condition = QUOTE( 'ACE_SpareBarrel' in magazines _player); exceptions[] = {"isNotInside", "isNotSitting"}; - statement = QUOTE([ARR_2('spareBarrelsCheckTemperatures',[ARR_2(_player,_player)])] call EFUNC(common,serverEvent);); + statement = QUOTE( [ARR_1(_player)] call FUNC(checkSpareBarrelsTemperatures); ); showDisabled = 0; priority = 2.8; icon = QUOTE(PATHTOF(UI\temp_ca.paa)); diff --git a/addons/overheating/XEH_PREP.hpp b/addons/overheating/XEH_PREP.hpp index 8f584ef6e6..cc1948e6bd 100644 --- a/addons/overheating/XEH_PREP.hpp +++ b/addons/overheating/XEH_PREP.hpp @@ -1,6 +1,7 @@ PREP(calculateCooling); PREP(canUnjam); +PREP(checkSpareBarrelsTemperatures); PREP(checkTemperature); PREP(clearJam); PREP(displayTemperature); diff --git a/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf new file mode 100644 index 0000000000..b7509671bb --- /dev/null +++ b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf @@ -0,0 +1,36 @@ +/* + * Author: esteldunedain + * Make the player check the temperature of his spare barrels + * + * Arguments: + * 0: Player + * + * Return Value: + * None + * + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player"]; + +// Check canInteractWith: +if (!([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {}; + +// Make the unit go kneeling +[_unit] call EFUNC(common,goKneeling); + +// Spawn a progress bar +[ + 5.0, + [_player], + { + // Time has enlapsed, ask the server to send the hint + ['spareBarrelsSendTemperatureHint', [_unit, _unit]] call EFUNC(common,serverEvent); + }, + {}, + (localize LSTRING(CheckingSpareBarrelsTemperatures)), + {true}, + ["isNotInside", "isNotSitting"] +] call EFUNC(common,progressBar); diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index ace5806f61..fc38ae0054 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -230,7 +230,10 @@ Проверка температуры... - Check spare barrel temperatures + Check spare barrels temperatures + + + Checking spare barrels temperatures... Temperature