ACE3/addons/field_rations/functions/fnc_checkWater.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

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