mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tweak Field_rations/overheating merge (#8548)
This commit is contained in:
parent
eadbc60314
commit
f2b3fe3012
@ -21,7 +21,7 @@ if !(hasInterface) exitWith {};
|
||||
QPATHTOF(ui\icon_water_tap.paa),
|
||||
{true},
|
||||
{
|
||||
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
|
||||
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
|
||||
|
||||
alive _waterSource
|
||||
&& {XGVAR(waterSourceActions) != 0}
|
||||
@ -29,7 +29,7 @@ if !(hasInterface) exitWith {};
|
||||
&& {[_player, _waterSource] call EFUNC(common,canInteractWith)}
|
||||
},
|
||||
{
|
||||
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
|
||||
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
|
||||
[_waterSource, _player] call FUNC(getRefillChildren);
|
||||
},
|
||||
[],
|
||||
@ -44,11 +44,11 @@ if !(hasInterface) exitWith {};
|
||||
LLSTRING(CheckWater),
|
||||
QPATHTOF(ui\icon_water_tap.paa),
|
||||
{
|
||||
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
|
||||
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
|
||||
[_player, _waterSource] call FUNC(checkWater);
|
||||
},
|
||||
{
|
||||
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
|
||||
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
|
||||
(_waterSource call FUNC(getRemainingWater)) != REFILL_WATER_INFINITE
|
||||
}
|
||||
] call EFUNC(interact_menu,createAction),
|
||||
@ -57,11 +57,11 @@ if !(hasInterface) exitWith {};
|
||||
LLSTRING(DrinkFromSource),
|
||||
QPATHTOF(ui\icon_water_tap.paa),
|
||||
{
|
||||
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
|
||||
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
|
||||
[_player, _waterSource] call FUNC(drinkFromSource);
|
||||
},
|
||||
{
|
||||
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
|
||||
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
|
||||
[_player, _waterSource] call FUNC(canDrinkFromSource);
|
||||
}
|
||||
] call EFUNC(interact_menu,createAction)
|
||||
@ -70,7 +70,7 @@ if !(hasInterface) exitWith {};
|
||||
// Add water source actions to helper
|
||||
[QGVAR(helper), 0, [], _mainAction] call EFUNC(interact_menu,addActionToClass);
|
||||
{
|
||||
[QGVAR(helper), 0, [QXGVAR(waterSource)], _x] call EFUNC(interact_menu,addActionToClass);
|
||||
[QGVAR(helper), 0, [QGVAR(waterSource)], _x] call EFUNC(interact_menu,addActionToClass);
|
||||
} forEach _subActions;
|
||||
|
||||
// Add inventory context menu option to consume items
|
||||
|
@ -50,7 +50,7 @@ TRACE_1("Starting interact PFH",_interactionType);
|
||||
if (_waterRemaining != REFILL_WATER_DISABLED) then {
|
||||
private _offset = [_x] call FUNC(getActionOffset);
|
||||
private _helper = QGVAR(helper) createVehicleLocal [0, 0, 0];
|
||||
_helper setVariable [QXGVAR(waterSource), _x];
|
||||
_helper setVariable [QGVAR(waterSource), _x];
|
||||
_helper attachTo [_x, _offset];
|
||||
|
||||
_addedHelpers pushBack _helper;
|
||||
|
@ -88,21 +88,21 @@ if (hasInterface) then {
|
||||
{
|
||||
if (!EXGVAR(field_rations,enabled)) exitWith {};
|
||||
|
||||
_CoolWeaponWithWaterSourceAction = [
|
||||
private _coolWeaponWithWaterSourceAction = [
|
||||
QGVAR(CoolWeaponWithWaterSource),
|
||||
LLSTRING(CoolWeaponWithWaterSource),
|
||||
QPATHTOEF(field_rations,ui\icon_water_tap.paa),
|
||||
{
|
||||
private _waterSource = _target getVariable [QEXGVAR(field_rations,waterSource), objNull];
|
||||
private _waterSource = _target getVariable [QEGVAR(field_rations,waterSource), objNull];
|
||||
[_player, _waterSource] call FUNC(coolWeaponWithWaterSource);
|
||||
},
|
||||
{
|
||||
private _waterSource = _target getVariable [QEXGVAR(field_rations,waterSource), objNull];
|
||||
[_player, _waterSource] call acex_field_rations_fnc_canDrinkFromSource;
|
||||
private _waterSource = _target getVariable [QEGVAR(field_rations,waterSource), objNull];
|
||||
[_player, _waterSource] call EFUNC(field_rations,canDrinkFromSource);
|
||||
}
|
||||
] call EFUNC(interact_menu,createAction);
|
||||
|
||||
[QEGVAR(field_rations,helper), 0, [QGVAR(field_rations,waterSource)], _CoolWeaponWithWaterSourceAction] call EFUNC(interact_menu,addActionToClass);
|
||||
[QEGVAR(field_rations,helper), 0, [QEGVAR(field_rations,waterSource)], _coolWeaponWithWaterSourceAction] call EFUNC(interact_menu,addActionToClass);
|
||||
},
|
||||
[]
|
||||
] call CBA_fnc_waitUntilAndExecute;
|
||||
|
@ -46,7 +46,7 @@ private _fnc_condition = {
|
||||
_args params ["_player", "_target", "_weapon", "_tempVarName"];
|
||||
|
||||
private _temperature = _player getVariable [_tempVarName, 0];
|
||||
private _water = _target EFUNC(field_rations,getRemainingWater);
|
||||
private _water = _target call EFUNC(field_rations,getRemainingWater);
|
||||
|
||||
if (_water <= 0 && {_water != -10}) exitWith {false};
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* player call acex_sitting_fnc_stand
|
||||
* player call ace_sitting_fnc_stand
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user