ACE3/addons/field_rations/functions/fnc_canDrinkFromSource.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

25 lines
556 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: mharis001
* Checks if the player can drink directly from the given water source.
*
* Arguments:
* 0: Player <OBJECT>
* 1: Water Source <OBJECT>
*
* Return Value:
* Can Drink From Source <BOOL>
*
* Example:
* [_player, _source] call ace_field_rations_canDrinkFromSource
*
* Public: No
*/
params ["_player", "_source"];
XGVAR(waterSourceActions) == 2 && {
private _water = _source call FUNC(getRemainingWater);
_water == REFILL_WATER_INFINITE || {_water >= DRINK_FROM_SOURCE_AMOUNT}
}