mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
39 lines
868 B
Plaintext
39 lines
868 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: mharis001
|
|
* Displays the remaining water in the given water source.
|
|
*
|
|
* Arguments:
|
|
* 0: Player <OBJECT>
|
|
* 1: Water source <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [_player, _source] call ace_field_rations_fnc_checkWater
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_player", "_source"];
|
|
|
|
[
|
|
CHECK_WATER_TIME,
|
|
[_player, _source],
|
|
{
|
|
params ["_args"];
|
|
_args params ["_player", "_source"];
|
|
|
|
private _water = _source call FUNC(getRemainingWater);
|
|
|
|
if (_water > 0) then {
|
|
[[LSTRING(RemainingWater), _water], 1.5, _player] call EFUNC(common,displayTextStructured);
|
|
} else {
|
|
[LSTRING(NoWaterRemaining), 1.5, _player] call EFUNC(common,displayTextStructured);
|
|
};
|
|
},
|
|
{},
|
|
LLSTRING(CheckingWater)
|
|
] call EFUNC(common,progressBar);
|