Add an animation and progressbar to the "Check spare barrels temperatures" action

This commit is contained in:
esteldunedain 2016-03-01 18:16:14 -03:00
parent 46a96dd5da
commit a041555381
4 changed files with 42 additions and 2 deletions

View File

@ -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));

View File

@ -1,6 +1,7 @@
PREP(calculateCooling);
PREP(canUnjam);
PREP(checkSpareBarrelsTemperatures);
PREP(checkTemperature);
PREP(clearJam);
PREP(displayTemperature);

View File

@ -0,0 +1,36 @@
/*
* Author: esteldunedain
* Make the player check the temperature of his spare barrels
*
* Arguments:
* 0: Player <OBJECT>
*
* 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);

View File

@ -230,7 +230,10 @@
<Russian>Проверка температуры...</Russian>
</Key>
<Key ID="STR_ACE_Overheating_CheckTemperatureSpareBarrelsShort">
<English>Check spare barrel temperatures</English>
<English>Check spare barrels temperatures</English>
</Key>
<Key ID="STR_ACE_Overheating_CheckingSpareBarrelsTemperatures">
<English>Checking spare barrels temperatures...</English>
</Key>
<Key ID="STR_ACE_Overheating_Temperature">
<English>Temperature</English>