2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2021-10-14 15:46:43 +00:00
|
|
|
/*
|
|
|
|
* 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:
|
2023-11-08 18:00:05 +00:00
|
|
|
* [_player, _source] call ace_field_rations_fnc_canDrinkFromSource
|
2021-10-14 15:46:43 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_player", "_source"];
|
|
|
|
|
|
|
|
XGVAR(waterSourceActions) == 2 && {
|
|
|
|
private _water = _source call FUNC(getRemainingWater);
|
|
|
|
_water == REFILL_WATER_INFINITE || {_water >= DRINK_FROM_SOURCE_AMOUNT}
|
|
|
|
}
|