ACE3/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf
SilentSpike 108ff4f644 Replace ACE event system calls with CBA counterparts
Regex used:

\[(.+?),(.+?),(.+?)\]\s+call\s+E?FUNC\((common,)?(target|object)Event\)
[$1,$3,$2] call CBA_fnc_targetEvent

E?FUNC\((common,)?(server|global|local)Event\)
CBA_fnc_$2Event

E?FUNC\((common,)?(add|remove)EventHandler\)
CBA_fnc_$2EventHandler
2016-05-22 16:47:39 +01:00

39 lines
908 B
Plaintext

/*
* 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
[_player] call EFUNC(common,goKneeling);
// Spawn a progress bar
[
5.0,
[_player],
{
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
_args params ["_player"];
// Time has enlapsed, ask the server to send the hint
['spareBarrelsSendTemperatureHint', [_player, _player]] call CBA_fnc_serverEvent;
},
{},
(localize LSTRING(CheckingSpareBarrelsTemperatures)),
{true},
["isNotInside", "isNotSitting"]
] call EFUNC(common,progressBar);