mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
25 lines
553 B
Plaintext
25 lines
553 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}
|
||
|
}
|