mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add an animation and progressbar to the "Check spare barrels temperatures" action
This commit is contained in:
parent
46a96dd5da
commit
a041555381
@ -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));
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
PREP(calculateCooling);
|
||||
PREP(canUnjam);
|
||||
PREP(checkSpareBarrelsTemperatures);
|
||||
PREP(checkTemperature);
|
||||
PREP(clearJam);
|
||||
PREP(displayTemperature);
|
||||
|
@ -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);
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user