Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fast mouse actions to refuel, add refuel eden attributes #5418

Merged
merged 14 commits into from
Sep 10, 2017
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private _actions = [
// Dummy statement so it's not collapsed when there's no available actions
true
},
{[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder"]] call EFUNC(common,canInteractWith)},
{[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder", "isNotRefueling"]] call EFUNC(common,canInteractWith)},
{},
{},
"Spine3",
Expand Down
2 changes: 1 addition & 1 deletion addons/interact_menu/functions/fnc_keyDown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (GVAR(openedMenuType) == _menuType) exitWith {true};

// Conditions: canInteract (these don't apply to zeus)
if ((isNull curatorCamera) && {
!([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder"]] call EFUNC(common,canInteractWith))
!([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder", "isNotRefueling"]] call EFUNC(common,canInteractWith))
}) exitWith {false};

while {dialog} do {
Expand Down
16 changes: 8 additions & 8 deletions addons/interaction/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class CfgVehicles {
class ACE_TeamManagement {
displayName = CSTRING(TeamManagement);
condition = QUOTE(GVAR(EnableTeamManagement));
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
statement = "";
showDisabled = 1;
priority = 3.2;
Expand All @@ -251,7 +251,7 @@ class CfgVehicles {
class ACE_JoinTeamRed {
displayName = CSTRING(JoinTeamRed);
condition = QUOTE(true);
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.4;
Expand All @@ -260,7 +260,7 @@ class CfgVehicles {
class ACE_JoinTeamGreen {
displayName = CSTRING(JoinTeamGreen);
condition = QUOTE(true);
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.3;
Expand All @@ -269,7 +269,7 @@ class CfgVehicles {
class ACE_JoinTeamBlue {
displayName = CSTRING(JoinTeamBlue);
condition = QUOTE(true);
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.2;
Expand All @@ -278,7 +278,7 @@ class CfgVehicles {
class ACE_JoinTeamYellow {
displayName = CSTRING(JoinTeamYellow);
condition = QUOTE(true);
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.1;
Expand All @@ -287,7 +287,7 @@ class CfgVehicles {
class ACE_LeaveTeam {
displayName = CSTRING(LeaveTeam);
condition = QUOTE(assignedTeam _player != 'MAIN');
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.5;
Expand All @@ -296,7 +296,7 @@ class CfgVehicles {
class ACE_BecomeLeader {
displayName = CSTRING(BecomeLeader);
condition = QUOTE(_this call DFUNC(canBecomeLeader));
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
statement = QUOTE(_this call DFUNC(doBecomeLeader));
showDisabled = 1;
priority = 1.0;
Expand All @@ -305,7 +305,7 @@ class CfgVehicles {
class ACE_LeaveGroup {
displayName = CSTRING(LeaveGroup);
condition = QUOTE(count (units group _player) > 1);
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;);
showDisabled = 1;
priority = 1.2;
Expand Down
4 changes: 2 additions & 2 deletions addons/nightvision/XEH_postInitClient.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
// Add keybinds
["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness), {
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if ((currentVisionMode ACE_player != 1)) exitWith {false};

Expand All @@ -51,7 +51,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;

["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness), {
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if ((currentVisionMode ACE_player != 1)) exitWith {false};

Expand Down
36 changes: 36 additions & 0 deletions addons/refuel/Cfg3DEN.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default})
#define GET_1ST_ARRAY(config) (if (isArray (config)) then {getArray (config) select 0} else {[ARR_3(0,0,0)]})

#define DEFAULT_FUELCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(fuelCargo),REFUEL_DISABLED_FUEL)
#define DEFAULT_HOOKS GET_1ST_ARRAY(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(hooks))

class Cfg3DEN {
class Object {
class AttributeCategories {
class ace_attributes {
class Attributes {
class GVAR(fuelCargo) {
displayName = CSTRING(fuelCargo_edenName);
tooltip = CSTRING(fuelCargo_edenDesc);
property = QGVAR(fuelCargo);
control = "EditShort";
expression = QUOTE(if (_value != DEFAULT_FUELCARGO) then {[ARR_2(_this,_value)] call DFUNC(makeSource)});
defaultValue = QUOTE(DEFAULT_FUELCARGO);
validate = "number";
condition = "(1-objectBrain)*(1-objectAgent)";
typeName = "NUMBER";
};
class GVAR(hooks) {
displayName = CSTRING(hooks_edenName);
tooltip = CSTRING(hooks_edenDesc);
property = QGVAR(hooks);
control = "EditXYZ";
expression = QUOTE(if !(_value isEqualTo DEFAULT_HOOKS) then {_this setVariable [ARR_3('%s',[_value],true)]});
defaultValue = QUOTE(DEFAULT_HOOKS);
condition = "(1-objectBrain)*(1-objectAgent)";
};
};
};
};
};
};
12 changes: 2 additions & 10 deletions addons/refuel/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,15 @@ class Extended_PostInit_EventHandlers {
class Extended_Respawn_EventHandlers {
class CAManBase {
class ADDON {
respawn = QUOTE(call COMPILE_FILE(XEH_respawn));
};
};
};

class Extended_Killed_EventHandlers {
class CAManBase {
class ADDON {
killed = QUOTE(_this call FUNC(handleKilled));
respawn = QUOTE(call DFUNC(handleRespawn));
};
};
};

class Extended_InitPost_EventHandlers {
class Land_CanisterFuel_F {
class ADDON {
init = QUOTE(_this call DFUNC(makeJerryCan));
init = QUOTE(call DFUNC(makeJerryCan));
};
};
};
Loading