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

Fix zeus unit and group interactions locality #5214

Merged
merged 4 commits into from
May 31, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions addons/interaction/ACE_ZeusActions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ class ACE_ZeusActions {
class prone {
displayName = "$STR_Pos_Down";
icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_prone_ca.paa";
statement = "{_x setUnitPos 'DOWN';} forEach (curatorSelected select 0);";
statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('DOWN',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;);
};
class crouch {
displayName = "$STR_Pos_Crouch";
icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_crouch_ca.paa";
statement = "{_x setUnitPos 'MIDDLE';} forEach (curatorSelected select 0);";
statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('MIDDLE',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;);
};
class stand {
displayName = "$STR_Pos_Up";
icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_stand_ca.paa";
statement = "{_x setUnitPos 'UP';} forEach (curatorSelected select 0);";
statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('UP',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;);
};
class auto {
displayName = "$STR_Pos_Automatic";
icon = "\A3\UI_F_Curator\Data\default_ca.paa";
statement = "{_x setUnitPos 'AUTO';} forEach (curatorSelected select 0);";
statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('AUTO',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;);
};
};

Expand All @@ -45,27 +45,27 @@ class ACE_ZeusActions {

class careless {
displayName = "$STR_Combat_Careless";
statement = "{ _x setBehaviour 'CARELESS'; } forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('CARELESS',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class safe {
displayName = "$STR_Combat_Safe";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa";
statement = "{ _x setBehaviour 'SAFE'; } forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('CARELESS',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class aware {
displayName = "$STR_Combat_Aware";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\aware_ca.paa";
statement = "{ _x setBehaviour 'AWARE'; } forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('AWARE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class combat {
displayName = "$STR_Combat_Combat";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\combat_ca.paa";
statement = "{ _x setBehaviour 'COMBAT'; } forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('COMBAT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class stealth {
displayName = "$STR_Combat_Stealth";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\stealth_ca.paa";
statement = "{ _x setBehaviour 'STEALTH'; } forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('STEALTH',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
};

Expand All @@ -75,17 +75,17 @@ class ACE_ZeusActions {
class limited {
displayName = "$STR_Speed_Limited";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\limited_ca.paa";
statement = "{_x setSpeedMode 'LIMITED';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('LIMITED',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class normal {
displayName = "$STR_Speed_Normal";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\normal_ca.paa";
statement = "{_x setSpeedMode 'NORMAL';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('NORMAL',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class full {
displayName = "$STR_Speed_Full";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\full_ca.paa";
statement = "{_x setSpeedMode 'FULL';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('FULL',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
};

Expand All @@ -95,47 +95,47 @@ class ACE_ZeusActions {
class wedge {
displayName = "$STR_Wedge";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa";
statement = "{_x setFormation 'WEDGE';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('WEDGE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class vee {
displayName = "$STR_Vee";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa";
statement = "{_x setFormation 'VEE';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('VEE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class line {
displayName = "$STR_Line";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa";
statement = "{_x setFormation 'LINE';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('LINE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class column {
displayName = "$STR_Column";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa";
statement = "{_x setFormation 'COLUMN';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('COLUMN',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class file {
displayName = "$STR_File";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa";
statement = "{_x setFormation 'FILE';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('FILE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class stag_column {
displayName = "$STR_Staggered";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa";
statement = "{_x setFormation 'STAG COLUMN';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('STAG COLUMN',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class ech_left {
displayName = "$STR_EchL";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa";
statement = "{_x setFormation 'ECH LEFT';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('ECH LEFT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class ech_right {
displayName = "$STR_EchR";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa";
statement = "{_x setFormation 'ECH RIGHT';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('ECH RIGHT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
class diamond {
displayName = "$STR_Diamond";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa";
statement = "{_x setFormation 'DIAMOND';} forEach (curatorSelected select 1);";
statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('DIAMOND',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;);
};
};
};
Expand All @@ -149,27 +149,27 @@ class ACE_ZeusActions {

class careless {
displayName = "$STR_Combat_Careless";
statement = "{ _x setWaypointBehaviour 'CARELESS'; } forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('CARELESS',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class safe {
displayName = "$STR_Combat_Safe";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa";
statement = "{ _x setWaypointBehaviour 'SAFE'; } forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('SAFE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class aware {
displayName = "$STR_Combat_Aware";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\aware_ca.paa";
statement = "{ _x setWaypointBehaviour 'AWARE'; } forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('AWARE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class combat {
displayName = "$STR_Combat_Combat";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\combat_ca.paa";
statement = "{ _x setWaypointBehaviour 'COMBAT'; } forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('COMBAT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class stealth {
displayName = "$STR_Combat_Stealth";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\stealth_ca.paa";
statement = "{ _x setWaypointBehaviour 'STEALTH'; } forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('STEALTH',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
};

Expand All @@ -179,17 +179,17 @@ class ACE_ZeusActions {
class limited {
displayName = "$STR_Speed_Limited";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\limited_ca.paa";
statement = "{ _x setWaypointSpeed 'LIMITED'; } forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('LIMITED',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class normal {
displayName = "$STR_Speed_Normal";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\normal_ca.paa";
statement = "{ _x setWaypointSpeed 'NORMAL'; } forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('NORMAL',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class full {
displayName = "$STR_Speed_Full";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\full_ca.paa";
statement = "{ _x setWaypointSpeed 'FULL'; } forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('FULL',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
};

Expand All @@ -199,47 +199,47 @@ class ACE_ZeusActions {
class wedge {
displayName = "$STR_Wedge";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa";
statement = "{_x setWaypointFormation 'WEDGE';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('WEDGE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class vee {
displayName = "$STR_Vee";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa";
statement = "{_x setWaypointFormation 'VEE';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('VEE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class line {
displayName = "$STR_Line";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa";
statement = "{_x setWaypointFormation 'LINE';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('LINE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class column {
displayName = "$STR_Column";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa";
statement = "{_x setWaypointFormation 'COLUMN';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('COLUMN',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class file {
displayName = "$STR_File";
icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa";
statement = "{_x setWaypointFormation 'FILE';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('FILE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class stag_column {
displayName = "$STR_Staggered";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa";
statement = "{_x setWaypointFormation 'STAG COLUMN';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('COLUMN',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class ech_left {
displayName = "$STR_EchL";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa";
statement = "{_x setWaypointFormation 'ECH LEFT';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('LEFT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class ech_right {
displayName = "$STR_EchR";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa";
statement = "{_x setWaypointFormation 'ECH RIGHT';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('RIGHT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
class diamond {
displayName = "$STR_Diamond";
icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa";
statement = "{_x setWaypointFormation 'DIAMOND';} forEach (curatorSelected select 2);";
statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('DIAMOND',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;);
};
};
};
Expand Down
31 changes: 30 additions & 1 deletion addons/interaction/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ GVAR(isOpeningDoor) = false;
},
[57, [false, true, false]], false] call CBA_fnc_addKeybind; //Key CTRL+Space


["ACE3 Common", QGVAR(tapShoulder), localize LSTRING(TapShoulder), {
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
Expand All @@ -79,3 +78,33 @@ GVAR(isOpeningDoor) = false;

["isNotSwimming", {!underwater (_this select 0)}] call EFUNC(common,addCanInteractWithCondition);
["isNotOnLadder", {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "ACE_isLadder") != 1}] call EFUNC(common,addCanInteractWithCondition);

// Zeus action events
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These EH are below line 31 - if (!hasInterface) exitWith {};

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

[QGVAR(zeusStance),{
{ _x setUnitPos (_this select 0); } forEach (_this select 1);
}] call CBA_fnc_addEventHandler;

// The following 3 events handle both waypoints and groups
[QGVAR(zeusBehaviour),{
if (param [2,false]) then {
{ _x setWaypointBehaviour (_this select 0); } forEach (_this select 1);
} else {
{ _x setBehaviour (_this select 0); } forEach (_this select 1);
};
}] call CBA_fnc_addEventHandler;

[QGVAR(zeusSpeed),{
if (param [2,false]) then {
{ _x setWaypointSpeed (_this select 0); } forEach (_this select 1);
} else {
{ _x setSpeedMode (_this select 0); } forEach (_this select 1);
};
}] call CBA_fnc_addEventHandler;

[QGVAR(zeusFormation),{
if (param [2,false]) then {
{ _x setWaypointFormation (_this select 0); } forEach (_this select 1);
} else {
{ _x setFormation (_this select 0); } forEach (_this select 1);
};
}] call CBA_fnc_addEventHandler;