Merge pull request #2 from KoffeinFlummi/agmInteractionPort

Agm interaction port
This commit is contained in:
jaynus
2015-01-12 10:44:20 -08:00
55 changed files with 743 additions and 776 deletions

View File

@ -0,0 +1,27 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) );
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_clientInit.sqf) );
};
};
class Extended_GetIn_EventHandlers {
class All {
class ADDONnu {
clientGetIn = QUOTE( if (_this select 2 == ACE_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1});
};
};
};
class Extended_GetOut_EventHandlers {
class All {
class ADDONnu {
clientGetOut = QUOTE( if (_this select 2 == ACE_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1});
};
};
};

View File

@ -3,9 +3,9 @@
#define VSPACE 0.5-0.3/9/2 #define VSPACE 0.5-0.3/9/2
class RscStructuredText; class RscStructuredText;
class AGM_Interaction_Button_Base { class ACE_Interaction_Button_Base {
tooltip = ""; tooltip = "";
//action = "AGM_Interaction_isMousePressed = true;(findDisplay 1713999) closeDisplay 1;_action = AGM_Interaction_Buttons select AGM_Interaction_SelectedButton;AGM_Interaction_SelectedButton = -1; if (call (_action select 2)) then {call (_action select 1)};"; //action = "ACE_Interaction_isMousePressed = true;(findDisplay 1713999) closeDisplay 1;_action = ACE_Interaction_Buttons select ACE_Interaction_SelectedButton;ACE_Interaction_SelectedButton = -1; if (call (_action select 2)) then {call (_action select 1)};";
action = ""; action = "";
idc = -1; idc = -1;
@ -46,14 +46,14 @@ class AGM_Interaction_Button_Base {
#define ICON_BORDER 0.05 #define ICON_BORDER 0.05
// Old command rose // Old command rose
class AGM_Interaction_Dialog { class ACE_Interaction_Dialog {
idd = 1713999; idd = 1713999;
enableSimulation = 1; enableSimulation = 1;
movingEnable = 0; movingEnable = 0;
onLoad = "_dlgInteractionDialog = _this select 0; for '_a' from 10 to 19 do {(_dlgInteractionDialog displayCtrl _a) ctrlShow false}; uiNamespace setVariable ['AGM_Interaction_Dialog', _dlgInteractionDialog];"; onLoad = "_dlgInteractionDialog = _this select 0; for '_a' from 10 to 19 do {(_dlgInteractionDialog displayCtrl _a) ctrlShow false}; uiNamespace setVariable ['ACE_Interaction_Dialog', _dlgInteractionDialog];";
objects[] = {}; objects[] = {};
class controls { class controls {
class Interaction_BackgroundMain: AGM_Interaction_Button_Base { class Interaction_BackgroundMain: ACE_Interaction_Button_Base {
type = 0; type = 0;
style = 2; style = 2;
idc = 2; idc = 2;
@ -65,8 +65,8 @@ class AGM_Interaction_Dialog {
h = "0.55 / 9 * safezoneH"; h = "0.55 / 9 * safezoneH";
}; };
class Interaction_ButtonMain: AGM_Interaction_Button_Base { class Interaction_ButtonMain: ACE_Interaction_Button_Base {
action = "-1 call AGM_Interaction_fnc_onClick;"; action = "-1 call ACE_Interaction_fnc_onClick;";
style = 2; style = 2;
tooltip = ""; tooltip = "";
text = "Interaction Menu"; text = "Interaction Menu";
@ -82,7 +82,7 @@ class AGM_Interaction_Dialog {
h = "0.55 / 9 * safezoneH"; h = "0.55 / 9 * safezoneH";
}; };
class Interaction_Background0: AGM_Interaction_Button_Base { class Interaction_Background0: ACE_Interaction_Button_Base {
type = 0; type = 0;
style = 2; style = 2;
idc = 40; idc = 40;
@ -157,7 +157,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Icon0: AGM_Interaction_Button_Base { class Interaction_Icon0: ACE_Interaction_Button_Base {
tooltip = ""; tooltip = "";
text = ""; text = "";
idc = 20; idc = 20;
@ -233,7 +233,7 @@ class AGM_Interaction_Dialog {
h = (0.3-ICON_BORDER) / 9 * safezoneH; h = (0.3-ICON_BORDER) / 9 * safezoneH;
}; };
class Interaction_Shortcut0: AGM_Interaction_Button_Base { class Interaction_Shortcut0: ACE_Interaction_Button_Base {
tooltip = ""; tooltip = "";
text = ""; text = "";
idc = 30; idc = 30;
@ -317,8 +317,8 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button0: AGM_Interaction_Button_Base { class Interaction_Button0: ACE_Interaction_Button_Base {
action = "0 call AGM_Interaction_fnc_onClick;"; action = "0 call ACE_Interaction_fnc_onClick;";
style = 2; style = 2;
tooltip = ""; tooltip = "";
text = ""; text = "";
@ -333,7 +333,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button1: Interaction_Button0 { class Interaction_Button1: Interaction_Button0 {
action = "1 call AGM_Interaction_fnc_onClick;"; action = "1 call ACE_Interaction_fnc_onClick;";
idc = 11; idc = 11;
x = "(0.5-2.0/16/2 + 1.0 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 + 1.0 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 - 1.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 - 1.5 * 0.04) * safezoneH + safezoneY";
@ -341,7 +341,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button2: Interaction_Button0 { class Interaction_Button2: Interaction_Button0 {
action = "2 call AGM_Interaction_fnc_onClick;"; action = "2 call ACE_Interaction_fnc_onClick;";
idc = 12; idc = 12;
x = "(0.5-2.0/16/2 + 1.25 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 + 1.25 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 - 0.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 - 0.5 * 0.04) * safezoneH + safezoneY";
@ -349,7 +349,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button3: Interaction_Button0 { class Interaction_Button3: Interaction_Button0 {
action = "3 call AGM_Interaction_fnc_onClick;"; action = "3 call ACE_Interaction_fnc_onClick;";
idc = 13; idc = 13;
x = "(0.5-2.0/16/2 + 1.25 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 + 1.25 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 + 0.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 + 0.5 * 0.04) * safezoneH + safezoneY";
@ -357,7 +357,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button4: Interaction_Button0 { class Interaction_Button4: Interaction_Button0 {
action = "4 call AGM_Interaction_fnc_onClick;"; action = "4 call ACE_Interaction_fnc_onClick;";
idc = 14; idc = 14;
x = "(0.5-2.0/16/2 + 1.0 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 + 1.0 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 + 1.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 + 1.5 * 0.04) * safezoneH + safezoneY";
@ -365,7 +365,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button5: Interaction_Button0 { class Interaction_Button5: Interaction_Button0 {
action = "5 call AGM_Interaction_fnc_onClick;"; action = "5 call ACE_Interaction_fnc_onClick;";
idc = 15; idc = 15;
x = "(0.5-2.0/16/2 + 0 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 + 0 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 + 2.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 + 2.5 * 0.04) * safezoneH + safezoneY";
@ -373,7 +373,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button6: Interaction_Button0 { class Interaction_Button6: Interaction_Button0 {
action = "6 call AGM_Interaction_fnc_onClick;"; action = "6 call ACE_Interaction_fnc_onClick;";
idc = 16; idc = 16;
x = "(0.5-2.0/16/2 - 1.0 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 - 1.0 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 + 1.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 + 1.5 * 0.04) * safezoneH + safezoneY";
@ -381,7 +381,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button7: Interaction_Button0 { class Interaction_Button7: Interaction_Button0 {
action = "7 call AGM_Interaction_fnc_onClick;"; action = "7 call ACE_Interaction_fnc_onClick;";
idc = 17; idc = 17;
x = "(0.5-2.0/16/2 - 1.25 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 - 1.25 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 + 0.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 + 0.5 * 0.04) * safezoneH + safezoneY";
@ -389,7 +389,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button8: Interaction_Button0 { class Interaction_Button8: Interaction_Button0 {
action = "8 call AGM_Interaction_fnc_onClick;"; action = "8 call ACE_Interaction_fnc_onClick;";
idc = 18; idc = 18;
x = "(0.5-2.0/16/2 - 1.25 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 - 1.25 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 - 0.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 - 0.5 * 0.04) * safezoneH + safezoneY";
@ -397,7 +397,7 @@ class AGM_Interaction_Dialog {
h = "0.3 / 9 * safezoneH"; h = "0.3 / 9 * safezoneH";
}; };
class Interaction_Button9: Interaction_Button0 { class Interaction_Button9: Interaction_Button0 {
action = "9 call AGM_Interaction_fnc_onClick;"; action = "9 call ACE_Interaction_fnc_onClick;";
idc = 19; idc = 19;
x = "(0.5-2.0/16/2 - 1.0 * 0.1) * safezoneW + safezoneX"; x = "(0.5-2.0/16/2 - 1.0 * 0.1) * safezoneW + safezoneX";
y = "(0.5-0.3/9/2 - 1.5 * 0.04) * safezoneH + safezoneY"; y = "(0.5-0.3/9/2 - 1.5 * 0.04) * safezoneH + safezoneY";
@ -412,7 +412,7 @@ class IGUIBack;
class RscText; class RscText;
#define X_OFFSET 0.2 #define X_OFFSET 0.2
class RscAGM_SelectAnItem { class RscACE_SelectAnItem {
idd = 8854; idd = 8854;
movingEnable = 0; movingEnable = 0;
class controls { class controls {
@ -433,7 +433,7 @@ class RscAGM_SelectAnItem {
text = ""; text = "";
}; };
class itemList:RscListBox { class itemList:RscListBox {
onMouseButtonDblClick = "_this call AGM_Interaction_fnc_onSelectMenuDblClick"; onMouseButtonDblClick = "_this call ACE_Interaction_fnc_onSelectMenuDblClick";
idc = 8866; idc = 8866;
x = X_OFFSET + 0.005; x = X_OFFSET + 0.005;
w = 0.59; w = 0.59;
@ -441,7 +441,7 @@ class RscAGM_SelectAnItem {
y = 0.06; y = 0.06;
}; };
class cancelBtnBackground: AGM_Interaction_Button_Base { class cancelBtnBackground: ACE_Interaction_Button_Base {
type = 0; type = 0;
style = 2; style = 2;
idc = -1; idc = -1;
@ -452,7 +452,7 @@ class RscAGM_SelectAnItem {
h = 0.1; h = 0.1;
y = 0.605; y = 0.605;
}; };
class approveBtnBackground: AGM_Interaction_Button_Base { class approveBtnBackground: ACE_Interaction_Button_Base {
type = 0; type = 0;
style = 2; style = 2;
idc = -1; idc = -1;
@ -464,29 +464,29 @@ class RscAGM_SelectAnItem {
w = 0.15; w = 0.15;
}; };
class cancelBtn: AGM_Interaction_Button_Base { class cancelBtn: ACE_Interaction_Button_Base {
idc = 8855; idc = 8855;
x = X_OFFSET + 0.005; x = X_OFFSET + 0.005;
w = 0.15; w = 0.15;
h = 0.1; h = 0.1;
y = 0.605; y = 0.605;
style = 2; style = 2;
text = $STR_AGM_Interaction_Back; //$STR_AGM_Interaction_CancelSelection; text = $STR_ACE_Interaction_Back; //$STR_ACE_Interaction_CancelSelection;
action = "call AGM_Interaction_fnc_hideMenu;"; //'Default' call AGM_Interaction_fnc_openMenu; 'Default' call AGM_Interaction_fnc_openMenuSelf; action = "call ACE_Interaction_fnc_hideMenu;"; //'Default' call ACE_Interaction_fnc_openMenu; 'Default' call ACE_Interaction_fnc_openMenuSelf;
colorBackground[] = {0,0,0,0}; colorBackground[] = {0,0,0,0};
colorBackgroundDisabled[] = {0,0,0,0}; colorBackgroundDisabled[] = {0,0,0,0};
colorBackgroundActive[] = {1,1,1,0.2}; colorBackgroundActive[] = {1,1,1,0.2};
colorFocused[] = {0,0,0,0}; colorFocused[] = {0,0,0,0};
}; };
class approveBtn: AGM_Interaction_Button_Base { class approveBtn: ACE_Interaction_Button_Base {
idc = 8860; idc = 8860;
x = X_OFFSET + 0.445; x = X_OFFSET + 0.445;
y = 0.605; y = 0.605;
h = 0.1; h = 0.1;
w = 0.15; w = 0.15;
style = 2; style = 2;
text = $STR_AGM_Interaction_MakeSelection; text = $STR_ACE_Interaction_MakeSelection;
action = "call AGM_Interaction_fnc_hideMenu;"; action = "call ACE_Interaction_fnc_hideMenu;";
colorBackground[] = {0,0,0,0}; colorBackground[] = {0,0,0,0};
colorBackgroundDisabled[] = {0,0,0,0}; colorBackgroundDisabled[] = {0,0,0,0};
colorBackgroundActive[] = {1,1,1,0.2}; colorBackgroundActive[] = {1,1,1,0.2};
@ -518,19 +518,19 @@ class RscInteractionText: RscText{
h = 1.5 * GUI_GRID_H; h = 1.5 * GUI_GRID_H;
}; };
class RscTitles { class RscTitles {
class AGM_FlowMenu { class ACE_FlowMenu {
idd = 9920; idd = 9920;
enableSimulation = 1; enableSimulation = 1;
movingEnable = 0; movingEnable = 0;
fadeIn=0.5; fadeIn=0.5;
fadeOut=0.5; fadeOut=0.5;
duration = 10e10; duration = 10e10;
onLoad = "uiNamespace setVariable ['AGM_Flow_Display', _this select 0];"; onLoad = "uiNamespace setVariable ['ACE_Flow_Display', _this select 0];";
class controls { class controls {
class RearIcon: RscInteractionIcon{ class RearIcon: RscInteractionIcon{
idc = 999; idc = 999;
text = "AGM_interaction\UI\CenterIcon_ca.paa"; text = "ACE_interaction\UI\CenterIcon_ca.paa";
x = 17.9 * GUI_GRID_W; x = 17.9 * GUI_GRID_W;
y = 10 * GUI_GRID_H; y = 10 * GUI_GRID_H;
w = 3.7 * GUI_GRID_H; w = 3.7 * GUI_GRID_H;
@ -570,7 +570,7 @@ class RscTitles {
}; };
class BackIcon: RscInteractionIcon{ class BackIcon: RscInteractionIcon{
idc = 1210; idc = 1210;
text = "AGM_interaction\UI\backArrow_ca.paa"; text = "ACE_interaction\UI\backArrow_ca.paa";
x = 18.25 * GUI_GRID_W; x = 18.25 * GUI_GRID_W;
y = 12.69 * GUI_GRID_H; y = 12.69 * GUI_GRID_H;
w = 0.5 * GUI_GRID_W; w = 0.5 * GUI_GRID_W;
@ -587,45 +587,45 @@ class RscTitles {
}; };
}; };
}; };
class AGM_InteractionHelper { class ACE_InteractionHelper {
idd = 9930; idd = 9930;
enableSimulation = 1; enableSimulation = 1;
movingEnable = 0; movingEnable = 0;
fadeIn=0.5; fadeIn=0.5;
fadeOut=0.5; fadeOut=0.5;
duration = 10e10; duration = 10e10;
onLoad = "uiNamespace setVariable ['AGM_Helper_Display', _this select 0];"; onLoad = "uiNamespace setVariable ['ACE_Helper_Display', _this select 0];";
class controls { class controls {
class SelectIcon: RscInteractionHelperIcon{ class SelectIcon: RscInteractionHelperIcon{
idc = 1200; idc = 1200;
text = "AGM_interaction\UI\mouse_left_ca.paa"; text = "ACE_interaction\UI\mouse_left_ca.paa";
y = 17.5 * GUI_GRID_H; y = 17.5 * GUI_GRID_H;
}; };
class SelectText: RscInteractionText{ class SelectText: RscInteractionText{
idc = 1000; idc = 1000;
y = 17 * GUI_GRID_H; y = 17 * GUI_GRID_H;
text = $STR_AGM_Interaction_MakeSelection; text = $STR_ACE_Interaction_MakeSelection;
}; };
class GoBackIcon: RscInteractionHelperIcon{ class GoBackIcon: RscInteractionHelperIcon{
idc = 1201; idc = 1201;
text = "AGM_interaction\UI\mouse_right_ca.paa"; text = "ACE_interaction\UI\mouse_right_ca.paa";
y = 19.5 * GUI_GRID_H; y = 19.5 * GUI_GRID_H;
}; };
class GoBackText: RscInteractionText{ class GoBackText: RscInteractionText{
idc = 1001; idc = 1001;
y = 19 * GUI_GRID_H; y = 19 * GUI_GRID_H;
text = $STR_AGM_Interaction_Back; text = $STR_ACE_Interaction_Back;
}; };
class ScrollIcon: RscInteractionHelperIcon{ class ScrollIcon: RscInteractionHelperIcon{
idc = 1202; idc = 1202;
text = "AGM_interaction\UI\mouse_scroll_ca.paa"; text = "ACE_interaction\UI\mouse_scroll_ca.paa";
y = 18.5 * GUI_GRID_H; y = 18.5 * GUI_GRID_H;
}; };
class ScrollText: RscInteractionText{ class ScrollText: RscInteractionText{
idc = 1002; idc = 1002;
y = 18 * GUI_GRID_H; y = 18 * GUI_GRID_H;
text = $STR_AGM_Interaction_ScrollHint; text = $STR_ACE_Interaction_ScrollHint;
}; };
}; };
}; };

View File

@ -1,12 +1,13 @@
// by commy2 and CAA-Picard // by commy2 and CAA-Picard
#include "script_component.hpp"
if (!hasInterface) exitWith {}; if (!hasInterface) exitWith {};
AGM_Interaction_isOpeningDoor = false; GVAR(isOpeningDoor) = false;
AGM_Dancing = false;
// restore global fire teams for JIP // restore global fire teams for JIP
{ {
_team = _x getVariable ["AGM_assignedFireTeam", ""]; _team = _x getVariable [QGVAR(assignedFireTeam), ""];
if (_team != "") then {_x assignTeam _team}; if (_team != "") then {_x assignTeam _team};
} forEach allUnits; } forEach allUnits;

View File

@ -0,0 +1,46 @@
#include "script_component.hpp"
PREP(addInteraction);
PREP(addInteractionSelf);
PREP(AddSelectableItem);
PREP(addToTooltip);
PREP(applyButtons);
PREP(canInteractWith);
PREP(canTapShoulder);
PREP(getActions2);
PREP(GetActions);
PREP(getDoor);
PREP(getDoorAnimations);
PREP(getDown);
PREP(getSelectedButton);
PREP(hideMenu);
PREP(hideMouseHint);
PREP(initialiseInteraction);
PREP(isInRange);
PREP(joinTeam);
PREP(menuKeyInput);
PREP(moduleInteraction);
PREP(moveDown);
PREP(onButtonDown);
PREP(onButtonDownSelf);
PREP(onButtonUp);
PREP(onClick);
PREP(onSelectMenuDblClick);
PREP(openDoor);
PREP(openMenu);
PREP(openMenuSelectUI);
PREP(openMenuSelf);
PREP(openSelectMenu);
PREP(openSubMenu);
PREP(openSubMenuSelf);
PREP(prepareSelectMenu);
PREP(push);
PREP(removeInteraction);
PREP(removeInteractionSelf);
PREP(removeTag);
PREP(sendAway);
PREP(showMenu);
PREP(showMouseHint);
PREP(sortOptionsByPriority);
PREP(tapShoulder);
PREP(updateTooltipPosition);

View File

@ -1,9 +1,11 @@
#include "script_component.hpp"
class CfgPatches { class CfgPatches {
class AGM_Interaction { class ADDON {
units[] = {}; units[] = {};
weapons[] = {}; weapons[] = {};
requiredVersion = 0.60; requiredVersion = 0.60;
requiredAddons[] = {AGM_Core}; requiredAddons[] = {ACE_Core};
version = "0.95"; version = "0.95";
versionStr = "0.95"; versionStr = "0.95";
versionAr[] = {0,95,0}; versionAr[] = {0,95,0};
@ -12,157 +14,60 @@ class CfgPatches {
}; };
}; };
class CfgFunctions { #include "CfgEventHandlers.hpp"
class AGM_Interaction {
class AGM_Interaction {
file = "\AGM_interaction\functions";
class addInteraction;
class addInteractionSelf;
class AddSelectableItem;
class addToTooltip;
class applyButtons;
class canInteractWith;
class canLockDoor;
class canTapShoulder;
class getActions2;
class GetActions;
class getDoor;
class getDoorAnimations;
class getDown;
class getSelectedButton;
class hideMenu;
class hideMouseHint;
class initialiseInteraction;
class isInRange;
class joinTeam;
class lockDoor;
class menuKeyInput;
class moduleInteraction;
class moveDown;
class onButtonDown;
class onButtonDownSelf;
class onButtonUp;
class onClick;
class onSelectMenuDblClick;
class openDoor;
class openMenu;
class openMenuSelectUI;
class openMenuSelf;
class openSelectMenu;
class openSubMenu;
class openSubMenuSelf;
class prepareSelectMenu;
class push;
class removeInteraction;
class removeInteractionSelf;
class removeTag;
class sendAway;
class showMenu;
class showMouseHint;
class sortOptionsByPriority;
class tapShoulder;
class updateTooltipPosition;
// backwards compatibility, remove in some patches class ACE_Core_Default_Keys {
class getCaptivityStatus;
class setCaptivityStatus;
};
};
};
class Extended_PostInit_EventHandlers {
class AGM_Interaction {
clientInit = "call compile preprocessFileLineNumbers '\AGM_Interaction\clientInit.sqf'";
};
};
class Extended_GetIn_EventHandlers {
class All {
class AGM_AutoCloseMenu {
clientGetIn = "if (_this select 2 == AGM_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1}";
};
};
};
class Extended_GetOut_EventHandlers {
class All {
class AGM_AutoCloseMenu {
clientGetOut = "if (_this select 2 == AGM_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1}";
};
};
};
class AGM_Core_Default_Keys {
class openInteractionMenuNew { class openInteractionMenuNew {
displayName = "$STR_AGM_Interaction_InteractionMenu"; displayName = "$STR_ACE_Interaction_InteractionMenu";
condition = "true"; condition = "true";
statement = "call AGM_Interaction_fnc_onButtonDown"; statement = QUOTE( call FUNC(onButtonDown) );
conditionUp = "!isNull (findDisplay 1713999) && {profileNamespace getVariable ['AGM_Interaction_AutoCloseMenu', false]}"; conditionUp = QUOTE( !isNull (findDisplay 1713999) && {profileNamespace getVariable [QUOTE(QGVAR(AutoCloseMenu)), false]} );
statementUp = "if (AGM_Interaction_MenuType mod 2 == 0) then {call AGM_Interaction_fnc_onButtonUp};"; statementUp = QUOTE( if (GVAR(MenuType) mod 2 == 0) then {call FUNC(onButtonUp)}; );
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Medical_canTreat", "AGM_Interaction_isNotEscorting", "AGM_Interaction_isNotSwimming"}; exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"};
key = 219; key = 219;
shift = 0; shift = 0;
control = 0; control = 0;
alt = 0; alt = 0;
}; };
class openInteractionMenuSelfNew { class openInteractionMenuSelfNew {
displayName = "$STR_AGM_Interaction_InteractionMenuSelf"; displayName = "$STR_ACE_Interaction_InteractionMenuSelf";
condition = "true"; condition = "true";
statement = "call AGM_Interaction_fnc_onButtonDownSelf"; statement = QUOTE( call FUNC(onButtonDownSelf) );
conditionUp = "!isNull (findDisplay 1713999) && {profileNamespace getVariable ['AGM_Interaction_AutoCloseMenu', false]}"; conditionUp = QUOTE( !isNull (findDisplay 1713999) && {profileNamespace getVariable [QUOTE(QGVAR(AutoCloseMenu)), false]} );
statementUp = "if (AGM_Interaction_MenuType mod 2 == 1) then {call AGM_Interaction_fnc_onButtonUp};"; statementUp = QUOTE( if (EGVAR(interaction,MenuType) mod 2 == 1) then {call FUNC(onButtonUp)}; );
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Medical_canTreat", "AGM_Interaction_isNotEscorting", "AGM_Interaction_isNotSwimming", "AGM_Core_notOnMap"}; exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming", "ACE_Core_notOnMap"};
key = 219; key = 219;
shift = 0; shift = 0;
control = 1; control = 1;
alt = 0; alt = 0;
}; };
class openDoor { class openDoor {
displayName = "$STR_AGM_Interaction_OpenDoor"; displayName = "$STR_ACE_Interaction_OpenDoor";
condition = "!AGM_Interaction_isOpeningDoor && {[2] call AGM_Interaction_fnc_getDoor select 1 != ''}"; condition = QUOTE( !GVAR(isOpeningDoor) && {[2] call FUNC(getDoor) select 1 != ''} );
statement = "call AGM_Interaction_fnc_openDoor"; statement = QUOTE( call ACE_Interaction_fnc_openDoor );
conditionUp = "AGM_Interaction_isOpeningDoor"; conditionUp = QUOTE( GVAR(isOpeningDoor) );
statementUp = "AGM_Interaction_isOpeningDoor = false"; statementUp = QUOTE( GVAR(isOpeningDoor) = false;);
key = 57; key = 57;
shift = 0; shift = 0;
control = 1; control = 1;
alt = 0; alt = 0;
}; };
// disabled for now
/*class lockDoor {
displayName = "$STR_AGM_Interaction_LockDoor";
condition = "[true] call AGM_Interaction_fnc_canLockDoor && {!AGM_Interaction_isOpeningDoor}";
statement = "[true] call AGM_Interaction_fnc_lockDoor";
key = 57;
shift = 0;
control = 0;
alt = 1;
};
class unlockDoor {
displayName = "$STR_AGM_Interaction_UnlockDoor";
condition = "[false] call AGM_Interaction_fnc_canLockDoor";
statement = "[false] call AGM_Interaction_fnc_lockDoor";
key = 57;
shift = 0;
control = 1;
alt = 1;
};*/
class tapShoulder { class tapShoulder {
displayName = "$STR_AGM_Interaction_TapShoulder"; displayName = "$STR_ACE_Interaction_TapShoulder";
condition = "[_player, cursorTarget] call AGM_Interaction_fnc_canTapShoulder"; condition = QUOTE( [_player, cursorTarget] call FUNC(canTapShoulder) );
statement = "[_player, cursorTarget] call AGM_Interaction_fnc_tapShoulder"; statement = QUOTE( [_player, cursorTarget] call FUNC(tapShoulder); );
key = 20; key = 20;
shift = 1; shift = 1;
control = 0; control = 0;
alt = 0; alt = 0;
}; };
class modifierKey { class modifierKey {
displayName = "$STR_AGM_Interaction_ModifierKey"; displayName = "$STR_ACE_Interaction_ModifierKey";
condition = ""; condition = "";
statement = "AGM_Modifier = 1;"; statement = QUOTE( GVAR(Modifier) = 1; );
conditionUp = ""; conditionUp = "";
statementUp = "AGM_Modifier = 0;"; statementUp = QUOTE( GVAR(Modifier) = 0; );
exceptions[] = {"AGM_Drag_isNotDragging"}; exceptions[] = {"ACE_Drag_isNotDragging"};
key = 29; key = 29;
shift = 0; shift = 0;
control = 0; control = 0;
@ -170,40 +75,40 @@ class AGM_Core_Default_Keys {
}; };
}; };
class AGM_Core_Options { class ACE_Core_Options {
class Interaction_FlowMenu { class Interaction_FlowMenu {
displayName = "$STR_AGM_Interaction_FlowMenu"; displayName = "$STR_ACE_Interaction_FlowMenu";
default = 0; default = 0;
}; };
class Interaction_AutoCloseMenu { class Interaction_AutoCloseMenu {
displayName = "$STR_AGM_Interaction_AutoCloseMenu"; displayName = "$STR_ACE_Interaction_AutoCloseMenu";
default = 0; default = 0;
}; };
class Interaction_AutoCenterCursor { class Interaction_AutoCenterCursor {
displayName = "$STR_AGM_Interaction_AutoCenterCursor"; displayName = "$STR_ACE_Interaction_AutoCenterCursor";
default = 1; default = 1;
}; };
}; };
class AGM_Parameters { class ACE_Parameters {
AGM_Modifier = 0; ACE_Modifier = 0;
}; };
class AGM_Parameters_Boolean { class ACE_Parameters_Boolean {
AGM_Interaction_EnableTeamManagement = 1; ACE_Interaction_EnableTeamManagement = 1;
}; };
class AGM_Core_canInteractConditions { class ACE_Core_canInteractConditions {
class AGM_Interaction_isNotEscorting { class ACE_Interaction_isNotEscorting {
condition = "!(_player getVariable ['AGM_isEscorting', false])"; condition = QUOTE( !(_player getVariable ['ACE_isEscorting', false]) );
}; };
class AGM_Interaction_isNotCaptive { class ACE_Interaction_isNotCaptive {
condition = "!(_player getVariable ['AGM_isCaptive', false])"; condition = QUOTE( !(_player getVariable ['ACE_isCaptive', false]) );
}; };
class AGM_Interaction_isNotSurrendering { class ACE_Interaction_isNotSurrendering {
condition = "!(_player getVariable ['AGM_isSurrender', false])"; condition = QUOTE( !(_player getVariable ['ACE_isSurrender', false]) );
}; };
class AGM_Interaction_isNotSwimming { class ACE_Interaction_isNotSwimming {
condition = "!underwater _player"; condition = QUOTE( !underwater _player );
}; };
}; };
@ -215,14 +120,14 @@ class AGM_Core_canInteractConditions {
class CfgVehicles { class CfgVehicles {
class Module_F; class Module_F;
class AGM_ModuleInteraction: Module_F { class ACE_ModuleInteraction: Module_F {
author = "$STR_AGM_Core_AGMTeam"; author = "$STR_ACE_Core_ACETeam";
category = "AGM"; category = "ACE";
displayName = "Interaction System"; displayName = "Interaction System";
function = "AGM_Interaction_fnc_moduleInteraction"; function = "ACE_Interaction_fnc_moduleInteraction";
scope = 2; scope = 2;
isGlobal = 1; isGlobal = 1;
icon = "\AGM_Interaction\UI\IconInteraction_ca.paa"; icon = PATHTOF(UI\IconInteraction_ca.paa);
class Arguments { class Arguments {
class EnableTeamManagement { class EnableTeamManagement {
displayName = "Enable Team Management"; displayName = "Enable Team Management";
@ -238,327 +143,327 @@ class CfgVehicles {
class Man; class Man;
class CAManBase: Man { class CAManBase: Man {
class AGM_Actions { class ACE_Actions {
class AGM_TeamManagement { class ACE_TeamManagement {
displayName = "$STR_AGM_Interaction_TeamManagement"; displayName = "$STR_ACE_Interaction_TeamManagement";
distance = 4; distance = 4;
condition = "alive _target && {!isPlayer _target} && {_target in units group _player} && {AGM_Interaction_EnableTeamManagement}"; condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} && {GVAR(EnableTeamManagement)} );
statement = ""; statement = "";
showDisabled = 0; showDisabled = 0;
priority = 3.2; priority = 3.2;
icon = "\AGM_Interaction\UI\team\team_management_ca.paa"; icon = PATHOF(UI\team\team_management_ca.paa);
subMenu[] = {"AGM_TeamManagement", 0}; subMenu[] = {"ACE_TeamManagement", 0};
hotkey = "M"; hotkey = "M";
enableInside = 1; enableInside = 1;
class AGM_JoinTeamRed { class ACE_JoinTeamRed {
displayName = "$STR_AGM_Interaction_JoinTeamRed"; displayName = "$STR_ACE_Interaction_JoinTeamRed";
distance = 4; distance = 4;
condition = "alive _target && {!isPlayer _target} && {_target in units group _player}"; condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} );
statement = "[_target, 'RED'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_target, 'RED'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
icon = "\AGM_Interaction\UI\team\team_red_ca.paa"; icon = PATHOF(UI\team\team_red_ca.paa);
priority = 2.4; priority = 2.4;
hotkey = "R"; hotkey = "R";
enableInside = 1; enableInside = 1;
}; };
class AGM_JoinTeamGreen { class ACE_JoinTeamGreen {
displayName = "$STR_AGM_Interaction_JoinTeamGreen"; displayName = "$STR_ACE_Interaction_JoinTeamGreen";
distance = 4; distance = 4;
condition = "alive _target && {!isPlayer _target} && {_target in units group _player}"; condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} );
statement = "[_target, 'GREEN'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_target, 'GREEN'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
icon = "\AGM_Interaction\UI\team\team_green_ca.paa"; icon = PATHOF(UI\team\team_green_ca.paa);
priority = 2.3; priority = 2.3;
hotkey = "G"; hotkey = "G";
enableInside = 1; enableInside = 1;
}; };
class AGM_JoinTeamBlue { class ACE_JoinTeamBlue {
displayName = "$STR_AGM_Interaction_JoinTeamBlue"; displayName = "$STR_ACE_Interaction_JoinTeamBlue";
distance = 4; distance = 4;
condition = "alive _target && {!isPlayer _target} && {_target in units group _player}"; condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} );
statement = "[_target, 'BLUE'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_target, 'BLUE'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
icon = "\AGM_Interaction\UI\team\team_blue_ca.paa"; icon = PATHOF(UI\team\team_blue_ca.paa);
priority = 2.2; priority = 2.2;
hotkey = "B"; hotkey = "B";
enableInside = 1; enableInside = 1;
}; };
class AGM_JoinTeamYellow { class ACE_JoinTeamYellow {
displayName = "$STR_AGM_Interaction_JoinTeamYellow"; displayName = "$STR_ACE_Interaction_JoinTeamYellow";
distance = 4; distance = 4;
condition = "alive _target && {!isPlayer _target} && {_target in units group _player}"; condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} );
statement = "[_target, 'YELLOW'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_target, 'YELLOW'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
icon = "\AGM_Interaction\UI\team\team_yellow_ca.paa"; icon = PATHOF(UI\team\team_yellow_ca.paa);
priority = 2.1; priority = 2.1;
hotkey = "Y"; hotkey = "Y";
enableInside = 1; enableInside = 1;
}; };
class AGM_LeaveTeam { class ACE_LeaveTeam {
displayName = "$STR_AGM_Interaction_LeaveTeam"; displayName = "$STR_ACE_Interaction_LeaveTeam";
distance = 4; distance = 4;
condition = "alive _target && {!isPlayer _target} && {_target in units group _player} && {assignedTeam _player != 'MAIN'}"; condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} && {assignedTeam _player != 'MAIN'} );
statement = "[_target, 'MAIN'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_target, 'MAIN'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
icon = "\AGM_Interaction\UI\team\team_white_ca.paa"; icon = PATHOF(UI\team\team_white_ca.paa);
priority = 2.5; priority = 2.5;
hotkey = "N"; hotkey = "N";
enableInside = 1; enableInside = 1;
}; };
}; };
class AGM_TapShoulder { class ACE_TapShoulder {
displayName = "$STR_AGM_Interaction_TapShoulder"; displayName = "$STR_ACE_Interaction_TapShoulder";
distance = 4; distance = 4;
condition = "[_player, _target] call AGM_Interaction_fnc_canTapShoulder"; condition = QUOTE( [_player, _target] call FUNC(canTapShoulder) );
statement = "[_player, _target] call AGM_Interaction_fnc_tapShoulder"; statement = QUOTE( [_player, _target] call FUNC(tapShoulder) );
showDisabled = 1; showDisabled = 1;
priority = 2.8; priority = 2.8;
hotkey = "Q"; hotkey = "Q";
enableInside = 1; enableInside = 1;
}; };
class AGM_JoinGroup { class ACE_JoinGroup {
displayName = "$STR_AGM_Interaction_JoinGroup"; displayName = "$STR_ACE_Interaction_JoinGroup";
distance = 4; distance = 4;
condition = "side group _player == side group _target && {group _player != group _target}"; condition = QUOTE( side group _player == side group _target && {group _player != group _target} );
statement = "[_player] joinSilent group _target;"; statement = QUOTE( [_player] joinSilent group _target; );
showDisabled = 0; showDisabled = 0;
priority = 2.6; priority = 2.6;
icon = "\AGM_Interaction\UI\team\team_management_ca.paa"; icon = PATHOF(UI\team\team_management_ca.paa);
hotkey = "J"; hotkey = "J";
enableInside = 1; enableInside = 1;
}; };
class AGM_GetDown { class ACE_GetDown {
displayName = "$STR_AGM_Interaction_GetDown"; displayName = "$STR_ACE_Interaction_GetDown";
distance = 4; distance = 4;
condition = "[_target] call AGM_Interaction_fnc_canInteractWith"; condition = QUOTE( [_target] call FUNC(canInteractWith) );
statement = "[_target] call AGM_Interaction_fnc_getDown"; statement = QUOTE( [_target] call FUNC(getDown) );
showDisabled = 0; showDisabled = 0;
priority = 2.2; priority = 2.2;
}; };
class AGM_SendAway { class ACE_SendAway {
displayName = "$STR_AGM_Interaction_SendAway"; displayName = "$STR_ACE_Interaction_SendAway";
distance = 4; distance = 4;
condition = "[_target] call AGM_Interaction_fnc_canInteractWith"; condition = QUOTE( [_target] call FUNC(canInteractWith) );
statement = "[_target] call AGM_Interaction_fnc_sendAway"; statement = QUOTE( [_target] call FUNC(sendAway) );
showDisabled = 0; showDisabled = 0;
priority = 2.0; priority = 2.0;
}; };
class AGM_Pardon { class ACE_Pardon {
displayName = "$STR_AGM_Interaction_Pardon"; displayName = "$STR_ACE_Interaction_Pardon";
distance = 4; distance = 4;
condition = "rating _target < -2000 && {alive _target} && {side group _player == side group _target}"; condition = QUOTE( rating _target < -2000 && {alive _target} && {side group _player == side group _target} );
statement = "[_target, '{_this addRating -rating _this}', _target] call AGM_Core_fnc_execRemoteFnc"; statement = QUOTE( [_target, '{_this addRating -rating _this}', _target] call EFUNC(core,execRemoteFnc) );
showDisabled = 0; showDisabled = 0;
priority = 2.5; priority = 2.5;
enableInside = 1; enableInside = 1;
}; };
}; };
class AGM_SelfActions { class ACE_SelfActions {
class AGM_TeamManagement { class ACE_TeamManagement {
displayName = "$STR_AGM_Interaction_TeamManagement"; displayName = "$STR_ACE_Interaction_TeamManagement";
condition = "AGM_Interaction_EnableTeamManagement"; condition = QUOTE( GVAR(EnableTeamManagement) );
statement = ""; statement = "";
showDisabled = 1; showDisabled = 1;
priority = 3.2; priority = 3.2;
icon = "\AGM_Interaction\UI\team\team_management_ca.paa"; icon = PATHOF(UI\team\team_management_ca.paa);
subMenu[] = {"AGM_TeamManagement", 1}; subMenu[] = {"ACE_TeamManagement", 1};
enableInside = 1; enableInside = 1;
hotkey = "M"; hotkey = "M";
class AGM_JoinTeamRed { class ACE_JoinTeamRed {
displayName = "$STR_AGM_Interaction_JoinTeamRed"; displayName = "$STR_ACE_Interaction_JoinTeamRed";
condition = "true"; condition = QUOTE( true );
statement = "[_player, 'RED'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_player, 'RED'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
priority = 2.4; priority = 2.4;
icon = "\AGM_Interaction\UI\team\team_red_ca.paa"; icon = PATHOF(UI\team\team_red_ca.paa);
enableInside = 1; enableInside = 1;
hotkey = "R"; hotkey = "R";
}; };
class AGM_JoinTeamGreen { class ACE_JoinTeamGreen {
displayName = "$STR_AGM_Interaction_JoinTeamGreen"; displayName = "$STR_ACE_Interaction_JoinTeamGreen";
condition = "true"; condition = QUOTE( true );
statement = "[_player, 'GREEN'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_player, 'GREEN'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
priority = 2.3; priority = 2.3;
icon = "\AGM_Interaction\UI\team\team_green_ca.paa"; icon = PATHOF(UI\team\team_green_ca.paa);
enableInside = 1; enableInside = 1;
hotkey = "G"; hotkey = "G";
}; };
class AGM_JoinTeamBlue { class ACE_JoinTeamBlue {
displayName = "$STR_AGM_Interaction_JoinTeamBlue"; displayName = "$STR_ACE_Interaction_JoinTeamBlue";
condition = "true"; condition = QUOTE( true );
statement = "[_player, 'BLUE'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_player, 'BLUE'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
priority = 2.2; priority = 2.2;
icon = "\AGM_Interaction\UI\team\team_blue_ca.paa"; icon = PATHOF(UI\team\team_blue_ca.paa);
enableInside = 1; enableInside = 1;
hotkey = "B"; hotkey = "B";
}; };
class AGM_JoinTeamYellow { class ACE_JoinTeamYellow {
displayName = "$STR_AGM_Interaction_JoinTeamYellow"; displayName = "$STR_ACE_Interaction_JoinTeamYellow";
condition = "true"; condition = QUOTE( true );
statement = "[_player, 'YELLOW'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_player, 'YELLOW'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
priority = 2.1; priority = 2.1;
icon = "\AGM_Interaction\UI\team\team_yellow_ca.paa"; icon = PATHOF(UI\team\team_yellow_ca.paa);
enableInside = 1; enableInside = 1;
hotkey = "Y"; hotkey = "Y";
}; };
class AGM_LeaveTeam { class ACE_LeaveTeam {
displayName = "$STR_AGM_Interaction_LeaveTeam"; displayName = "$STR_ACE_Interaction_LeaveTeam";
condition = "assignedTeam _player != 'MAIN'"; condition = QUOTE( assignedTeam _player != 'MAIN' );
statement = "[_player, 'MAIN'] call AGM_Interaction_fnc_joinTeam"; statement = QUOTE( [_player, 'MAIN'] call FUNC(joinTeam) );
showDisabled = 1; showDisabled = 1;
priority = 2.5; priority = 2.5;
icon = "\AGM_Interaction\UI\team\team_white_ca.paa"; icon = PATHOF(UI\team\team_white_ca.paa);
enableInside = 1; enableInside = 1;
hotkey = "N"; hotkey = "N";
}; };
class AGM_BecomeLeader { class ACE_BecomeLeader {
displayName = "$STR_AGM_Interaction_BecomeLeader"; displayName = "$STR_ACE_Interaction_BecomeLeader";
condition = "count (units group _player) > 1 && {leader group _player != _player}"; condition = QUOTE( count (units group _player) > 1 && {leader group _player != _player} );
statement = "_newGroup = createGroup side group _player; (units group _player) joinSilent _newGroup; _newGroup selectLeader _player;"; statement = QUOTE( _newGroup = createGroup side group _player; (units group _player) joinSilent _newGroup; _newGroup selectLeader _player; );
showDisabled = 1; showDisabled = 1;
priority = 1.0; priority = 1.0;
icon = "\AGM_Interaction\UI\team\team_white_ca.paa"; icon = PATHOF(UI\team\team_white_ca.paa);
enableInside = 1; enableInside = 1;
hotkey = "L"; hotkey = "L";
}; };
class AGM_LeaveGroup { class ACE_LeaveGroup {
displayName = "$STR_AGM_Interaction_LeaveGroup"; displayName = "$STR_ACE_Interaction_LeaveGroup";
condition = "count (units group _player) > 1"; condition = QUOTE( count (units group _player) > 1 );
statement = "_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;"; statement = QUOTE( _oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup; );
showDisabled = 1; showDisabled = 1;
priority = 1.2; priority = 1.2;
icon = "\AGM_Interaction\UI\team\team_management_ca.paa"; icon = PATHOF(UI\team\team_management_ca.paa);
enableInside = 1; enableInside = 1;
hotkey = "M"; hotkey = "M";
}; };
}; };
/* DANCE ANIMATION DOESN'T WORK :( /* DANCE ANIMATION DOESN'T WORK :(
class AGM_Dance { class ACE_Dance {
displayName = "$STR_AGM_Interaction_Dance"; displayName = "$STR_ACE_Interaction_Dance";
condition = "isClass (configFile >> 'CfgPatches' >> 'AGM_Movement') and !AGM_Dancing"; condition = "isClass (configFile >> 'CfgPatches' >> 'ACE_Movement') and !ACE_Dancing";
statement = "AGM_Dancing = true; [-2, {_this switchMove 'TestDance';}, player] call CBA_fnc_globalExecute;"; statement = "ACE_Dancing = true; [-2, {_this switchMove 'TestDance';}, player] call CBA_fnc_globalExecute;";
showDisabled = 0; showDisabled = 0;
priority = -1.2; priority = -1.2;
}; };
class AGM_StopDancing { class ACE_StopDancing {
displayName = "$STR_AGM_Interaction_StopDancing"; displayName = "$STR_ACE_Interaction_StopDancing";
condition = "AGM_Dancing"; condition = "ACE_Dancing";
statement = "AGM_Dancing = false; [-2, {_this switchMove '';}, player] call CBA_fnc_globalExecute;"; statement = "ACE_Dancing = false; [-2, {_this switchMove '';}, player] call CBA_fnc_globalExecute;";
showDisabled = 0; showDisabled = 0;
priority = -1.2; priority = -1.2;
}; };
*/ */
class AGM_Gestures { class ACE_Gestures {
displayName = "$STR_AGM_Interaction_Gestures"; displayName = "$STR_ACE_Interaction_Gestures";
condition = "canStand _target"; condition = "canStand _target";
statement = ""; statement = "";
showDisabled = 1; showDisabled = 1;
priority = 3.5; priority = 3.5;
subMenu[] = {"AGM_Gestures", 1}; subMenu[] = {"ACE_Gestures", 1};
icon = "AGM_Interaction\UI\gestures_ca.paa"; icon = "ACE_Interaction\UI\gestures_ca.paa";
hotkey = "G"; hotkey = "G";
/*class AGM_Gesture_Advance { /*class ACE_Gesture_Advance {
displayName = "$STR_AGM_Interaction_Gestures_Attack"; displayName = "$STR_ACE_Interaction_Gestures_Attack";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gestureAttack';"; statement = "_target playActionNow 'gestureAttack';";
showDisabled = 1; showDisabled = 1;
priority = 2.0; priority = 2.0;
};*/ };*/
class AGM_Gesture_Advance { class ACE_Gesture_Advance {
displayName = "$STR_AGM_Interaction_Gestures_Advance"; displayName = "$STR_ACE_Interaction_Gestures_Advance";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gestureAdvance';"; statement = "_target playActionNow 'gestureAdvance';";
showDisabled = 1; showDisabled = 1;
priority = 1.9; priority = 1.9;
hotkey = "1"; hotkey = "1";
}; };
class AGM_Gesture_Go { class ACE_Gesture_Go {
displayName = "$STR_AGM_Interaction_Gestures_Go"; displayName = "$STR_ACE_Interaction_Gestures_Go";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow (['gestureGo', 'gestureGoB'] select (floor random 2));"; statement = "_target playActionNow (['gestureGo', 'gestureGoB'] select (floor random 2));";
showDisabled = 1; showDisabled = 1;
priority = 1.8; priority = 1.8;
hotkey = "2"; hotkey = "2";
}; };
class AGM_Gesture_Follow { class ACE_Gesture_Follow {
displayName = "$STR_AGM_Interaction_Gestures_Follow"; displayName = "$STR_ACE_Interaction_Gestures_Follow";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gestureFollow';"; statement = "_target playActionNow 'gestureFollow';";
showDisabled = 1; showDisabled = 1;
priority = 1.7; priority = 1.7;
hotkey = "3"; hotkey = "3";
}; };
/*class AGM_Gesture_Point { /*class ACE_Gesture_Point {
displayName = "$STR_AGM_Interaction_Gestures_Point"; displayName = "$STR_ACE_Interaction_Gestures_Point";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gesturePoint';"; statement = "_target playActionNow 'gesturePoint';";
showDisabled = 1; showDisabled = 1;
priority = 1.6; priority = 1.6;
};*/ };*/
class AGM_Gesture_Up { class ACE_Gesture_Up {
displayName = "$STR_AGM_Interaction_Gestures_Up"; displayName = "$STR_ACE_Interaction_Gestures_Up";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gestureUp';"; statement = "_target playActionNow 'gestureUp';";
showDisabled = 1; showDisabled = 1;
priority = 1.5; priority = 1.5;
hotkey = "4"; hotkey = "4";
}; };
class AGM_Gesture_Cover { class ACE_Gesture_Cover {
displayName = "$STR_AGM_Interaction_Gestures_Cover"; displayName = "$STR_ACE_Interaction_Gestures_Cover";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gestureCover';"; statement = "_target playActionNow 'gestureCover';";
showDisabled = 1; showDisabled = 1;
priority = 1.4; priority = 1.4;
hotkey = "5"; hotkey = "5";
}; };
class AGM_Gesture_CeaseFire { class ACE_Gesture_CeaseFire {
displayName = "$STR_AGM_Interaction_Gestures_Cease_Fire"; displayName = "$STR_ACE_Interaction_Gestures_Cease_Fire";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gestureCeaseFire';"; statement = "_target playActionNow 'gestureCeaseFire';";
showDisabled = 1; showDisabled = 1;
priority = 1.3; priority = 1.3;
hotkey = "6"; hotkey = "6";
}; };
class AGM_Gesture_Freeze { class ACE_Gesture_Freeze {
displayName = "$STR_AGM_Interaction_Gestures_Freeze"; displayName = "$STR_ACE_Interaction_Gestures_Freeze";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gestureFreeze';"; statement = "_target playActionNow 'gestureFreeze';";
showDisabled = 1; showDisabled = 1;
priority = 1.2; priority = 1.2;
hotkey = "7"; hotkey = "7";
}; };
class AGM_Gesture_Yes { class ACE_Gesture_Yes {
displayName = "$STR_AGM_Interaction_Gestures_Yes"; displayName = "$STR_ACE_Interaction_Gestures_Yes";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow (['gestureYes', 'gestureNod'] select (floor random 2));"; statement = "_target playActionNow (['gestureYes', 'gestureNod'] select (floor random 2));";
showDisabled = 1; showDisabled = 1;
priority = 1.1; priority = 1.1;
hotkey = "8"; hotkey = "8";
}; };
class AGM_Gesture_No { class ACE_Gesture_No {
displayName = "$STR_AGM_Interaction_Gestures_No"; displayName = "$STR_ACE_Interaction_Gestures_No";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow 'gestureNo';"; statement = "_target playActionNow 'gestureNo';";
showDisabled = 1; showDisabled = 1;
priority = 1.0; priority = 1.0;
hotkey = "9"; hotkey = "9";
}; };
class AGM_Gesture_Hi { class ACE_Gesture_Hi {
displayName = "$STR_AGM_Interaction_Gestures_Hi"; displayName = "$STR_ACE_Interaction_Gestures_Hi";
condition = "canStand _target"; condition = "canStand _target";
statement = "_target playActionNow (['gestureHi', 'gestureHiB', 'gestureHiC'] select (floor random 3));"; statement = "_target playActionNow (['gestureHi', 'gestureHiB', 'gestureHiC'] select (floor random 3));";
showDisabled = 1; showDisabled = 1;
@ -567,24 +472,24 @@ class CfgVehicles {
}; };
}; };
class AGM_Equipment { class ACE_Equipment {
displayName = "$STR_AGM_Interaction_Equipment"; displayName = "$STR_ACE_Interaction_Equipment";
condition = "true"; condition = "true";
statement = ""; statement = "";
showDisabled = 1; showDisabled = 1;
priority = 4.5; priority = 4.5;
icon = ""; // @todo icon = ""; // @todo
subMenu[] = {"AGM_Equipment", 1}; subMenu[] = {"ACE_Equipment", 1};
enableInside = 1; enableInside = 1;
hotkey = "E"; hotkey = "E";
class AGM_Dummy { class ACE_Dummy {
displayName = ""; displayName = "";
condition = "false"; condition = "false";
statement = ""; statement = "";
showDisabled = 1; showDisabled = 1;
priority = -99; priority = -99;
icon = "AGM_Core\UI\blank_CO.paa"; icon = PATHOF(UI\blank_CO.paa);
enableInside = 1; enableInside = 1;
}; };
}; };
@ -593,67 +498,67 @@ class CfgVehicles {
class LandVehicle; class LandVehicle;
class Car: LandVehicle { class Car: LandVehicle {
class AGM_Actions {}; class ACE_Actions {};
class AGM_SelfActions {}; class ACE_SelfActions {};
}; };
class Tank: LandVehicle { class Tank: LandVehicle {
class AGM_Actions {}; class ACE_Actions {};
class AGM_SelfActions {}; class ACE_SelfActions {};
}; };
class Air; class Air;
class Helicopter: Air { class Helicopter: Air {
class AGM_Actions {}; class ACE_Actions {};
class AGM_SelfActions {}; class ACE_SelfActions {};
}; };
class Plane: Air { class Plane: Air {
class AGM_Actions {}; class ACE_Actions {};
class AGM_SelfActions {}; class ACE_SelfActions {};
}; };
class Ship; class Ship;
class Ship_F: Ship { class Ship_F: Ship {
class AGM_Actions { class ACE_Actions {
class AGM_Push { class ACE_Push {
displayName = "$STR_AGM_Interaction_Push"; displayName = "$STR_ACE_Interaction_Push";
distance = 4; distance = 4;
condition = "getMass _target < 1000 and alive _target"; condition = QUOTE( getMass _target < 1000 and alive _target );
statement = "[_target, [2 * (vectorDir _player select 0), 2 * (vectorDir _player select 1), 0.5]] call AGM_Interaction_fnc_push;"; statement = QUOTE( [_target, [2 * (vectorDir _player select 0), 2 * (vectorDir _player select 1), 0.5]] call FUNC(push); );
showDisabled = 0; showDisabled = 0;
priority = -1; priority = -1;
}; };
}; };
class AGM_SelfActions {}; class ACE_SelfActions {};
}; };
class StaticWeapon: LandVehicle { class StaticWeapon: LandVehicle {
class AGM_Actions {}; class ACE_Actions {};
class AGM_SelfActions {}; class ACE_SelfActions {};
}; };
class StaticMortar; class StaticMortar;
class Mortar_01_base_F: StaticMortar { class Mortar_01_base_F: StaticMortar {
class AGM_Actions {}; class ACE_Actions {};
class AGM_SelfActions {}; class ACE_SelfActions {};
}; };
class Box_NATO_Support_F; class Box_NATO_Support_F;
class AGM_Box_Misc: Box_NATO_Support_F { class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems { class TransportItems {
MACRO_ADDITEM(AGM_CableTie,24) MACRO_ADDITEM(ACE_CableTie,24)
}; };
}; };
}; };
class CfgWeapons { class CfgWeapons {
class AGM_ItemCore; class ACE_ItemCore;
class InventoryItem_Base_F; class InventoryItem_Base_F;
class AGM_CableTie: AGM_ItemCore { class ACE_CableTie: ACE_ItemCore {
displayName = "$STR_AGM_Interaction_CableTie_Name"; displayName = "$STR_ACE_Interaction_CableTie_Name";
descriptionShort = "$STR_AGM_Interaction_CableTie_Description"; descriptionShort = "$STR_ACE_Interaction_CableTie_Description";
model = "\AGM_Interaction\agm_cabletie.p3d"; model = PATHOF(ACE_cabletie.p3d);
picture = "\AGM_Interaction\UI\agm_cabletie_x_ca.paa"; picture = PATHOF(UI\ACE_cabletie_x_ca.paa);
scope = 2; scope = 2;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
mass = 1; mass = 1;

View File

@ -1,6 +1,4 @@
/* /*
Name: AGM_Interaction_fnc_AddSelectableItem
Author: Garth de Wet (LH) Author: Garth de Wet (LH)
Description: Description:
@ -17,6 +15,9 @@
Example: Example:
*/ */
#include "script_component.hpp"
private ["_container", "_displayName", "_picture", "_data", "_index"]; private ["_container", "_displayName", "_picture", "_data", "_index"];
_container = _this select 0; _container = _this select 0;
@ -25,10 +26,10 @@ _picture = _this select 2;
_data = _this select 3; _data = _this select 3;
if (_picture == "" || _picture == "PictureThing") then { if (_picture == "" || _picture == "PictureThing") then {
_picture = "AGM_Interaction\UI\dot_ca.paa"; _picture = PATHTOF(UI\dot_ca.paa);
}; };
if ((profileNamespace getVariable ["AGM_Interaction_FlowMenu", false])) then { if ((profileNamespace getVariable [QGVAR(FlowMenu), false])) then {
//[_displayName, _statement, _condition, _priority, _subMenu, _icon, _tooltip, _conditionShow, _exceptions, _distance, _hotkey] //[_displayName, _statement, _condition, _priority, _subMenu, _icon, _tooltip, _conditionShow, _exceptions, _distance, _hotkey]
_container pushBack [_displayName, nil, {true},0,[], _picture, "", {true}, [], 4, "", _data]; _container pushBack [_displayName, nil, {true},0,[], _picture, "", {true}, [], 4, "", _data];
}else{ }else{

View File

@ -1,12 +1,10 @@
/* /*
Name: AGM_Interaction_fnc_GetActions
Author: Author:
commy2 commy2
Garth de Wet (LH) Garth de Wet (LH)
Description: Description:
Parameters: Parameters:
0: OBJECT - target 0: OBJECT - target
1: ARRAY - Parents of the target object 1: ARRAY - Parents of the target object
@ -14,18 +12,20 @@
3: ARRAY - Patches 3: ARRAY - Patches
4: CONFIG - Parent config (ConfigFile >> "CfgVehicles"/MissionConfigFile >> "CfgVehicles") 4: CONFIG - Parent config (ConfigFile >> "CfgVehicles"/MissionConfigFile >> "CfgVehicles")
5: BOOL - Is mission config file? 5: BOOL - Is mission config file?
6: STRING - Classname ("AGM_Actions"/"AGM_SelfActions") 6: STRING - Classname ("ACE_Actions"/"ACE_SelfActions")
7: STRING - Sub-class 7: STRING - Sub-class
Returns: Returns:
Nothing Nothing
Example: Example:
[player, [configfile >> "CfgVehicles" >> typeOf player, true] call BIS_fnc_returnParents, [], [],configfile >> "CfgVehicles", false, "AGM_Actions"] call AGM_Interaction_fnc_GetActions; [player, [configfile >> "CfgVehicles" >> typeOf player, true] call BIS_fnc_returnParents, [], [],configfile >> "CfgVehicles", false, "ACE_Actions"] call ACE_Interaction_fnc_GetActions;
[player, [configfile >> "CfgVehicles" >> typeOf player, true] call BIS_fnc_returnParents, [], [],configfile >> "CfgVehicles", false, "AGM_SelfActions"] call AGM_Interaction_fnc_GetActions; [player, [configfile >> "CfgVehicles" >> typeOf player, true] call BIS_fnc_returnParents, [], [],configfile >> "CfgVehicles", false, "ACE_SelfActions"] call ACE_Interaction_fnc_GetActions;
*/ */
#define DEFAULT_ICON "\AGM_Interaction\UI\dot_ca.paa" #include "script_component.hpp"
#define DEFAULT_ICON PATHTOF(UI\dot_ca.paa)
private ["_target", "_parents", "_actions", "_patches", "_baseConfig", "_actionType", "_i","_index", "_missionConfig", "_stdConfig"]; private ["_target", "_parents", "_actions", "_patches", "_baseConfig", "_actionType", "_i","_index", "_missionConfig", "_stdConfig"];
_target = _this select 0; _target = _this select 0;
_parents = _this select 1; _parents = _this select 1;
@ -54,7 +54,7 @@ for "_i" from 0 to (_count - 1) do {
private ["_action", "_displayName", "_distance","_condition","_statement","_showDisabled", "_priority", "_tooltip", "_hotkey", private ["_action", "_displayName", "_distance","_condition","_statement","_showDisabled", "_priority", "_tooltip", "_hotkey",
"_subMenu", "_conditionShow", "_exceptions", "_icon", "_actionToCache", "_cacheActions", "_cache", "_indexCache", "_configName"]; "_subMenu", "_conditionShow", "_exceptions", "_icon", "_actionToCache", "_cacheActions", "_cache", "_indexCache", "_configName"];
_action = if (_missionConfig) then {_config select _index} else {_stdConfig >> configName (_config select _index)}; _action = if (_missionConfig) then {_config select _index} else {_stdConfig >> configName (_config select _index)};
_cache = missionNamespace getVariable ["AGM_Interaction_MenuCache", [[], [], []]]; _cache = missionNamespace getVariable [QGVAR(MenuCache), [[], [], []]];
if (count _action > 0) then { if (count _action > 0) then {
_configName = configName _action; _configName = configName _action;
@ -77,7 +77,7 @@ for "_i" from 0 to (_count - 1) do {
_condition = getText (_action >> "condition"); _condition = getText (_action >> "condition");
if (_condition == "") then {_condition = "true"}; if (_condition == "") then {_condition = "true"};
_condition = _condition + format [" && {%1 call AGM_Core_canInteract} && {[AGM_player, AGM_Interaction_Target] call AGM_Core_fnc_canInteractWith}", getArray (_action >> "exceptions")]; _condition = _condition + format [QUOTE( && {%1 call EGVAR(core,canInteract)} && {[ACE_player, GVAR(Target)] call EFUNC(core,canInteractWith)} ), getArray (_action >> "exceptions")];
if (_enableInside != 1) then {_condition = _condition + " && {_player == _vehicle}"}; if (_enableInside != 1) then {_condition = _condition + " && {_player == _vehicle}"};
_condition = compile _condition; _condition = compile _condition;
@ -98,11 +98,11 @@ for "_i" from 0 to (_count - 1) do {
_statement = getText (_action >> "statement"); _statement = getText (_action >> "statement");
_statement = compile _statement; _statement = compile _statement;
if (profileNamespace getVariable ["AGM_Interaction_FlowMenu", false]) then { if (profileNamespace getVariable [QGVAR(FlowMenu), false]) then {
_statement = if (getText (_action >> "statement") == "" && {count _subMenu > 1}) then { _statement = if (getText (_action >> "statement") == "" && {count _subMenu > 1}) then {
compile format ["call AGM_Interaction_fnc_hideMenu;if(%2 == 1)then{['%1'] call AGM_Interaction_fnc_openSubMenuSelf;}else{['%1'] call AGM_Interaction_fnc_openSubMenu;};", _subMenu select 0, _subMenu select 1]; compile format [QUOTE( call FUNC(hideMenu);if(%2 == 1)then{['%1'] call FUNC(openSubMenuSelf);}else{['%1'] call FUNC(openSubMenu);}; ), _subMenu select 0, _subMenu select 1];
} else { } else {
compile ("call AGM_Interaction_fnc_hideMenu;" + getText (_action >> "statement")); compile (QUOTE( call FUNC(hideMenu); ) + getText (_action >> "statement"));
}; };
}; };
@ -114,7 +114,7 @@ for "_i" from 0 to (_count - 1) do {
_actionToCache = [_displayName, _statement, _condition, _priority, _subMenu, _icon, _tooltip, _conditionShow, _exceptions, _distance, _hotkey]; _actionToCache = [_displayName, _statement, _condition, _priority, _subMenu, _icon, _tooltip, _conditionShow, _exceptions, _distance, _hotkey];
if (!(_configName in _patches) && {_showDisabled || {[_object, _player] call _condition}} && {_distance == 0 || {[_object, _distance] call AGM_Interaction_fnc_isInRange}}) then { if (!(_configName in _patches) && {_showDisabled || {[_object, _player] call _condition}} && {_distance == 0 || {[_object, _distance] call FUNC(isInRange)}}) then {
_actions pushBack _actionToCache; _actions pushBack _actionToCache;
_patches pushBack _configName; _patches pushBack _configName;
}; };
@ -129,9 +129,9 @@ for "_i" from 0 to (_count - 1) do {
_cacheIndices pushBack _indexCache; _cacheIndices pushBack _indexCache;
_cache = [_cacheConfigs, _cacheActions, _cacheIndices]; _cache = [_cacheConfigs, _cacheActions, _cacheIndices];
["InteractionMenu", _action, {format ["%1 loaded into cache", _this]}] call AGM_Debug_fnc_log; ["InteractionMenu", _action, {format ["%1 loaded into cache", _this]}] call EFUNC(debug, log);
} else { } else {
["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call AGM_Debug_fnc_log; ["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(debug, log);
_cachedAction = _cacheActions select (_cacheIndices select _indexCache); _cachedAction = _cacheActions select (_cacheIndices select _indexCache);
@ -140,14 +140,14 @@ for "_i" from 0 to (_count - 1) do {
_showDisabled = [_object, _player] call (_cachedAction select 7); _showDisabled = [_object, _player] call (_cachedAction select 7);
}; };
if (!(_configName in _patches) && {_showDisabled || {[_object, _player] call (_cachedAction select 2)}} && {[_object, (_cachedAction select 9)] call AGM_Interaction_fnc_isInRange || {(_cachedAction select 9) == 0}}) then { if (!(_configName in _patches) && {_showDisabled || {[_object, _player] call (_cachedAction select 2)}} && {[_object, (_cachedAction select 9)] call FUNC(isInRange) || {(_cachedAction select 9) == 0}}) then {
_actions pushBack _cachedAction; _actions pushBack _cachedAction;
_patches pushBack _configName; _patches pushBack _configName;
}; };
}; };
}; };
AGM_Interaction_MenuCache = _cache; GVAR(MenuCache) = _cache;
}; };
}; };
}; };

View File

@ -1,40 +1,40 @@
/* /*
Name: AGM_Interaction_fnc_MoveDown
Author: Garth de Wet (LH) Author: Garth de Wet (LH)
Description: Description:
Depending on the passed value, either scrolls down through the list or up. Depending on the passed value, either scrolls down through the list or up.
Parameters: Parameters:
NUMBER - Amount to increase current interaction target NUMBER - Amount to increase current interaction target
Returns: Returns:
Nothing Nothing
Example:
1 call AGM_Interaction_fnc_MoveDown;
-1 call AGM_Interaction_fnc_MoveDown;
*/
#define CLAMP(x,low,high) (if(x > high)then{high}else{if(x < low)then{low}else{x}})
if (isNil "AGM_Interaction_MainButton") exitWith{};
if (isNil "AGM_Interaction_Buttons") exitWith{};
_count = (count AGM_Interaction_Buttons)- 1;
AGM_Interaction_SelectedButton = CLAMP(AGM_Interaction_SelectedButton + _this, 0, _count);
_target = AGM_Interaction_Target; Example:
_player = AGM_player; 1 call FUNC(MoveDown);
-1 call FUNC(MoveDown);
*/
#include "script_component.hpp"
#define CLAMP(x,low,high) (if(x > high)then{high}else{if(x < low)then{low}else{x}})
if (isNil QGVAR(MainButton)) exitWith{};
if (isNil QGVAR(Buttons)) exitWith{};
_count = (count GVAR(Buttons))- 1;
GVAR(SelectedButton) = CLAMP(GVAR(SelectedButton) + _this, 0, _count);
_target = GVAR(Target);
_player = ACE_player;
_vehicle = vehicle _player; _vehicle = vehicle _player;
disableSerialization; disableSerialization;
_dlgInteractionDialog = uiNamespace getVariable "AGM_Flow_Display"; _dlgInteractionDialog = uiNamespace getVariable QGVAR(Flow_Display);
_top = AGM_Interaction_SelectedButton - 2; _top = GVAR(SelectedButton) - 2;
_i = 0; _i = 0;
while {_i <= 4} do { while {_i <= 4} do {
_index =_i + _top; _index =_i + _top;
_ctrl = _dlgInteractionDialog displayCtrl (1200 + _i); _ctrl = _dlgInteractionDialog displayCtrl (1200 + _i);
if (_index >= 0 && {_index <= _count}) then { if (_index >= 0 && {_index <= _count}) then {
_action = AGM_Interaction_Buttons select _index; _action = GVAR(Buttons) select _index;
_ctrl ctrlShow true; _ctrl ctrlShow true;
_ctrl ctrlSetText (_action select 5); _ctrl ctrlSetText (_action select 5);
_color = [1,1,1,1]; _color = [1,1,1,1];
@ -55,9 +55,9 @@ while {_i <= 4} do {
}; };
_ctrl = _dlgInteractionDialog displayCtrl 1000; _ctrl = _dlgInteractionDialog displayCtrl 1000;
_ctrl ctrlSetText ((AGM_Interaction_Buttons select AGM_Interaction_SelectedButton) select 0); _ctrl ctrlSetText ((GVAR(Buttons) select GVAR(SelectedButton)) select 0);
_ctrl = _dlgInteractionDialog displayCtrl 1100; _ctrl = _dlgInteractionDialog displayCtrl 1100;
_current = (AGM_Interaction_Buttons select AGM_Interaction_SelectedButton); _current = (GVAR(Buttons) select GVAR(SelectedButton));
_infoText = ""; _infoText = "";
if !([_target, _player] call (_current select 2)) then { if !([_target, _player] call (_current select 2)) then {
_infoText = "Unavailable"; _infoText = "Unavailable";

View File

@ -1,8 +1,8 @@
/* /*
* Author: commy2 * Author: commy2
* *
* Add an AGM action to an object. Note: This function is global. * Add an ACE action to an object. Note: This function is global.
* *
* Argument: * Argument:
* 0: Object the action should be assigned to (Object) * 0: Object the action should be assigned to (Object)
* 1: Name of the action shown in the menu (String) * 1: Name of the action shown in the menu (String)
@ -11,11 +11,13 @@
* 4: Statement (Code or String) * 4: Statement (Code or String)
* 5: Show the action even if the conditon is not met (Bool or Number) * 5: Show the action even if the conditon is not met (Bool or Number)
* 6: Priority (Number, optional default: 0) * 6: Priority (Number, optional default: 0)
* *
* Return value: * Return value:
* ID of the action (used to remove it later). * ID of the action (used to remove it later).
*/ */
#include "script_component.hpp"
private ["_object", "_displayName", "_distance", "_condition", "_statement", "_showDisabled", "_priority", "_actionsVar", "_id", "_actionIDs", "_actions"]; private ["_object", "_displayName", "_distance", "_condition", "_statement", "_showDisabled", "_priority", "_actionsVar", "_id", "_actionIDs", "_actions"];
_object = _this select 0; _object = _this select 0;
@ -42,7 +44,7 @@ if (isNil "_priority") then {
_priority = 0; _priority = 0;
}; };
_actionsVar = _object getVariable ["AGM_Interactions", [-1, [], []]]; _actionsVar = _object getVariable [QGVAR(Interactions), [-1, [], []]];
_id = (_actionsVar select 0) + 1; _id = (_actionsVar select 0) + 1;
_actionIDs = _actionsVar select 1; _actionIDs = _actionsVar select 1;
@ -51,5 +53,5 @@ _actions = _actionsVar select 2;
_actionIDs pushBack _id; _actionIDs pushBack _id;
_actions pushBack [_displayName, _distance, _condition, _statement, _showDisabled, _priority]; _actions pushBack [_displayName, _distance, _condition, _statement, _showDisabled, _priority];
_object setVariable ["AGM_Interactions", [_id, _actionIDs, _actions], true]; _object setVariable [QGVAR(Interactions), [_id, _actionIDs, _actions], true];
_id _id

View File

@ -1,20 +1,20 @@
/* /*
* Author: commy2 * Author: commy2
* *
* Add an AGM self action to the player. Execute this on the local machine of the player. * Add an ACE self action to the player. Execute this on the local machine of the player.
* *
* Argument: * Argument:
* 0: Name of the action shown in the menu (String) * 0: Name of the action shown in the menu (String)
* 1: Condition (Code or String) * 1: Condition (Code or String)
* 2: Statement (Code or String) * 2: Statement (Code or String)
* 3: Show the action even if the conditon is not met (Bool or Number) * 3: Show the action even if the conditon is not met (Bool or Number)
* 4: Priority (Number, optional default: 0) * 4: Priority (Number, optional default: 0)
* *
* Return value: * Return value:
* ID of the action (used to remove it later). * ID of the action (used to remove it later).
*/ */
#include "script_component.hpp"
private ["_displayName", "_condition", "_statement", "_showDisabled", "_priority", "_actionsVar", "_id", "_actionIDs", "_actions"]; private ["_displayName", "_condition", "_statement", "_showDisabled", "_priority", "_actionsVar", "_id", "_actionIDs", "_actions"];
@ -42,7 +42,7 @@ if (isNil "_priority") then {
_priority = 0; _priority = 0;
}; };
_actionsVar = AGM_player getVariable ["AGM_InteractionsSelf", [-1, [], []]]; _actionsVar = ACE_player getVariable [QGVAR(InteractionsSelf), [-1, [], []]];
_id = (_actionsVar select 0) + 1; _id = (_actionsVar select 0) + 1;
_actionIDs = _actionsVar select 1; _actionIDs = _actionsVar select 1;
@ -51,5 +51,5 @@ _actions = _actionsVar select 2;
_actionIDs pushBack _id; _actionIDs pushBack _id;
_actions pushBack [_displayName, _condition, _statement, _showDisabled, _priority]; _actions pushBack [_displayName, _condition, _statement, _showDisabled, _priority];
AGM_player setVariable ["AGM_InteractionsSelf", [_id, _actionIDs, _actions], false]; ACE_player setVariable [QGVAR(InteractionsSelf), [_id, _actionIDs, _actions], false];
_id _id

View File

@ -1,3 +1,5 @@
// by commy2 // by commy2
AGM_Interaction_CurrentTooltip pushBack (_this select 0); #include "script_component.hpp"
QGVAR(CurrentTooltip) pushBack (_this select 0);

View File

@ -1,17 +1,19 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_object", "_actions", "_dlgInteractionDialog", "_ctrlInteractionDialog", "_index", "_ctrlInteractionDialogIcon"]; private ["_object", "_actions", "_dlgInteractionDialog", "_ctrlInteractionDialog", "_index", "_ctrlInteractionDialogIcon"];
_object = AGM_Interaction_Target; _object = GVAR(Target);
_actions = AGM_Interaction_Buttons; _actions = GVAR(Buttons);
disableSerialization; disableSerialization;
_dlgInteractionDialog = uiNamespace getVariable "AGM_Interaction_Dialog"; _dlgInteractionDialog = uiNamespace getVariable QGVAR(Dialog);
/* /*
for "_a" from 0 to (_count - 1) do { for "_a" from 0 to (_count - 1) do {
_action = AGM_Interaction_Buttons select _a; _action = GVAR(Buttons) select _a;
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl (10 + _a); _ctrlInteractionDialog = _dlgInteractionDialog displayCtrl (10 + _a);
_ctrlInteractionDialog ctrlShow true; _ctrlInteractionDialog ctrlShow true;
@ -22,10 +24,10 @@ for "_a" from 0 to (_count - 1) do {
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3; _ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3;
AGM_Interaction_MainButton = "(findDisplay 1713999) closeDisplay 1;"; GVAR(MainButton) = "(findDisplay 1713999) closeDisplay 1;";
if (_object isKindOf "Man") then { if (_object isKindOf "Man") then {
_ctrlInteractionDialog ctrlSetText (if (alive _object) then {name _object} else {_object getVariable ["AGM_Name", "Unknown"]}); _ctrlInteractionDialog ctrlSetText (if (alive _object) then {name _object} else {_object getVariable ["ACE_Name", "Unknown"]});
} else { } else {
_ctrlInteractionDialog ctrlSetText (getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName")); _ctrlInteractionDialog ctrlSetText (getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName"));
}; };
@ -37,7 +39,7 @@ for "_index" from 0 to 9 do {
_ctrlInteractionDialogIcon = _dlgInteractionDialog displayCtrl (20 + _index); _ctrlInteractionDialogIcon = _dlgInteractionDialog displayCtrl (20 + _index);
if (_index < _count) then { if (_index < _count) then {
_action = AGM_Interaction_Buttons select _index; _action = GVAR(Buttons) select _index;
_ctrlInteractionDialog ctrlSetText (_action select 0); _ctrlInteractionDialog ctrlSetText (_action select 0);
_ctrlInteractionDialog ctrlEnable (call (_action select 2)); _ctrlInteractionDialog ctrlEnable (call (_action select 2));

View File

@ -1,5 +1,7 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_unit", "_isCivilian"]; private ["_unit", "_isCivilian"];
_unit = _this select 0; _unit = _this select 0;
@ -8,5 +10,5 @@ _isCivilian = _this select 1;
if (isNil "_isCivilian") then {_isCivilian = true}; if (isNil "_isCivilian") then {_isCivilian = true};
alive _unit alive _unit
&& [side _unit != side AGM_player, side group _unit == civilian] select _isCivilian && [side _unit != side ACE_player, side group _unit == civilian] select _isCivilian
//&& {count (weapons _unit) == 0} //&& {count (weapons _unit) == 0}

View File

@ -1,16 +0,0 @@
// by commy2
private ["_mode", "_info", "_house", "_door", "_id"];
_mode = _this select 0; //lock: true, unlock: false
_info = [2] call AGM_Interaction_fnc_getDoor;
_house = _info select 0;
_door = _info select 1;
_id = _info select 2;
!isNull _house
&& {_door == "door"}
&& {!_mode || {_house animationPhase format ["door_%1_rot", _id] <= 0}}
&& {(_house getVariable [format ["BIS_Disabled_Door_%1", _id], 0] != 1) isEqualTo _mode}

View File

@ -1,5 +1,7 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_unit", "_target"]; private ["_unit", "_target"];
_unit = _this select 0; _unit = _this select 0;
@ -8,4 +10,4 @@ _target = _this select 1;
_target isKindOf "CAManBase" && _target isKindOf "CAManBase" &&
{alive _target} && {alive _target} &&
{_unit distance _target < 4} && {_unit distance _target < 4} &&
{!(_target getVariable ["AGM_isUnconscious", false])} {!(_target getVariable ["ACE_isUnconscious", false])}

View File

@ -1,10 +1,11 @@
// commy2 // commy2
#include "script_component.hpp"
private ["_object", "_config", "_type", "_actions", "_configs"]; private ["_object", "_config", "_type", "_actions", "_configs"];
_object = _this select 0; _object = _this select 0;
_config = _this select 1; // configFile, missionConfigFile _config = _this select 1; // configFile, missionConfigFile
_type = _this select 2; // "AGM_CfgInteractions", "AGM_CfgInteractionsSelf" _type = _this select 2; // "ACE_CfgInteractions", "ACE_CfgInteractionsSelf"
_actions = _this select 3; // []; _actions = _this select 3; // [];
_configs = "_object isKindOf configName _x" configClasses (_config >> _type); _configs = "_object isKindOf configName _x" configClasses (_config >> _type);
@ -12,7 +13,7 @@ _configs = "_object isKindOf configName _x" configClasses (_config >> _type);
// cache // cache
private ["_cache", "_cacheConfigs", "_cacheActions", "_cacheIndices"]; private ["_cache", "_cacheConfigs", "_cacheActions", "_cacheIndices"];
_cache = uiNamespace getVariable ["AGM_Interaction_MenuCache", [[], [], []]]; _cache = uiNamespace getVariable [QGVAR(MenuCache), [[], [], []]];
_cacheConfigs = _cache select 0; _cacheConfigs = _cache select 0;
_cacheActions = _cache select 1; _cacheActions = _cache select 1;
_cacheIndices = _cache select 2; _cacheIndices = _cache select 2;
@ -44,7 +45,7 @@ _cacheIndices = _cache select 2;
_condition = getText (_action >> "condition"); _condition = getText (_action >> "condition");
if (_condition == "") then {_condition = "true"}; if (_condition == "") then {_condition = "true"};
_condition = _condition + format [" && {%1 call AGM_Core_canInteract} && {[AGM_player, AGM_Interaction_Target] call AGM_Core_fnc_canInteractWith}", getArray (_action >> "exceptions")]; _condition = _condition + format [QUOTE( && {%1 call EFUNC(core,canInteract)} && {[ACE_player, GVAR(Target)] call FUNC(canInteractWith)} ), getArray (_action >> "exceptions")];
if (_enableInside != 1) then {_condition = _condition + " && {_player == _vehicle}"}; if (_enableInside != 1) then {_condition = _condition + " && {_player == _vehicle}"};
_condition = compile _condition; _condition = compile _condition;
@ -65,11 +66,11 @@ _cacheIndices = _cache select 2;
_statement = getText (_action >> "statement"); _statement = getText (_action >> "statement");
_statement = compile _statement; _statement = compile _statement;
if (profileNamespace getVariable ["AGM_Interaction_FlowMenu", false]) then { if (profileNamespace getVariable ["ACE_Interaction_FlowMenu", false]) then {
_statement = if (getText (_action >> "statement") == "" && {count _subMenu > 1}) then { _statement = if (getText (_action >> "statement") == "" && {count _subMenu > 1}) then {
compile format ["call AGM_Interaction_fnc_hideMenu;if(%2 == 1)then{['%1'] call AGM_Interaction_fnc_openSubMenuSelf;}else{['%1'] call AGM_Interaction_fnc_openSubMenu;};", _subMenu select 0, _subMenu select 1]; compile format [QUOTE( call FUNC(hideMenu);if(%2 == 1)then{['%1'] call FUNC(openSubMenuSelf);}else{['%1'] call FUNC(openSubMenu);}; ), _subMenu select 0, _subMenu select 1];
} else { } else {
compile ("call AGM_Interaction_fnc_hideMenu;" + getText (_action >> "statement")); compile (QUOTE( call FUNC(hideMenu); ) + getText (_action >> "statement"));
}; };
}; };
@ -82,7 +83,7 @@ _cacheIndices = _cache select 2;
private "_actionToCache"; private "_actionToCache";
_actionToCache = [_displayName, _statement, _condition, _priority, _subMenu, _icon, _tooltip, _conditionShow, _exceptions, _distance, _hotkey]; _actionToCache = [_displayName, _statement, _condition, _priority, _subMenu, _icon, _tooltip, _conditionShow, _exceptions, _distance, _hotkey];
if ((_showDisabled || {[_object, _player] call _condition}) && {_distance == 0 || {[_object, _distance] call AGM_Interaction_fnc_isInRange}}) then { if ((_showDisabled || {[_object, _player] call _condition}) && {_distance == 0 || {[_object, _distance] call FUNC(isInRange)}}) then {
_actions pushBack _actionToCache; _actions pushBack _actionToCache;
}; };
@ -96,9 +97,9 @@ _cacheIndices = _cache select 2;
_cacheIndices pushBack _indexCache; _cacheIndices pushBack _indexCache;
_cache = [_cacheConfigs, _cacheActions, _cacheIndices]; _cache = [_cacheConfigs, _cacheActions, _cacheIndices];
["InteractionMenu", _action, {format ["%1 loaded into cache", _this]}] call AGM_Debug_fnc_log; ["InteractionMenu", _action, {format ["%1 loaded into cache", _this]}] call EFUNC(debug, log);
} else { } else {
["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call AGM_Debug_fnc_log; ["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(debug, log);
private ["_cachedAction", "_showDisabled"]; private ["_cachedAction", "_showDisabled"];
_cachedAction = _cacheActions select (_cacheIndices select _indexCache); _cachedAction = _cacheActions select (_cacheIndices select _indexCache);
@ -108,13 +109,13 @@ _cacheIndices = _cache select 2;
_showDisabled = [_object, _player] call (_cachedAction select 7); _showDisabled = [_object, _player] call (_cachedAction select 7);
}; };
if ((_showDisabled || {[_object, _player] call (_cachedAction select 2)}) && {[_object, (_cachedAction select 9)] call AGM_Interaction_fnc_isInRange || {(_cachedAction select 9) == 0}}) then { if ((_showDisabled || {[_object, _player] call (_cachedAction select 2)}) && {[_object, (_cachedAction select 9)] call FUNC(isInRange) || {(_cachedAction select 9) == 0}}) then {
_actions pushBack _cachedAction; _actions pushBack _cachedAction;
}; };
}; };
} forEach _configActions; //Actions of this CfgVehicles class } forEach _configActions; //Actions of this CfgVehicles class
} forEach _configs; //CfgVehicles class } forEach _configs; //CfgVehicles class
uiNamespace setVariable ["AGM_Interaction_MenuCache", _cache]; uiNamespace setVariable [QGVAR(MenuCache), _cache];
_actions _actions

View File

@ -1,3 +1,4 @@
// by commy2 // by commy2
#include "script_component.hpp"
_this call AGM_Core_fnc_getCaptivityStatus; _this call EFUNC(core,getCaptivityStatus);

View File

@ -1,4 +1,5 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_distance", "_position0", "_position1", "_intersections", "_count", "_house", "_door", "_index", "_id"]; private ["_distance", "_position0", "_position1", "_intersections", "_count", "_house", "_door", "_index", "_id"];
@ -22,10 +23,3 @@ _intersections = [_house, "GEOM"] intersect [_position0, _position1];
_door = _intersections select 0 select 0; _door = _intersections select 0 select 0;
if (isNil "_door") exitWith {[_house, ""]}; if (isNil "_door") exitWith {[_house, ""]};
[_house, _door] [_house, _door]
/*
_house = cursorTarget;
_actions = "true" configClasses (configFile >> "CfgVehicles" >> typeOf _house >> "UserActions");
_actions = [_actions, {getText (_x >> "statement")}] call AGM_Core_fnc_map;
_actions
*/

View File

@ -1,4 +1,5 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_house", "_door", "_animations", "_lockedVariable"]; private ["_house", "_door", "_animations", "_lockedVariable"];

View File

@ -1,14 +1,15 @@
/* /*
* Author: KoffeinFlummi * Author: KoffeinFlummi
* *
* Forces a civilian to the ground. (chance of failure). * Forces a civilian to the ground. (chance of failure).
* *
* Arguments: * Arguments:
* 0: Unit to be sent away (Object) * 0: Unit to be sent away (Object)
* *
* Return value: * Return value:
* none * none
*/ */
#include "script_component.hpp"
#define RADIUS 10 #define RADIUS 10
@ -16,9 +17,9 @@ private ["_unit", "_chance", "_x"];
_unit = _this select 0; _unit = _this select 0;
AGM_player playActionNow "GestureGo"; // put something else here. ACE_player playActionNow "GestureGo"; // put something else here.
if (count (weapons AGM_player) > 0) then { if (count (weapons ACE_player) > 0) then {
_chance = 0.8; _chance = 0.8;
} else { } else {
_chance = 0.5; _chance = 0.5;

View File

@ -1,10 +1,11 @@
// by commy2 // by commy2
#include "script_component.hpp"
#define MIN_DISTANCE 0.0065 #define MIN_DISTANCE 0.0065
private ["_position", "_distance", "_angle"]; private ["_position", "_distance", "_angle"];
_position = uiNamespace getVariable ['AGM_Interaction_CursorPosition', [0.5, 0.5, 0]]; _position = uiNamespace getVariable [QGVAR(CursorPosition), [0.5, 0.5, 0]];
_position = [((_position select 1) - 0.5) / safezoneH, ((_position select 2) - 0.5) / safezoneW, 0]; _position = [((_position select 1) - 0.5) / safezoneH, ((_position select 2) - 0.5) / safezoneW, 0];

View File

@ -1,22 +1,22 @@
/* /*
Name: AGM_Interaction_fnc_hideMenu
Author: Garth de Wet (LH) Author: Garth de Wet (LH)
Description: Description:
Closes the Interaction menu Closes the Interaction menu
Parameters: Parameters:
Nothing Nothing
Returns: Returns:
Nothing Nothing
Example: Example:
call AGM_Interaction_fnc_hideMenu; call FUNC(hideMenu);
*/ */
#include "script_component.hpp"
closeDialog 0; closeDialog 0;
(findDisplay 1713999) closeDisplay 1; (findDisplay 1713999) closeDisplay 1;
(uiNameSpace getVariable "AGM_Flow_Display") closeDisplay 0; (uiNameSpace getVariable QGVAR(Flow_Display)) closeDisplay 0;
AGM_Interaction_MainButton = nil; GVAR(MainButton) = nil;
call AGM_Interaction_fnc_hideMouseHint; call FUNC(hideMouseHint);

View File

@ -1,22 +1,22 @@
/* /*
Name: AGM_Interaction_fnc_hideMouseHint
Author(s): Author(s):
Garth de Wet (LH) Garth de Wet (LH)
Description: Description:
Hides the interaction helper text with the mouse buttons at the bottom middle of the screen Hides the interaction helper text with the mouse buttons at the bottom middle of the screen
Parameters: Parameters:
Nothing Nothing
Returns: Returns:
Nothing Nothing
Example:
call AGM_Interaction_fnc_hideMouseHint;
*/
if (isNull (uiNamespace getVariable ["AGM_Helper_Display", objNull])) exitWith{};
("AGM_InteractionHelper" call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; Example:
call FUNC(hideMouseHint);
*/
#include "script_component.hpp"
if (isNull (uiNamespace getVariable ["ACE_Helper_Display", objNull])) exitWith{};
("ACE_InteractionHelper" call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
showHUD true; showHUD true;

View File

@ -1,6 +1,4 @@
/* /*
Name: AGM_Interaction_fnc_initialiseInteraction
Author: Author:
commy2 commy2
Garth de Wet (LH) Garth de Wet (LH)
@ -19,62 +17,64 @@
Nothing Nothing
Example: Example:
[{"Default" call AGM_Interaction_fnc_openMenu;}, true, (profileNamespace getVariable ["AGM_Interaction_FlowMenu", false]), AGM_Interaction_Target] call AGM_Interaction_fnc_initialiseInteraction; [{"Default" call FUNC(openMenu);}, true, (profileNamespace getVariable [QGVAR(FlowMenu), false]), GVAR(Target)] call FUNC(initialiseInteraction);
*/ */
#include "script_component.hpp"
private ["_subMenu", "_selfMenu", "_target"]; private ["_subMenu", "_selfMenu", "_target"];
AGM_Interaction_MainButton = _this select 0; GVAR(MainButton) = _this select 0;
_subMenu = _this select 1; _subMenu = _this select 1;
_selfMenu = _this select 3; _selfMenu = _this select 3;
_target = _this select 4; _target = _this select 4;
_player = AGM_player; _player = ACE_player;
_vehicle = vehicle _player; _vehicle = vehicle _player;
//_object = [AGM_Interaction_Target, _player] select (AGM_Interaction_MenuType % 2 == 1); //_object = [GVAR(Target), _player] select (GVAR(MenuType) % 2 == 1);
if !([_target, 5] call AGM_Interaction_fnc_isInRange) exitWith {}; if !([_target, 5] call GVAR(isInRange)) exitWith {};
AGM_Interaction_Shortcuts = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; GVAR(Shortcuts) = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
// Flow menu // Flow menu
if (_this select 2) then { if (_this select 2) then {
("AGM_FlowMenu" call BIS_fnc_rscLayer) cutRsc ["AGM_FlowMenu", "PLAIN",0.5, false]; (QGVAR(FlowMenu) call BIS_fnc_rscLayer) cutRsc [QGVAR(FlowMenu), "PLAIN",0.5, false];
AGM_Interaction_SelectedButton = 0; ACE_Interaction_SelectedButton = 0;
(findDisplay 1713999) closeDisplay 1; (findDisplay 1713999) closeDisplay 1;
if (_player getVariable ["AGM_AcceptAction", -1] == -1) then { if (_player getVariable ["ACE_AcceptAction", -1] == -1) then {
[{if(isNil {AGM_Interaction_MainButton} || {!(profileNamespace getVariable ['AGM_Interaction_FlowMenu', false])})exitWith{false};(-(_this select 0) / 1.2) call AGM_Interaction_fnc_MoveDown;true}] call AGM_Core_fnc_addScrollWheelEventHandler; [{if(isNil {GVAR(MainButton)} || {!(profileNamespace getVariable [QGVAR(FlowMenu), false])})exitWith{false};(-(_this select 0) / 1.2) call FUNC(MoveDown);true}] call EFUNC(core,addScrollWheelEventHandler);
_player setVariable ["AGM_AcceptAction", [_player, "DefaultAction", {(!isNil {AGM_Interaction_MainButton}) && {(profileNamespace getVariable ['AGM_Interaction_FlowMenu', false])}}, {_action = AGM_Interaction_Buttons select AGM_Interaction_SelectedButton;_target = AGM_Interaction_Target;_player = AGM_player;_vehicle = vehicle _player;if ([_target, _player] call (_action select 2)) then {call AGM_Interaction_fnc_hideMenu;if(count _action == 12) then{(_action select 11) call (_action select 1);}else{[_target, _player] call (_action select 1);};};}] call AGM_core_fnc_addActionEventHandler]; _player setVariable ["ACE_AcceptAction", [_player, "DefaultAction", {(!isNil {GVAR(MainButton)}) && {(profileNamespace getVariable [QGVAR(FlowMenu), false])}}, {_action = GVAR(Buttons) select ACE_Interaction_SelectedButton;_target = GVAR(Target);_player = ACE_player;_vehicle = vehicle _player;if ([_target, _player] call (_action select 2)) then {call FUNC(hideMenu);if(count _action == 12) then{(_action select 11) call (_action select 1);}else{[_target, _player] call (_action select 1);};};}] call EFUNC(core,addActionEventHandler)];
_player setVariable ["AGM_AcceptAction", [_player, "menuBack", {(!isNil {AGM_Interaction_MainButton}) && {(profileNamespace getVariable ['AGM_Interaction_FlowMenu', false])}}, {call AGM_Interaction_MainButton;}] call AGM_core_fnc_addActionEventHandler]; _player setVariable ["ACE_AcceptAction", [_player, "menuBack", {(!isNil {GVAR(MainButton)}) && {(profileNamespace getVariable [QGVAR(FlowMenu), false])}}, {call GVAR(MainButton);}] call EFUNC(core,addActionEventHandler)];
}; };
0 call AGM_Interaction_fnc_moveDown; 0 call FUNC(moveDown);
[localize "STR_AGM_Interaction_MakeSelection", if (_subMenu)then{localize "STR_AGM_Interaction_Back"}else{""}, localize "STR_AGM_Interaction_ScrollHint"] call AGM_Interaction_fnc_showMouseHint; [localize "STR_ACE_Interaction_MakeSelection", if (_subMenu)then{localize "STR_ACE_Interaction_Back"}else{""}, localize "STR_ACE_Interaction_ScrollHint"] call FUNC(showMouseHint);
((uiNamespace getVariable "AGM_Flow_Display") displayCtrl (1210)) ctrlShow _subMenu; ((uiNamespace getVariable QGVAR(Flow_Display)) displayCtrl (1210)) ctrlShow _subMenu;
}else{ // Rose }else{ // Rose
if (!isNull(uiNamespace getVariable "AGM_Flow_Display")) then { if (!isNull(uiNamespace getVariable QGVAR(Flow_Display))) then {
(uiNameSpace getVariable "AGM_Flow_Display") closeDisplay 0; (uiNameSpace getVariable QGVAR(Flow_Display)) closeDisplay 0;
call AGM_Interaction_fnc_hideMouseHint; call FUNC(hideMouseHint);
}; };
if (!_subMenu || {isNull (findDisplay 1713999)}) then { if (!_subMenu || {isNull (findDisplay 1713999)}) then {
(findDisplay 1713999) closeDisplay 1; (findDisplay 1713999) closeDisplay 1;
(findDisplay 46) createDisplay "AGM_Interaction_Dialog"; (findDisplay 46) createDisplay QGVAR(Dialog);
// Add eventhandlers // Add eventhandlers
(findDisplay 1713999) displayAddEventHandler ["KeyDown", "_this call AGM_Core_onKeyDown"]; (findDisplay 1713999) displayAddEventHandler ["KeyDown", QUOTE( _this call EFUNC(core,onKeyDown) )];
(findDisplay 1713999) displayAddEventHandler ["KeyUp", "_this call AGM_Core_onKeyUp"]; (findDisplay 1713999) displayAddEventHandler ["KeyUp", QUOTE( _this call EFUNC(core,onKeyUp) )];
(findDisplay 1713999) displayAddEventHandler ["KeyDown", "_this call AGM_Interaction_fnc_menuKeyInput"]; (findDisplay 1713999) displayAddEventHandler ["KeyDown", QUOTE( _this call FUNC(menuKeyInput) )];
}; };
disableSerialization; disableSerialization;
_dlgInteractionDialog = uiNamespace getVariable "AGM_Interaction_Dialog"; _dlgInteractionDialog = uiNamespace getVariable QGVAR(Dialog);
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3; _ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3;
if (profileNamespace getVariable ["AGM_Interaction_AutoCenterCursor", true]) then {setMousePosition [0.5, 0.5]}; if (profileNamespace getVariable [QGVAR(AutoCenterCursor), true]) then {setMousePosition [0.5, 0.5]};
if !(_subMenu) then { if !(_subMenu) then {
_ctrlInteractionDialog ctrlSetText ([_target] call AGM_Core_fnc_getName); _ctrlInteractionDialog ctrlSetText ([_target] call EFUNC(core,getName));
} else { } else {
_ctrlInteractionDialog ctrlSetText localize "STR_AGM_Interaction_Back"; _ctrlInteractionDialog ctrlSetText localize "STR_ACE_Interaction_Back";
}; };
_buttons = AGM_Interaction_Buttons; _buttons = GVAR(Buttons);
_count = count _buttons; _count = count _buttons;
for "_i" from 0 to 9 do { for "_i" from 0 to 9 do {
@ -94,7 +94,7 @@ if (_this select 2) then {
_ctrlInteractionDialogShortcut ctrlSetText (_action select 10); _ctrlInteractionDialogShortcut ctrlSetText (_action select 10);
//_ctrlInteractionDialogBackground ctrlShow true; //_ctrlInteractionDialogBackground ctrlShow true;
AGM_Interaction_Shortcuts set [_i, [_action select 10] call AGM_Core_fnc_letterToCode]; GVAR(Shortcuts) set [_i, [_action select 10] call EFUNC(core,letterToCode)];
} else { } else {
_ctrlInteractionDialog ctrlSetText ""; _ctrlInteractionDialog ctrlSetText "";
_ctrlInteractionDialog ctrlEnable false; _ctrlInteractionDialog ctrlEnable false;
@ -107,23 +107,23 @@ if (_this select 2) then {
}; };
// Update Buttons // Update Buttons
terminate (missionNamespace getVariable ["AGM_Interaction_updateMenuHandle", scriptNull]); terminate (missionNamespace getVariable [QGVAR(updateMenuHandle), scriptNull]);
AGM_Interaction_updateMenuHandle = 0 spawn { GVAR(updateMenuHandle) = 0 spawn {
disableSerialization; disableSerialization;
_dlgMenu = uiNamespace getVariable ["AGM_Interaction_Dialog", displayNull]; _dlgMenu = uiNamespace getVariable [QGVAR(Dialog), displayNull];
_ctrlTooltip = _dlgMenu displayCtrl 40; _ctrlTooltip = _dlgMenu displayCtrl 40;
_player = AGM_player; _player = ACE_player;
_vehicle = vehicle _player; _vehicle = vehicle _player;
_target = [AGM_Interaction_Target, _player] select (AGM_Interaction_MenuType % 2 == 1); _target = [GVAR(Target), _player] select (GVAR(MenuType) % 2 == 1);
waitUntil { waitUntil {
if !([_target, 5] call AGM_Interaction_fnc_isInRange) exitWith { if !([_target, 5] call GVAR(isInRange)) exitWith {
(findDisplay 1713999) closeDisplay 1 (findDisplay 1713999) closeDisplay 1
}; };
AGM_Interaction_Tooltips = [[], [], [], [], [], [], [], [], [], []]; GVAR(Tooltips) = [[], [], [], [], [], [], [], [], [], []];
{ {
_ctrlText = _dlgMenu displayCtrl (10 + _forEachIndex); _ctrlText = _dlgMenu displayCtrl (10 + _forEachIndex);
_ctrlIcon = _dlgMenu displayCtrl (20 + _forEachIndex); _ctrlIcon = _dlgMenu displayCtrl (20 + _forEachIndex);
@ -132,15 +132,15 @@ if (_this select 2) then {
_conditionShow = _x select 7; _conditionShow = _x select 7;
_distance = _x select 9; _distance = _x select 9;
AGM_Interaction_CurrentTooltip = []; GVAR(CurrentTooltip) = [];
_enable = (_distance == 0 || {[_target, _distance] call AGM_Interaction_fnc_isInRange}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow}; _enable = (_distance == 0 || {[_target, _distance] call GVAR(isInRange)}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow};
if (isNil "_enable") then {_enable = false}; if (isNil "_enable") then {_enable = false};
AGM_Interaction_Tooltips set [_forEachIndex, AGM_Interaction_CurrentTooltip]; GVAR(Tooltips) set [_forEachIndex, GVAR(CurrentTooltip)];
// apply conditional tooltips // apply conditional tooltips
/*if (_forEachIndex == call AGM_Interaction_fnc_getSelectedButton) then { /*if (_forEachIndex == call ACE_Interaction_fnc_getSelectedButton) then {
_tooltip = _x select 6; _tooltip = _x select 6;
_showTooltip = _tooltip != ""; _showTooltip = _tooltip != "";
@ -150,7 +150,7 @@ if (_this select 2) then {
{ {
_showTooltip = true; _showTooltip = true;
_tooltip = composeText [_tooltip, lineBreak, _x]; _tooltip = composeText [_tooltip, lineBreak, _x];
} forEach (AGM_Interaction_Tooltips select _forEachIndex); } forEach (GVAR(Tooltips) select _forEachIndex);
_ctrlTooltip ctrlSetStructuredText _tooltip; _ctrlTooltip ctrlSetStructuredText _tooltip;
_ctrlTooltip ctrlShow _showTooltip; _ctrlTooltip ctrlShow _showTooltip;
@ -158,7 +158,7 @@ if (_this select 2) then {
_ctrlText ctrlEnable _enable; _ctrlText ctrlEnable _enable;
_ctrlIcon ctrlEnable _enable; _ctrlIcon ctrlEnable _enable;
} forEach AGM_Interaction_Buttons; } forEach GVAR(Buttons);
sleep 0.5; sleep 0.5;
isNull (findDisplay 1713999) isNull (findDisplay 1713999)

View File

@ -2,21 +2,22 @@
* Author: commy2 * Author: commy2
* *
* Check if the vehicle is in range of the player. * Check if the vehicle is in range of the player.
* *
* Argument: * Argument:
* 0: Vehicke (Object) * 0: Vehicke (Object)
* 1: Distance in meters (Number) * 1: Distance in meters (Number)
* *
* Return value: * Return value:
* (Bool) * (Bool)
*/ */
#include "script_component.hpp"
private ["_vehicle", "_distance", "_player"]; private ["_vehicle", "_distance", "_player"];
_vehicle = _this select 0; _vehicle = _this select 0;
_distance = _this select 1; _distance = _this select 1;
_player = AGM_player; _player = ACE_player;
if (_vehicle isKindOf "Man") exitWith {_player distance _vehicle < _distance}; if (_vehicle isKindOf "Man") exitWith {_player distance _vehicle < _distance};
@ -44,6 +45,6 @@ _position1 set [2, (_position1 select 2) - (getTerrainHeightASL _position1 min 0
if (_vehicle in lineIntersectsWith [_position0, _position1] || {_player distance _vehicle < _distance}) then { if (_vehicle in lineIntersectsWith [_position0, _position1] || {_player distance _vehicle < _distance}) then {
true true
} else { } else {
["Not in Range"] call AGM_Interaction_fnc_addToTooltip; ["Not in Range"] call FUNC(addToTooltip);
false false
} }

View File

@ -1,20 +1,21 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_unit", "_team", "_message"]; private ["_unit", "_team", "_message"];
_unit = _this select 0; _unit = _this select 0;
_team = _this select 1; _team = _this select 1;
_unit setVariable ["AGM_assignedFireTeam", _team, true]; _unit setVariable [QGVAR(assignedFireTeam), _team, true];
[_unit, format ["{_this assignTeam '%1'}", _team]] call AGM_Core_fnc_execRemoteFnc; [_unit, format ["{_this assignTeam '%1'}", _team]] call EFUNC(core,execRemoteFnc);
if (_unit == AGM_player) then { if (_unit == ACE_player) then {
_message = if (_team == "MAIN") then { _message = if (_team == "MAIN") then {
localize "STR_AGM_Interaction_LeftTeam"; localize "STR_ACE_Interaction_LeftTeam";
} else { } else {
_team = localize format ["STR_AGM_Interaction_Team%1", _team]; _team = localize format ["STR_ACE_Interaction_Team%1", _team];
format [localize "STR_AGM_Interaction_JoinedTeam", _team]; format [localize "STR_ACE_Interaction_JoinedTeam", _team];
}; };
[_message] call AGM_Core_fnc_displayTextStructured; [_message] call EFUNC(core,displayTextStructured);
}; };

View File

@ -1,27 +0,0 @@
// by commy2
private ["_mode", "_info", "_house", "_door", "_id", "_phase"];
_mode = _this select 0; //lock: true, unlock: false
_info = [2] call AGM_Interaction_fnc_getDoor;
_house = _info select 0;
_door = _info select 1;
_id = _info select 2;
if (isNull _house) exitWith {};
/*
_phase = [1, 0] select _mode;
_house animate [format ["%1_%2_rot", _door, _id], _phase];
_house animate [format ["%1_Handle_%2_rot_1", _door, _id], _phase];
_house animate [format ["%1_Handle_%2_rot_2", _door, _id], _phase];
*/
_house setVariable [format ["BIS_Disabled_%1_%2", _door, _id], [0, 1] select _mode];
playSound "AGM_Sound_Click";
[localize (["STR_AGM_Interaction_UnlockedDoor", "STR_AGM_Interaction_LockedDoor"] select _mode)] call AGM_Core_fnc_displayTextStructured;

View File

@ -1,4 +1,5 @@
// by commy2 // by commy2
#include "script_component.hpp"
private "_key"; private "_key";
@ -6,10 +7,10 @@ _key = _this select 1;
if (_key in [28, 57, 156, 200, 208, 203, 205, 201, 209]) exitWith {true}; if (_key in [28, 57, 156, 200, 208, 203, 205, 201, 209]) exitWith {true};
_index = AGM_Interaction_Shortcuts find _key; _index = GVAR(Shortcuts) find _key;
if (_index != -1 && {ctrlEnabled (findDisplay 1713999 displayCtrl (_index + 10))}) exitWith { if (_index != -1 && {ctrlEnabled (findDisplay 1713999 displayCtrl (_index + 10))}) exitWith {
_index call AGM_Interaction_fnc_onClick; _index call FUNC(onClick);
true true
}; };

View File

@ -9,12 +9,13 @@
* Return Value: * Return Value:
* None * None
*/ */
#include "script_component.hpp"
_logic = _this select 0; _logic = _this select 0;
_activated = _this select 2; _activated = _this select 2;
if !(_activated) exitWith {}; if !(_activated) exitWith {};
[_logic, "AGM_Interaction_EnableTeamManagement", "EnableTeamManagement"] call AGM_Core_fnc_readBooleanParameterFromModule; [_logic, QGVAR(EnableTeamManagement), "EnableTeamManagement"] call EFUNC(core,readBooleanParameterFromModule);
diag_log text "[AGM]: Interaction Module Initialized."; diag_log text "[ACE]: Interaction Module Initialized.";

View File

@ -1,14 +1,15 @@
// by commy2 // by commy2
#include "script_component.hpp"
if (dialog) exitWith { if (dialog) exitWith {
closeDialog 0; closeDialog 0;
}; };
if (isNull (findDisplay 1713999)) then { if (isNull (findDisplay 1713999)) then {
if (AGM_player == vehicle AGM_player) then {"" call AGM_Interaction_fnc_openMenu} else {[AGM_player, vehicle AGM_player] call AGM_Interaction_fnc_openMenuSelectUI}; if (ACE_player == vehicle ACE_player) then {"" call FUNC(openMenu)} else {[ACE_player, vehicle ACE_player] call FUNC(openMenuSelectUI)};
setMousePosition [0.5, 0.5]; setMousePosition [0.5, 0.5];
} else { } else {
(findDisplay 1713999) closeDisplay 1; (findDisplay 1713999) closeDisplay 1;
}; };
[_player, "interactionMenuOpened", [_player, AGM_Interaction_Target, 0]] call AGM_Core_fnc_callCustomEventHandlers; [_player, "interactionMenuOpened", [_player, GVAR(Target), 0]] call EFUNC(core,callCustomEventHandlers);

View File

@ -1,14 +1,15 @@
// by commy2 // by commy2
#include "script_component.hpp"
if (dialog) exitWith { if (dialog) exitWith {
closeDialog 0; closeDialog 0;
}; };
if (isNull (findDisplay 1713999)) then { if (isNull (findDisplay 1713999)) then {
"" call AGM_Interaction_fnc_openMenuSelf; "" call FUNC(openMenuSelf);
setMousePosition [0.5, 0.5]; setMousePosition [0.5, 0.5];
} else { } else {
(findDisplay 1713999) closeDisplay 1; (findDisplay 1713999) closeDisplay 1;
}; };
[_player, "interactionMenuOpened", [_player, AGM_Interaction_Target, 1]] call AGM_Core_fnc_callCustomEventHandlers; [_player, "interactionMenuOpened", [_player, GVAR(Target), 1]] call EFUNC(core,callCustomEventHandlers);

View File

@ -1,16 +1,17 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_player", "_vehicle", "_target", "_count", "_index", "_action", "_statement", "_condition", "_conditionShow", "_exceptions", "_distance"]; private ["_player", "_vehicle", "_target", "_count", "_index", "_action", "_statement", "_condition", "_conditionShow", "_exceptions", "_distance"];
_player = AGM_player; _player = ACE_player;
_vehicle = vehicle _player; _vehicle = vehicle _player;
_target = [AGM_Interaction_Target, _player] select (AGM_Interaction_MenuType % 2 == 1); _target = [GVAR(Target), _player] select (GVAR(MenuType) % 2 == 1);
_count = count AGM_Interaction_Buttons; _count = count GVAR(Buttons);
_index = call AGM_Interaction_fnc_getSelectedButton; _index = call FUNC(getSelectedButton);
_action = if (_index != -1 && {_index < _count}) then { _action = if (_index != -1 && {_index < _count}) then {
AGM_Interaction_Buttons select _index GVAR(Buttons) select _index
} else { } else {
["", {}, {false}, 0, [], "", "", {false}, [], 0] ["", {}, {false}, 0, [], "", "", {false}, [], 0]
}; };
@ -20,25 +21,12 @@ closeDialog 0;
_statement = _action select 1; _statement = _action select 1;
_condition = _action select 2; _condition = _action select 2;
_conditionShow = _action select 7; _conditionShow = _action select 7;
_exceptions = _action select 8;// _exceptions = _action select 8;//
_distance = _action select 9; _distance = _action select 9;
if ((_distance == 0 || {[AGM_Interaction_Target, _distance] call AGM_Interaction_fnc_isInRange}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow}) then { if ((_distance == 0 || {[GVAR(Target), _distance] call FUNC(isInRange)}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow}) then {
[_target, _player] call _statement; [_target, _player] call _statement;
}; };

View File

@ -1,16 +1,16 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_player", "_vehicle", "_target", "_count", "_index", "_action", "_subMenu", "_statement", "_condition", "_conditionShow", "_exceptions", "_distance"]; private ["_player", "_vehicle", "_target", "_count", "_index", "_action", "_subMenu", "_statement", "_condition", "_conditionShow", "_exceptions", "_distance"];
_player = AGM_player; _player = ACE_player;
_vehicle = vehicle _player; _vehicle = vehicle _player;
_target = [AGM_Interaction_Target, _player] select (AGM_Interaction_MenuType % 2 == 1); _target = [GVAR(Target), _player] select (GVAR(MenuType) % 2 == 1);
_count = count AGM_Interaction_Buttons; _count = count GVAR(Buttons);
_index = _this; //call AGM_Interaction_fnc_getSelectedButton; _index = _this;
_action = if (_index != -1 && {_index < _count}) then { _action = if (_index != -1 && {_index < _count}) then {
AGM_Interaction_Buttons select _index GVAR(Buttons) select _index
} else { } else {
["", {}, {false}, 0, [], "", "", {false}, [], 0] ["", {}, {false}, 0, [], "", "", {false}, [], 0]
}; };
@ -19,7 +19,7 @@ _subMenu = _action select 4;
// back // back
if (_index == -1) exitWith { if (_index == -1) exitWith {
call AGM_Interaction_MainButton; call FUNC(MainButton);
}; };
if (count _subMenu < 2) then { if (count _subMenu < 2) then {
@ -32,13 +32,13 @@ if (count _subMenu < 2) then {
_exceptions = _action select 8;// _exceptions = _action select 8;//
_distance = _action select 9; _distance = _action select 9;
if ((_distance == 0 || {[AGM_Interaction_Target, _distance] call AGM_Interaction_fnc_isInRange}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow}) then { if ((_distance == 0 || {[GVAR(Target), _distance] call FUNC(isInRange)}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow}) then {
[_target, _player] call _statement; [_target, _player] call _statement;
}; };
} else { } else {
if (_subMenu select 1 < 1) then { if (_subMenu select 1 < 1) then {
[_subMenu select 0] call AGM_Interaction_fnc_openSubMenu; [_subMenu select 0] call FUNC(openSubMenu);
} else { } else {
[_subMenu select 0] call AGM_Interaction_fnc_openSubMenuSelf; [_subMenu select 0] call FUNC(openSubMenuSelf);
}; };
}; };

View File

@ -1,3 +1,4 @@
// by CorruptedHeart, commy2 // by CorruptedHeart, commy2
#include "script_component.hpp"
call compile (lbData [8866, lbCurSel 8866]) call AGM_Interaction_SelectAccept; call compile (lbData [8866, lbCurSel 8866]) call GVAR(SelectAccept);

View File

@ -1,15 +1,16 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_info", "_house", "_door", "_animations", "_lockedVariable"]; private ["_info", "_house", "_door", "_animations", "_lockedVariable"];
_info = [2] call AGM_Interaction_fnc_getDoor; _info = [2] call FUNC(getDoor);
_house = _info select 0; _house = _info select 0;
_door = _info select 1; _door = _info select 1;
if (isNull _house) exitWith {}; if (isNull _house) exitWith {};
_animations = [_house, _door] call AGM_Interaction_fnc_getDoorAnimations; _animations = [_house, _door] call FUNC(getDoorAnimations);
_lockedVariable = _animations select 1; _lockedVariable = _animations select 1;
_animations = _animations select 0; _animations = _animations select 0;
@ -21,15 +22,15 @@ if (_house animationPhase (_animations select 0) <= 0 && {_house getVariable [_l
_lockedVariable spawn compile preprocessFileLineNumbers "\A3\Structures_F\scripts\LockedDoor_open.sqf"; _lockedVariable spawn compile preprocessFileLineNumbers "\A3\Structures_F\scripts\LockedDoor_open.sqf";
}; };
AGM_Interaction_isOpeningDoor = true; GVAR(isOpeningDoor) = true;
playSound "AGM_Sound_Click"; playSound "ACE_Sound_Click";
[_house, _animations] spawn { [_house, _animations] spawn {
_house = _this select 0; _house = _this select 0;
_animations = _this select 1; _animations = _this select 1;
_phase = _house animationPhase (_animations select 0); _phase = _house animationPhase (_animations select 0);
_position = getPosASL AGM_player; _position = getPosASL ACE_player;
_time = time + 0.2; _time = time + 0.2;
_usedMouseWheel = false; _usedMouseWheel = false;
@ -43,7 +44,7 @@ playSound "AGM_Sound_Click";
{_house animate [_x, _phase]} forEach _animations; {_house animate [_x, _phase]} forEach _animations;
!AGM_Interaction_isOpeningDoor || {getPosASL AGM_player distance _position > 1} !GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1}
}; };
if (!_usedMouseWheel && {time < _time}) then { if (!_usedMouseWheel && {time < _time}) then {
@ -52,5 +53,5 @@ playSound "AGM_Sound_Click";
{_house animate [_x, _phase]} forEach _animations; {_house animate [_x, _phase]} forEach _animations;
}; };
AGM_Interaction_isOpeningDoor = false; GVAR(isOpeningDoor) = false;
}; };

View File

@ -1,6 +1,7 @@
// by commy2 // by commy2
#include "script_component.hpp"
private "_target"; private "_target";
_target = [cursorTarget, AGM_Interaction_Target] select (_this == "Default"); _target = [cursorTarget, GVAR(Target)] select (_this == "Default");
[0, _target, ""] call AGM_Interaction_fnc_showMenu; [0, _target, ""] call FUNC(showMenu);

View File

@ -1,4 +1,5 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_unit", "_vehicle", "_cargo"]; private ["_unit", "_vehicle", "_cargo"];
@ -6,26 +7,26 @@ _unit = _this select 0;
_vehicle = _this select 1; _vehicle = _this select 1;
// allow interaction with all cargo slots and all ffv slots // allow interaction with all cargo slots and all ffv slots
_cargo = [_vehicle, ["cargo", "ffv"], true] call AGM_Core_fnc_getVehicleCrew; _cargo = [_vehicle, ["cargo", "ffv"], true] call EFUNC(core,getVehicleCrew);
// you can only interact if you are in cargo or ffv yourself. exit otherwise // you can only interact if you are in cargo or ffv yourself. exit otherwise
if !(_unit in _cargo) exitWith {}; if !(_unit in _cargo) exitWith {};
AGM_InteractionMenu_Crew = _cargo; GVAR(InteractionMenu_Crew) = _cargo;
// prepare: add header and "OK" button to select menu // prepare: add header and "OK" button to select menu
private "_actions"; private "_actions";
_actions = [localize "STR_AGM_Interaction_InteractionMenu", localize "STR_AGM_Interaction_Interact"] call AGM_Interaction_fnc_prepareSelectMenu; _actions = [localize "STR_ACE_Interaction_InteractionMenu", localize "STR_ACE_Interaction_Interact"] call FUNC(prepareSelectMenu);
// prepare: add all cargo units as options to select menu // prepare: add all cargo units as options to select menu
{ {
if (_x != _unit) then { if (_x != _unit) then {
_actions = [ _actions = [
_actions, _actions,
[_x] call AGM_Core_fnc_getName, [_x] call EFUNC(core,getName),
"\AGM_Interaction\UI\dot_ca.paa", PATHOD(UI\dot_ca.paa),
_forEachIndex _forEachIndex
] call AGM_Interaction_fnc_AddSelectableItem; ] call FUNC(AddSelectableItem);
}; };
} forEach _cargo; } forEach _cargo;
@ -33,11 +34,11 @@ _actions = [localize "STR_AGM_Interaction_InteractionMenu", localize "STR_AGM_In
[ [
_actions, _actions,
{ {
call AGM_Interaction_fnc_hideMenu; call FUNC(hideMenu);
[0, AGM_InteractionMenu_Crew select _this, ""] spawn AGM_Interaction_fnc_showMenu; [0, GVAR(InteractionMenu_Crew) select _this, ""] spawn FUNC(showMenu);
AGM_InteractionMenu_Crew = nil; GVAR(InteractionMenu_Crew) = nil;
}, },
{ {
call AGM_Interaction_fnc_hideMenu; call FUNC(hideMenu);
} }
] call AGM_Interaction_fnc_openSelectMenu; ] call FUNC(openSelectMenu);

View File

@ -1,3 +1,4 @@
// by commy2 // by commy2
#include "script_component.hpp"
[1, AGM_player, ""] call AGM_Interaction_fnc_showMenu; [1, ACE_player, ""] call FUNC(showMenu);

View File

@ -1,6 +1,4 @@
/* /*
Name: AGM_Interaction_fnc_openSelectMenu
Author: Garth de Wet (LH) Author: Garth de Wet (LH)
Description: Description:
@ -23,21 +21,23 @@
Example: Example:
*/ */
if (!(profileNamespace getVariable ["AGM_Interaction_FlowMenu", false])) then { #include "script_component.hpp"
AGM_Interaction_SelectAccept = _this select 1;
AGM_Interaction_SelectCancel = _this select 2; if (!(profileNamespace getVariable [QGVAR(FlowMenu), false])) then {
buttonSetAction [8855, "call AGM_Interaction_SelectCancel;"]; // cancel GVAR(SelectAccept) = _this select 1;
buttonSetAction [8860, "(call compile (lbData [8866, lbCurSel 8866])) call AGM_Interaction_SelectAccept;"]; // accept GVAR(SelectCancel) = _this select 2;
buttonSetAction [8855, QUOTE( call GVAR(SelectCancel); )]; // cancel
buttonSetAction [8860, QUOTE( (call compile (lbData [8866, lbCurSel 8866])) call GVAR(SelectAccept); )]; // accept
lbSetCurSel [8866, 0]; lbSetCurSel [8866, 0];
}else{ }else{
_customActions = _this select 0; _customActions = _this select 0;
_count = count _customActions; _count = count _customActions;
if (_count == 0) exitWith {}; if (_count == 0) exitWith {};
_customActions call AGM_Interaction_fnc_sortOptionsByPriority; _customActions call FUNC(sortOptionsByPriority);
for "_i" from 0 to _count -1 do { for "_i" from 0 to _count -1 do {
_action = _customActions select _i; _action = _customActions select _i;
_action set [1, (_this select 1)]; _action set [1, (_this select 1)];
}; };
AGM_Interaction_Buttons = _customActions; GVAR(Buttons) = _customActions;
[(_this select 2), true, true, false, AGM_player] call AGM_Interaction_fnc_initialiseInteraction; [(_this select 2), true, true, false, ACE_player] call FUNC(initialiseInteraction);
}; };

View File

@ -1,3 +1,4 @@
// by commy2 // by commy2
#include "script_component.hpp"
[2, AGM_Interaction_Target, _this select 0] call AGM_Interaction_fnc_showMenu; [2, GVAR(Target), _this select 0] call FUNC(showMenu);

View File

@ -1,3 +1,4 @@
// by commy2 // by commy2
#include "script_component.hpp"
[3, AGM_player, _this select 0] call AGM_Interaction_fnc_showMenu; [3, ACE_player, _this select 0] call FUNC(showMenu);

View File

@ -1,30 +1,30 @@
/* /*
Name: AGM_Interaction_fnc_prepareSelectMenu
Author: Garth de Wet (LH) Author: Garth de Wet (LH)
Description: Description:
Prepares the select menu for use. Prepares the select menu for use.
Parameters: Parameters:
0: TEXT - Header text 0: TEXT - Header text
1: TEXT - Approve button text 1: TEXT - Approve button text
Returns: Returns:
ARRAY/NUMBER - container object for use with AddSelectableItem. ARRAY/NUMBER - container object for use with AddSelectableItem.
Example: Example:
["Select Explosive", "Place"] call AGM_Interaction_fnc_prepareSelectMenu; ["Select Explosive", "Place"] call FUNC(prepareSelectMenu);
*/ */
#include "script_component.hpp"
private ["_buttonAction", "_header", "_buttonText", "_cancelButton"]; private ["_buttonAction", "_header", "_buttonText", "_cancelButton"];
closeDialog 0; closeDialog 0;
if (!(profileNamespace getVariable ["AGM_Interaction_FlowMenu", false])) exitWith { if (!(profileNamespace getVariable [QGVAR(FlowMenu), false])) exitWith {
_header = _this select 0; _header = _this select 0;
_buttonText = _this select 1; _buttonText = _this select 1;
if (isNil "_buttonText" or {_buttonText == ""}) then { if (isNil "_buttonText" or {_buttonText == ""}) then {
_buttonText = localize "STR_AGM_Interaction_MakeSelection"; _buttonText = localize "STR_ACE_Interaction_MakeSelection";
}; };
createDialog "RscAGM_SelectAnItem"; createDialog "RscACE_SelectAnItem";
ctrlSetText [8860, _buttonText]; ctrlSetText [8860, _buttonText];
ctrlSetText [8870, _header]; ctrlSetText [8870, _header];

View File

@ -10,12 +10,13 @@
* Return Value: * Return Value:
* None * None
*/ */
#include "script_component.hpp"
_boat = _this select 0; _boat = _this select 0;
_velocity = _this select 1; _velocity = _this select 1;
if !(local _boat) exitWith { if !(local _boat) exitWith {
[_this, "AGM_Interaction_fnc_push", _boat] call AGM_Core_fnc_execRemoteFnc; [_this, QUOTE(FUNC(push)), _boat] call EFUNC(core,execRemoteFnc);
}; };
_boat setVelocity _velocity; _boat setVelocity _velocity;

View File

@ -1,22 +1,23 @@
/* /*
* Author: commy2 * Author: commy2
* *
* Remove an AGM action from an object. Note: This function is global. * Remove an ACE action from an object. Note: This function is global.
* *
* Argument: * Argument:
* 0: Object (Object) * 0: Object (Object)
* 1: ID of the action (Number) * 1: ID of the action (Number)
* *
* Return value: * Return value:
* None. * None.
*/ */
#include "script_component.hpp"
private ["_object", "_id", "_actionsVar", "_currentID", "_actionIDs", "_actions"]; private ["_object", "_id", "_actionsVar", "_currentID", "_actionIDs", "_actions"];
_object = _this select 0; _object = _this select 0;
_id = _this select 1; _id = _this select 1;
_actionsVar = _object getVariable ["AGM_Interactions", [-1, [], []]]; _actionsVar = _object getVariable [QGVAR(Interactions), [-1, [], []]];
_currentID = _actionsVar select 0; _currentID = _actionsVar select 0;
_actionIDs = _actionsVar select 1; _actionIDs = _actionsVar select 1;
@ -32,4 +33,4 @@ _actionIDs = _actionIDs - [-1];
_actions set [_id, []]; _actions set [_id, []];
_actions = _actions - [[]]; _actions = _actions - [[]];
_object setVariable ["AGM_Interactions", [_currentID, _actionIDs, _actions], true]; _object setVariable [QGVAR(Interactions), [_currentID, _actionIDs, _actions], true];

View File

@ -1,22 +1,22 @@
/* /*
* Author: commy2 * Author: commy2
* *
* Remove an AGM self action from the player. * Remove an ACE self action from the player.
* *
* Argument: * Argument:
* 0: ID of the action (Number) * 0: ID of the action (Number)
* *
* Return value: * Return value:
* None. * None.
*/ */
#include "script_component.hpp"
private ["_id", "_actionsVar", "_currentID", "_actionIDs", "_actions"]; private ["_id", "_actionsVar", "_currentID", "_actionIDs", "_actions"];
_id = _this select 0; _id = _this select 0;
_actionsVar = AGM_player getVariable ["AGM_InteractionsSelf", [-1, [], []]]; _actionsVar = ACE_player getVariable [QGVAR(InteractionsSelf), [-1, [], []]];
_currentID = _actionsVar select 0; _currentID = _actionsVar select 0;
_actionIDs = _actionsVar select 1; _actionIDs = _actionsVar select 1;
@ -32,4 +32,4 @@ _actionIDs = _actionIDs - [-1];
_actions set [_id, []]; _actions set [_id, []];
_actions = _actions - [[]]; _actions = _actions - [[]];
AGM_player setVariable ["AGM_InteractionsSelf", [_currentID, _actionIDs, _actions], false]; ACE_player setVariable [QGVAR(InteractionsSelf), [_currentID, _actionIDs, _actions], false];

View File

@ -1,9 +1,10 @@
// by commy2 // by commy2
#include "script_component.hpp"
0 spawn { 0 spawn {
waitUntil {player getVariable ["AGM_Name", ""] != ""}; waitUntil {player getVariable ["ACE_Name", ""] != ""};
_name = player getVariable ["AGM_Name", ""]; _name = player getVariable ["ACE_Name", ""];
_name = toArray _name; _name = toArray _name;
_index = _name find (toArray "]" select 0); _index = _name find (toArray "]" select 0);
@ -14,6 +15,6 @@
}; };
_name = _name - [-1]; _name = _name - [-1];
_name = toString _name; _name = toString _name;
player setVariable ["AGM_Name", _name, true]; player setVariable ["ACE_Name", _name, true];
}; };
}; };

View File

@ -1,14 +1,15 @@
/* /*
* Author: KoffeinFlummi * Author: KoffeinFlummi
* *
* Sends a civilian crowd away (chance of failure). * Sends a civilian crowd away (chance of failure).
* *
* Arguments: * Arguments:
* 0: Unit to be sent away (Object) * 0: Unit to be sent away (Object)
* *
* Return value: * Return value:
* none * none
*/ */
#include "script_component.hpp"
#define DISTANCE 50 #define DISTANCE 50
#define RADIUS 10 #define RADIUS 10
@ -17,9 +18,9 @@ private ["_unit", "_chance", "_x"];
_unit = _this select 0; _unit = _this select 0;
AGM_player playActionNow "GestureGo"; ACE_player playActionNow "GestureGo";
if (count weapons AGM_player > 0) then { if (count weapons ACE_player > 0) then {
_chance = 0.8; _chance = 0.8;
} else { } else {
_chance = 0.5; _chance = 0.5;
@ -30,6 +31,6 @@ if (count weapons AGM_player > 0) then {
[-2, { [-2, {
(_this select 0) setUnitPos "AUTO"; (_this select 0) setUnitPos "AUTO";
(_this select 0) doMove [(getPos (_this select 0) select 0) + DISTANCE * (eyeDirection (_this select 1) select 0), (getPos (_this select 0) select 1) + DISTANCE * (eyeDirection (_this select 1) select 1), 0]; (_this select 0) doMove [(getPos (_this select 0) select 0) + DISTANCE * (eyeDirection (_this select 1) select 0), (getPos (_this select 0) select 1) + DISTANCE * (eyeDirection (_this select 1) select 1), 0];
}, [_x, AGM_player]] call CBA_fnc_globalExecute; }, [_x, ACE_player]] call CBA_fnc_globalExecute;
}; };
} foreach (_unit nearEntities ["Civilian", RADIUS]); } foreach (_unit nearEntities ["Civilian", RADIUS]);

View File

@ -1,3 +1,4 @@
// by commy2 // by commy2
#include "script_component.hpp"
_this call AGM_Core_fnc_setCaptivityStatus; _this call EFUNC(core,setCaptivityStatus);

View File

@ -1,74 +1,74 @@
/* /*
Name: AGM_Interaction_fnc_showMenu
Author: Author:
commy2 commy2
Garth de Wet (LH) Garth de Wet (LH)
aeroson aeroson
Description: Description:
Parameters: Parameters:
0: NUMBER - Menu type (0 - interaction, 1 - self-interaction, 2 - sub-interaction, 3 - sub-self-interaction) 0: NUMBER - Menu type (0 - interaction, 1 - self-interaction, 2 - sub-interaction, 3 - sub-self-interaction)
1: OBJECT - Target object 1: OBJECT - Target object
2: STRING - Sub-Menu ClassName 2: STRING - Sub-Menu ClassName
Returns: Returns:
Nothing Nothing
Example: Example:
[0, AGM_Interaction_Target] call AGM_Interaction_fnc_showMenu; [0, GVAR(Target)] call FUNC(showMenu);
[1, player] call AGM_Interaction_fnc_showMenu; [1, player] call FUNC(showMenu);
[2, AGM_Interaction_Target, "AGM_Explosives"] call AGM_Interaction_fnc_showMenu; [2, GVAR(Target), "ACE_Explosives"] call FUNC(showMenu);
[3, player, "AGM_Explosives"] call AGM_Interaction_fnc_showMenu; [3, player, "ACE_Explosives"] call FUNC(showMenu);
*/ */
#include "script_component.hpp"
private ["_player", "_vehicle", "_mainButtonAction", "_object", "_index", "_actions", "_result", "_menuType"]; private ["_player", "_vehicle", "_mainButtonAction", "_object", "_index", "_actions", "_result", "_menuType"];
#define DEFAULT_ICON "\AGM_Interaction\UI\dot_ca.paa" #define DEFAULT_ICON PATHOF(UI\dot_ca.paa)
#define DEFAULT_DISTANCE 4 // seems to be 4 #define DEFAULT_DISTANCE 4 // seems to be 4
_player = AGM_player; _player = ACE_player;
_vehicle = vehicle _player; _vehicle = vehicle _player;
AGM_Interaction_MenuType = _this select 0; // 0 Interaction, 1 Self Interaction GVAR(MenuType) = _this select 0; // 0 Interaction, 1 Self Interaction
_mainButtonAction = [ _mainButtonAction = [
{call AGM_Interaction_fnc_hideMenu}, {call FUNC(hideMenu)},
{call AGM_Interaction_fnc_hideMenu}, {call FUNC(hideMenu)},
{"Default" call AGM_Interaction_fnc_openMenu}, {"Default" call FUNC(openMenu)},
{"Default" call AGM_Interaction_fnc_openMenuSelf} {"Default" call FUNC(openMenuSelf)}
] select AGM_Interaction_MenuType; ] select GVAR(MenuType);
_menuType = AGM_Interaction_MenuType % 2; _menuType = GVAR(MenuType) % 2;
uiNamespace setVariable ["AGM_Interaction_CursorPosition", [controlNull, 0.5, 0.5, -1]]; uiNamespace setVariable [QGVAR(CursorPosition), [controlNull, 0.5, 0.5, -1]];
AGM_Interaction_Target = _this select 1; GVAR(Target) = _this select 1;
_object = AGM_Interaction_Target; _object = GVAR(Target);
if (_menuType == 0 && {(isNull (_object) || {!([_object, 4] call AGM_Interaction_fnc_isInRange)})}) exitWith {};//call ([AGM_Interaction_fnc_onButtonDown, AGM_Interaction_fnc_onButtonDownSelf] select _menuType)}; if (_menuType == 0 && {(isNull (_object) || {!([_object, 4] call FUNC(isInRange))})}) exitWith {};
if !([_player, _object] call AGM_Core_fnc_canInteractWith) exitWith {}; if !([_player, _object] call EFUNC(core,canInteractWith)) exitWith {};
// add actions or self actions of AGM_Interaction_Target // add actions or self actions of GVAR(Target)
_parents = [configFile >> "CfgVehicles" >> typeOf _object, true] call BIS_fnc_returnParents; _parents = [configFile >> "CfgVehicles" >> typeOf _object, true] call BIS_fnc_returnParents;
_result = [_object, _parents, [], [], missionConfigFile >> "CfgVehicles", true, ["AGM_Actions", "AGM_SelfActions"] select _menuType, _this select 2] call AGM_Interaction_fnc_GetActions; _result = [_object, _parents, [], [], missionConfigFile >> "CfgVehicles", true, ["ACE_Actions", "ACE_SelfActions"] select _menuType, _this select 2] call FUNC(GetActions);
_actions = ([_object, _parents, _result select 0, _result select 1,configFile >> "CfgVehicles", false, ["AGM_Actions", "AGM_SelfActions"] select _menuType, _this select 2] call AGM_Interaction_fnc_GetActions) select 0; _actions = ([_object, _parents, _result select 0, _result select 1,configFile >> "CfgVehicles", false, ["ACE_Actions", "ACE_SelfActions"] select _menuType, _this select 2] call FUNC(GetActions) select 0);
// add self actions of vehicle _player // add self actions of vehicle _player
if (_menuType == 1 && {_player != _vehicle}) then { if (_menuType == 1 && {_player != _vehicle}) then {
_parents = [configFile >> "CfgVehicles" >> typeOf _vehicle, true] call BIS_fnc_returnParents; _parents = [configFile >> "CfgVehicles" >> typeOf _vehicle, true] call BIS_fnc_returnParents;
_result = [_vehicle, _parents, [], [], missionConfigFile >> "CfgVehicles", true, ["AGM_Actions", "AGM_SelfActions"] select _menuType, _this select 2] call AGM_Interaction_fnc_GetActions; _result = [_vehicle, _parents, [], [], missionConfigFile >> "CfgVehicles", true, ["ACE_Actions", "ACE_SelfActions"] select _menuType, _this select 2] call FUNC(GetActions);
_actions = _actions + (([_vehicle, _parents, _result select 0, _result select 1,configFile >> "CfgVehicles", false, ["AGM_Actions", "AGM_SelfActions"] select _menuType, _this select 2] call AGM_Interaction_fnc_GetActions) select 0); _actions = _actions + (([_vehicle, _parents, _result select 0, _result select 1,configFile >> "CfgVehicles", false, ["ACE_Actions", "ACE_SelfActions"] select _menuType, _this select 2] call FUNC(GetActions) select 0));
}; };
// custom defined actions, stored in variable instead of cfg like above // custom defined actions, stored in variable instead of cfg like above
if (AGM_Interaction_MenuType < 2) then { if (GVAR(MenuType) < 2) then {
private ["_customActions", "_customAction", "_displayName", "_distance","_condition","_statement","_showDisabled", "_priority"]; private ["_customActions", "_customAction", "_displayName", "_distance","_condition","_statement","_showDisabled", "_priority"];
// add interactions or self interactions of AGM_Interaction_Target // add interactions or self interactions of GVAR(Target)
_customActions = (_object getVariable [["AGM_Interactions", "AGM_InteractionsSelf"] select _menuType, [-1, [], []]]) select 2; _customActions = (_object getVariable [[QGVAR(Interactions), QGVAR(ACE_InteractionsSelf)] select _menuType, [-1, [], []]]) select 2;
// add self interactions of vehicle _player // add self interactions of vehicle _player
if (_menuType == 1 && {_player != _vehicle}) then { if (_menuType == 1 && {_player != _vehicle}) then {
_customActions = _customActions + ((_vehicle getVariable [["AGM_Interactions", "AGM_InteractionsSelf"] select _menuType, [-1, [], []]]) select 2); _customActions = _customActions + ((_vehicle getVariable [[QGVAR(Interactions), QGVAR(ACE_InteractionsSelf)] select _menuType, [-1, [], []]]) select 2);
}; };
if(_menuType==0) then { if(_menuType==0) then {
@ -85,7 +85,7 @@ if (AGM_Interaction_MenuType < 2) then {
_showDisabled = _customAction select 4; _showDisabled = _customAction select 4;
_priority = _customAction select 5; _priority = _customAction select 5;
if ((_showDisabled || {[_object, _player] call _condition}) && {[_object, _distance] call AGM_Interaction_fnc_isInRange || {_distance == 0}}) then { if ((_showDisabled || {[_object, _player] call _condition}) && {[_object, _distance] call FUNC(isInRange) || {_distance == 0}}) then {
_actions pushBack [_displayName, _statement, _condition, _priority, [], DEFAULT_ICON, "", {true}, [], _distance, ""]; _actions pushBack [_displayName, _statement, _condition, _priority, [], DEFAULT_ICON, "", {true}, [], _distance, ""];
}; };
}; };
@ -93,7 +93,7 @@ if (AGM_Interaction_MenuType < 2) then {
} else { // self interactions do not have distance } else { // self interactions do not have distance
for "_index" from 0 to (count _customActions - 1) do { for "_index" from 0 to (count _customActions - 1) do {
_customAction = _customActions select _index; _customAction = _customActions select _index;
_displayName = _customAction select 0; _displayName = _customAction select 0;
_condition = _customAction select 1; _condition = _customAction select 1;
@ -111,8 +111,8 @@ if (AGM_Interaction_MenuType < 2) then {
}; };
if (count _actions == 0) exitWith {};//call ([AGM_Interaction_fnc_onButtonDown, AGM_Interaction_fnc_onButtonDownSelf] select _menuType)}; if (count _actions == 0) exitWith {};
_actions call AGM_Interaction_fnc_sortOptionsByPriority; _actions call FUNC(sortOptionsByPriority);
AGM_Interaction_Buttons = _actions; GVAR(Buttons) = _actions;
[_mainButtonAction, (_this select 2) != "", (profileNamespace getVariable ["AGM_Interaction_FlowMenu", false]), _menuType == 1, _object] call AGM_Interaction_fnc_initialiseInteraction; [_mainButtonAction, (_this select 2) != "", (profileNamespace getVariable [QGVAR(FlowMenu), false]), _menuType == 1, _object] call FUNC(initialiseInteraction);

View File

@ -1,23 +1,23 @@
/* /*
Name: AGM_Interaction_fnc_showMouseHint
Author(s): Author(s):
Garth de Wet (LH) Garth de Wet (LH)
Description: Description:
Shows the interaction helper text with the mouse buttons at the bottom middle of the screen Shows the interaction helper text with the mouse buttons at the bottom middle of the screen
Parameters: Parameters:
0: STRING - Left click text 0: STRING - Left click text
1: STRING - Right click text 1: STRING - Right click text
3: STRING - (Optional) Scroll text 3: STRING - (Optional) Scroll text
Returns: Returns:
Nothing Nothing
Example: Example:
["Place Explosive", "Cancel"] call AGM_Interaction_fnc_showMouseHint; ["Place Explosive", "Cancel"] call FUNC(showMouseHint);
*/ */
#include "script_component.hpp"
#define GUI_GRID_W (0.025) #define GUI_GRID_W (0.025)
#define GUI_GRID_H (0.04) #define GUI_GRID_H (0.04)
private ["_leftClick", "_rightClick", "_scroll"]; private ["_leftClick", "_rightClick", "_scroll"];
@ -28,9 +28,9 @@ if (count _this > 2) then {
_scroll = _this select 2; _scroll = _this select 2;
}; };
("AGM_InteractionHelper" call BIS_fnc_rscLayer) cutRsc ["AGM_InteractionHelper", "PLAIN",0.5, false]; (QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(InteractionHelper), "PLAIN",0.5, false];
disableSerialization; disableSerialization;
_display = uiNamespace getVariable ["AGM_Helper_Display", objNull]; _display = uiNamespace getVariable ["ACE_Helper_Display", objNull];
if (isNull _display) exitWith{}; if (isNull _display) exitWith{};
(_display displayCtrl 1000) ctrlSetText _leftClick; (_display displayCtrl 1000) ctrlSetText _leftClick;

View File

@ -1,4 +1,5 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_actions", "_count", "_index", "_actionN", "_actionM"]; private ["_actions", "_count", "_index", "_actionN", "_actionM"];

View File

@ -1,20 +1,21 @@
// by commy2 // by commy2
#include "script_component.hpp"
private ["_unit", "_message"]; private ["_unit", "_message"];
_tapper = _this select 0; _tapper = _this select 0;
_target = _this select 1; _target = _this select 1;
if (_target != AGM_player) exitWith { if (_target != ACE_player) exitWith {
addCamShake [4, 0.5, 5]; addCamShake [4, 0.5, 5];
if !(local _target) then { if !(local _target) then {
[[_tapper, _target], "AGM_Interaction_fnc_tapShoulder", _target] call AGM_Core_fnc_execRemoteFnc; [[_tapper, _target], QUOTE(FUNC(tapShoulder)), _target] call EFUNC(execRemoteFnc);
}; };
}; };
addCamShake [4, 0.5, 5]; addCamShake [4, 0.5, 5];
//_message = format ["%1 tapped you on your shoulder.", [_unit] call AGM_Core_fnc_getName]; //_message = format ["%1 tapped you on your shoulder.", [_unit] call EFUNC(core,getName)];
_message = localize "STR_AGM_Interaction_YouWereTapped"; _message = localize "STR_ACE_Interaction_YouWereTapped";
[_message] call AGM_Core_fnc_displayTextStructured; [_message] call EFUNC(core,displayTextStructured);

View File

@ -1,4 +1,5 @@
// by commy2 // by commy2
#include "script_component.hpp"
disableSerialization; disableSerialization;
_ctrl = ctrlParent (_this select 0) displayCtrl 40; _ctrl = ctrlParent (_this select 0) displayCtrl 40;

View File

@ -0,0 +1,12 @@
#define COMPONENT interaction
#include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_INTERACTION
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_INTERACTION
#define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACTION
#endif
#include "\z\ace\Addons\main\script_macros.hpp"

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-12-20 --> <!-- Edited with tabler - 2014-12-20 -->
<Project name="AGM"> <Project name="ACE">
<Package name="Interaction"> <Package name="Interaction">
<Key ID="STR_AGM_Interaction_InteractionMenu"> <Key ID="STR_ACE_Interaction_InteractionMenu">
<English>Interaction Menu</English> <English>Interaction Menu</English>
<German>Interaktionsmenü</German> <German>Interaktionsmenü</German>
<Spanish>Menú de interacción</Spanish> <Spanish>Menú de interacción</Spanish>
@ -14,7 +14,7 @@
<Portuguese>Menu de Interação</Portuguese> <Portuguese>Menu de Interação</Portuguese>
<Italian>Menù Interattivo</Italian> <Italian>Menù Interattivo</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_InteractionMenuSelf"> <Key ID="STR_ACE_Interaction_InteractionMenuSelf">
<English>Interaction Menu (Self)</English> <English>Interaction Menu (Self)</English>
<German>Interaktionsmenü (Selbst)</German> <German>Interaktionsmenü (Selbst)</German>
<Spanish>Menú de interacción (Propia)</Spanish> <Spanish>Menú de interacción (Propia)</Spanish>
@ -26,7 +26,7 @@
<Portuguese>Menu de Interação (Individual)</Portuguese> <Portuguese>Menu de Interação (Individual)</Portuguese>
<Italian>Menù Interattivo (Individuale)</Italian> <Italian>Menù Interattivo (Individuale)</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_OpenDoor"> <Key ID="STR_ACE_Interaction_OpenDoor">
<English>Open / Close Door</English> <English>Open / Close Door</English>
<German>Tür öffnen / schließen</German> <German>Tür öffnen / schließen</German>
<Spanish>Abrir / Cerrar puerta</Spanish> <Spanish>Abrir / Cerrar puerta</Spanish>
@ -38,7 +38,7 @@
<Portuguese>Abrir / Fechar Porta</Portuguese> <Portuguese>Abrir / Fechar Porta</Portuguese>
<Italian>Apri / Chiudi la porta</Italian> <Italian>Apri / Chiudi la porta</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_LockDoor"> <Key ID="STR_ACE_Interaction_LockDoor">
<English>Lock Door</English> <English>Lock Door</English>
<German>Tür sperren</German> <German>Tür sperren</German>
<Spanish>Bloquear puerta</Spanish> <Spanish>Bloquear puerta</Spanish>
@ -50,7 +50,7 @@
<Polish>Zablokuj drzwi</Polish> <Polish>Zablokuj drzwi</Polish>
<Czech>Zamknout dveře</Czech> <Czech>Zamknout dveře</Czech>
</Key> </Key>
<Key ID="STR_AGM_Interaction_UnlockDoor"> <Key ID="STR_ACE_Interaction_UnlockDoor">
<English>Unlock Door</English> <English>Unlock Door</English>
<German>Tür entsperren</German> <German>Tür entsperren</German>
<Spanish>Desbloquear puerta</Spanish> <Spanish>Desbloquear puerta</Spanish>
@ -62,7 +62,7 @@
<Polish>Odblokuj drzwi</Polish> <Polish>Odblokuj drzwi</Polish>
<Czech>Odemknout dveře</Czech> <Czech>Odemknout dveře</Czech>
</Key> </Key>
<Key ID="STR_AGM_Interaction_LockedDoor"> <Key ID="STR_ACE_Interaction_LockedDoor">
<English>Locked Door</English> <English>Locked Door</English>
<German>Tür gesperrt</German> <German>Tür gesperrt</German>
<Spanish>Puerta bloqueada</Spanish> <Spanish>Puerta bloqueada</Spanish>
@ -74,7 +74,7 @@
<Polish>Zablokowano drzwi</Polish> <Polish>Zablokowano drzwi</Polish>
<Czech>Zamčené dveře</Czech> <Czech>Zamčené dveře</Czech>
</Key> </Key>
<Key ID="STR_AGM_Interaction_UnlockedDoor"> <Key ID="STR_ACE_Interaction_UnlockedDoor">
<English>Unlocked Door</English> <English>Unlocked Door</English>
<German>Tür entsperrt</German> <German>Tür entsperrt</German>
<Spanish>Puerta desbloqueada</Spanish> <Spanish>Puerta desbloqueada</Spanish>
@ -86,7 +86,7 @@
<Polish>Odblokowano drzwi</Polish> <Polish>Odblokowano drzwi</Polish>
<Czech>Odemčené dveře</Czech> <Czech>Odemčené dveře</Czech>
</Key> </Key>
<Key ID="STR_AGM_Interaction_JoinGroup"> <Key ID="STR_ACE_Interaction_JoinGroup">
<English>Join group</English> <English>Join group</English>
<German>Gruppe beitreten</German> <German>Gruppe beitreten</German>
<Spanish>Unirse al grupo</Spanish> <Spanish>Unirse al grupo</Spanish>
@ -98,7 +98,7 @@
<Portuguese>Unir-se ao grupo</Portuguese> <Portuguese>Unir-se ao grupo</Portuguese>
<Italian>Unisciti alla squadra</Italian> <Italian>Unisciti alla squadra</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_LeaveGroup"> <Key ID="STR_ACE_Interaction_LeaveGroup">
<English>Leave Group</English> <English>Leave Group</English>
<German>Gruppe verlassen</German> <German>Gruppe verlassen</German>
<Spanish>Dejar grupo</Spanish> <Spanish>Dejar grupo</Spanish>
@ -110,7 +110,7 @@
<Portuguese>Deixar grupo</Portuguese> <Portuguese>Deixar grupo</Portuguese>
<Italian>Lascia la squadra</Italian> <Italian>Lascia la squadra</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_BecomeLeader"> <Key ID="STR_ACE_Interaction_BecomeLeader">
<English>Become Leader</English> <English>Become Leader</English>
<German>Grp.-führung übern.</German> <German>Grp.-führung übern.</German>
<Spanish>Asumir el liderazgo</Spanish> <Spanish>Asumir el liderazgo</Spanish>
@ -122,7 +122,7 @@
<Portuguese>Tornar-se Líder</Portuguese> <Portuguese>Tornar-se Líder</Portuguese>
<Italian>Prendi il comando</Italian> <Italian>Prendi il comando</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Dance"> <Key ID="STR_ACE_Interaction_Dance">
<English>DANCE!</English> <English>DANCE!</English>
<German>TANZEN!</German> <German>TANZEN!</German>
<Spanish>BAILAR!</Spanish> <Spanish>BAILAR!</Spanish>
@ -134,7 +134,7 @@
<Portuguese>DANCE!</Portuguese> <Portuguese>DANCE!</Portuguese>
<Italian>Balla!</Italian> <Italian>Balla!</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_StopDancing"> <Key ID="STR_ACE_Interaction_StopDancing">
<English>Stop Dancing</English> <English>Stop Dancing</English>
<German>Tanzen abbrechen</German> <German>Tanzen abbrechen</German>
<Spanish>Dejar de bailar</Spanish> <Spanish>Dejar de bailar</Spanish>
@ -146,7 +146,7 @@
<Portuguese>Parar de dançar</Portuguese> <Portuguese>Parar de dançar</Portuguese>
<Italian>Smetti di ballare</Italian> <Italian>Smetti di ballare</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Back"> <Key ID="STR_ACE_Interaction_Back">
<English>&lt;&lt; Back</English> <English>&lt;&lt; Back</English>
<German>&lt;&lt; Zurück</German> <German>&lt;&lt; Zurück</German>
<Spanish>&lt;&lt; Atrás</Spanish> <Spanish>&lt;&lt; Atrás</Spanish>
@ -158,7 +158,7 @@
<Portuguese>&lt;&lt; Voltar</Portuguese> <Portuguese>&lt;&lt; Voltar</Portuguese>
<Italian>&lt;&lt; Indietro</Italian> <Italian>&lt;&lt; Indietro</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures"> <Key ID="STR_ACE_Interaction_Gestures">
<English>Gestures &gt;&gt;</English> <English>Gestures &gt;&gt;</English>
<German>Gesten &gt;&gt;</German> <German>Gesten &gt;&gt;</German>
<Spanish>Gestos &gt;&gt;</Spanish> <Spanish>Gestos &gt;&gt;</Spanish>
@ -170,7 +170,7 @@
<Portuguese>Gestos &gt;&gt;</Portuguese> <Portuguese>Gestos &gt;&gt;</Portuguese>
<Italian>Segnali gestuali &gt;&gt;</Italian> <Italian>Segnali gestuali &gt;&gt;</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Attack"> <Key ID="STR_ACE_Interaction_Gestures_Attack">
<English>Attack</English> <English>Attack</English>
<German>Angreifen</German> <German>Angreifen</German>
<Spanish>Atacar</Spanish> <Spanish>Atacar</Spanish>
@ -182,7 +182,7 @@
<Portuguese>Atacar</Portuguese> <Portuguese>Atacar</Portuguese>
<Italian>Attaccare</Italian> <Italian>Attaccare</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Advance"> <Key ID="STR_ACE_Interaction_Gestures_Advance">
<English>Advance</English> <English>Advance</English>
<German>Vordringen</German> <German>Vordringen</German>
<Spanish>Avanzar</Spanish> <Spanish>Avanzar</Spanish>
@ -194,7 +194,7 @@
<Portuguese>Avançar</Portuguese> <Portuguese>Avançar</Portuguese>
<Italian>Avanzare</Italian> <Italian>Avanzare</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Go"> <Key ID="STR_ACE_Interaction_Gestures_Go">
<English>Go</English> <English>Go</English>
<German>Los</German> <German>Los</German>
<Spanish>Adelante</Spanish> <Spanish>Adelante</Spanish>
@ -206,7 +206,7 @@
<Portuguese>Mover-se</Portuguese> <Portuguese>Mover-se</Portuguese>
<Italian>Muoversi</Italian> <Italian>Muoversi</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Follow"> <Key ID="STR_ACE_Interaction_Gestures_Follow">
<English>Follow</English> <English>Follow</English>
<German>Folgen</German> <German>Folgen</German>
<Spanish>Seguirme</Spanish> <Spanish>Seguirme</Spanish>
@ -218,7 +218,7 @@
<Portuguese>Seguir</Portuguese> <Portuguese>Seguir</Portuguese>
<Italian>Seguire</Italian> <Italian>Seguire</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Point"> <Key ID="STR_ACE_Interaction_Gestures_Point">
<English>Point</English> <English>Point</English>
<German>Zeigen</German> <German>Zeigen</German>
<Spanish>Señalar</Spanish> <Spanish>Señalar</Spanish>
@ -230,7 +230,7 @@
<Portuguese>Apontar</Portuguese> <Portuguese>Apontar</Portuguese>
<Italian>Puntare a</Italian> <Italian>Puntare a</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Up"> <Key ID="STR_ACE_Interaction_Gestures_Up">
<English>Up</English> <English>Up</English>
<German>Aufstehen</German> <German>Aufstehen</German>
<Spanish>Arriba</Spanish> <Spanish>Arriba</Spanish>
@ -242,7 +242,7 @@
<Portuguese>Acima</Portuguese> <Portuguese>Acima</Portuguese>
<Italian>Alzarsi</Italian> <Italian>Alzarsi</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Cover"> <Key ID="STR_ACE_Interaction_Gestures_Cover">
<English>Cover</English> <English>Cover</English>
<German>Deckung</German> <German>Deckung</German>
<Spanish>Cubrirse</Spanish> <Spanish>Cubrirse</Spanish>
@ -254,7 +254,7 @@
<Portuguese>Proteger-se</Portuguese> <Portuguese>Proteger-se</Portuguese>
<Italian>Copertura</Italian> <Italian>Copertura</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Cease_Fire"> <Key ID="STR_ACE_Interaction_Gestures_Cease_Fire">
<English>Cease Fire</English> <English>Cease Fire</English>
<German>Feuer einstellen</German> <German>Feuer einstellen</German>
<Spanish>Alto el fuego</Spanish> <Spanish>Alto el fuego</Spanish>
@ -266,7 +266,7 @@
<Portuguese>Cessar Fogo</Portuguese> <Portuguese>Cessar Fogo</Portuguese>
<Italian>Cessare il Fuoco</Italian> <Italian>Cessare il Fuoco</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Freeze"> <Key ID="STR_ACE_Interaction_Gestures_Freeze">
<English>Freeze</English> <English>Freeze</English>
<German>Keine Bewegung</German> <German>Keine Bewegung</German>
<Spanish>Alto</Spanish> <Spanish>Alto</Spanish>
@ -278,7 +278,7 @@
<Portuguese>Alto</Portuguese> <Portuguese>Alto</Portuguese>
<Italian>Fermi</Italian> <Italian>Fermi</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Hi"> <Key ID="STR_ACE_Interaction_Gestures_Hi">
<English>Hi</English> <English>Hi</English>
<German>Hallo</German> <German>Hallo</German>
<Spanish>Hola</Spanish> <Spanish>Hola</Spanish>
@ -290,7 +290,7 @@
<Portuguese>Olá</Portuguese> <Portuguese>Olá</Portuguese>
<Italian>Ciao</Italian> <Italian>Ciao</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_Yes"> <Key ID="STR_ACE_Interaction_Gestures_Yes">
<English>Yes</English> <English>Yes</English>
<German>Ja</German> <German>Ja</German>
<Spanish>Si</Spanish> <Spanish>Si</Spanish>
@ -302,7 +302,7 @@
<Portuguese>Sim</Portuguese> <Portuguese>Sim</Portuguese>
<Italian>Si</Italian> <Italian>Si</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Gestures_No"> <Key ID="STR_ACE_Interaction_Gestures_No">
<English>No</English> <English>No</English>
<German>Nein</German> <German>Nein</German>
<Spanish>No</Spanish> <Spanish>No</Spanish>
@ -314,7 +314,7 @@
<Portuguese>Não</Portuguese> <Portuguese>Não</Portuguese>
<Italian>No</Italian> <Italian>No</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_WeaponOnBack"> <Key ID="STR_ACE_Interaction_WeaponOnBack">
<English>Put weapon on back</English> <English>Put weapon on back</English>
<German>Waffe wegstecken</German> <German>Waffe wegstecken</German>
<Spanish>Arma a la espalda</Spanish> <Spanish>Arma a la espalda</Spanish>
@ -326,7 +326,7 @@
<Portuguese>Colocar arma nas costas</Portuguese> <Portuguese>Colocar arma nas costas</Portuguese>
<Italian>Metti l'arma in spalla</Italian> <Italian>Metti l'arma in spalla</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_TapShoulder"> <Key ID="STR_ACE_Interaction_TapShoulder">
<English>Tap Shoulder</English> <English>Tap Shoulder</English>
<German>Auf Schulter klopfen</German> <German>Auf Schulter klopfen</German>
<Spanish>Tocar el hombro</Spanish> <Spanish>Tocar el hombro</Spanish>
@ -338,7 +338,7 @@
<Portuguese>Tocar ombro</Portuguese> <Portuguese>Tocar ombro</Portuguese>
<Italian>Dai un colpetto</Italian> <Italian>Dai un colpetto</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_YouWereTapped"> <Key ID="STR_ACE_Interaction_YouWereTapped">
<English>You were tapped on the shoulder.</English> <English>You were tapped on the shoulder.</English>
<German>Dir wurde auf die Schulter geklopft</German> <German>Dir wurde auf die Schulter geklopft</German>
<Spanish>Te tocaron el hombro.</Spanish> <Spanish>Te tocaron el hombro.</Spanish>
@ -350,7 +350,7 @@
<Portuguese>Você foi tocado no ombro.</Portuguese> <Portuguese>Você foi tocado no ombro.</Portuguese>
<Italian>Ti è stato dato un colpetto sulla spalla</Italian> <Italian>Ti è stato dato un colpetto sulla spalla</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_CancelSelection"> <Key ID="STR_ACE_Interaction_CancelSelection">
<English>Cancel</English> <English>Cancel</English>
<German>Abbrechen</German> <German>Abbrechen</German>
<Spanish>Cancelar</Spanish> <Spanish>Cancelar</Spanish>
@ -362,7 +362,7 @@
<Portuguese>Cancelar</Portuguese> <Portuguese>Cancelar</Portuguese>
<Hungarian>Mégse</Hungarian> <Hungarian>Mégse</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_MakeSelection"> <Key ID="STR_ACE_Interaction_MakeSelection">
<English>Select</English> <English>Select</English>
<German>Wählen</German> <German>Wählen</German>
<Spanish>Seleccionar</Spanish> <Spanish>Seleccionar</Spanish>
@ -374,7 +374,7 @@
<Portuguese>Selecionar</Portuguese> <Portuguese>Selecionar</Portuguese>
<Hungarian>Kiválaszt</Hungarian> <Hungarian>Kiválaszt</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_SendAway"> <Key ID="STR_ACE_Interaction_SendAway">
<English>Go Away!</English> <English>Go Away!</English>
<German>Geh Weg!</German> <German>Geh Weg!</German>
<Spanish>Aléjate!</Spanish> <Spanish>Aléjate!</Spanish>
@ -386,7 +386,7 @@
<Portuguese>Vá Embora!</Portuguese> <Portuguese>Vá Embora!</Portuguese>
<Italian>Via di qui!</Italian> <Italian>Via di qui!</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_GetDown"> <Key ID="STR_ACE_Interaction_GetDown">
<English>Get Down!</English> <English>Get Down!</English>
<German>Auf Den Boden!</German> <German>Auf Den Boden!</German>
<Spanish>Al suelo!</Spanish> <Spanish>Al suelo!</Spanish>
@ -398,7 +398,7 @@
<Portuguese>Abaixe-se!</Portuguese> <Portuguese>Abaixe-se!</Portuguese>
<Italian>A Terra!</Italian> <Italian>A Terra!</Italian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_TeamManagement"> <Key ID="STR_ACE_Interaction_TeamManagement">
<English>Team Management &gt;&gt;</English> <English>Team Management &gt;&gt;</English>
<German>Team Management &gt;&gt;</German> <German>Team Management &gt;&gt;</German>
<Spanish>Gestión de equipo &gt;&gt;</Spanish> <Spanish>Gestión de equipo &gt;&gt;</Spanish>
@ -410,7 +410,7 @@
<Italian>Organizzazione Squadra &gt;&gt;</Italian> <Italian>Organizzazione Squadra &gt;&gt;</Italian>
<Hungarian>Csapat kezelés &gt;&gt;</Hungarian> <Hungarian>Csapat kezelés &gt;&gt;</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_TeamRED"> <Key ID="STR_ACE_Interaction_TeamRED">
<English>Red</English> <English>Red</English>
<German>Rot</German> <German>Rot</German>
<Spanish>Rojo</Spanish> <Spanish>Rojo</Spanish>
@ -422,7 +422,7 @@
<Italian>Rosso</Italian> <Italian>Rosso</Italian>
<Hungarian>Piros</Hungarian> <Hungarian>Piros</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_TeamGREEN"> <Key ID="STR_ACE_Interaction_TeamGREEN">
<English>Green</English> <English>Green</English>
<German>Grün</German> <German>Grün</German>
<Spanish>Verde</Spanish> <Spanish>Verde</Spanish>
@ -434,7 +434,7 @@
<Italian>Verde</Italian> <Italian>Verde</Italian>
<Hungarian>Zöld</Hungarian> <Hungarian>Zöld</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_TeamBLUE"> <Key ID="STR_ACE_Interaction_TeamBLUE">
<English>Blue</English> <English>Blue</English>
<German>Blau</German> <German>Blau</German>
<Spanish>Azul</Spanish> <Spanish>Azul</Spanish>
@ -446,7 +446,7 @@
<Italian>Blu</Italian> <Italian>Blu</Italian>
<Hungarian>Kék</Hungarian> <Hungarian>Kék</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_TeamYELLOW"> <Key ID="STR_ACE_Interaction_TeamYELLOW">
<English>Yellow</English> <English>Yellow</English>
<German>Gelb</German> <German>Gelb</German>
<Spanish>Amarillo</Spanish> <Spanish>Amarillo</Spanish>
@ -458,7 +458,7 @@
<Italian>Giallo</Italian> <Italian>Giallo</Italian>
<Hungarian>Sárga</Hungarian> <Hungarian>Sárga</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_JoinTeamRed"> <Key ID="STR_ACE_Interaction_JoinTeamRed">
<English>Join Team Red</English> <English>Join Team Red</English>
<German>Team Rot beitreten</German> <German>Team Rot beitreten</German>
<Spanish>Unirse al equipo rojo</Spanish> <Spanish>Unirse al equipo rojo</Spanish>
@ -470,7 +470,7 @@
<Italian>Entra nella Squadra Rossa</Italian> <Italian>Entra nella Squadra Rossa</Italian>
<Hungarian>Csatlakozás a piros csapathoz</Hungarian> <Hungarian>Csatlakozás a piros csapathoz</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_JoinTeamGreen"> <Key ID="STR_ACE_Interaction_JoinTeamGreen">
<English>Join Team Green</English> <English>Join Team Green</English>
<German>Team Grün beitreten</German> <German>Team Grün beitreten</German>
<Spanish>Unirse al equipo verde</Spanish> <Spanish>Unirse al equipo verde</Spanish>
@ -482,7 +482,7 @@
<Italian>Entra nella Squadra Verde</Italian> <Italian>Entra nella Squadra Verde</Italian>
<Hungarian>Csatlakozás a zöld csapathoz</Hungarian> <Hungarian>Csatlakozás a zöld csapathoz</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_JoinTeamBlue"> <Key ID="STR_ACE_Interaction_JoinTeamBlue">
<English>Join Team Blue</English> <English>Join Team Blue</English>
<German>Team Blau beitreten</German> <German>Team Blau beitreten</German>
<Spanish>Unirse al equipo azul</Spanish> <Spanish>Unirse al equipo azul</Spanish>
@ -494,7 +494,7 @@
<Italian>Entra nella Squadra Blu</Italian> <Italian>Entra nella Squadra Blu</Italian>
<Hungarian>Csatlakozás a kék csapathoz</Hungarian> <Hungarian>Csatlakozás a kék csapathoz</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_JoinTeamYellow"> <Key ID="STR_ACE_Interaction_JoinTeamYellow">
<English>Join Team Yellow</English> <English>Join Team Yellow</English>
<German>Team Gelb beitreten</German> <German>Team Gelb beitreten</German>
<Spanish>Unirse al equipo amarillo</Spanish> <Spanish>Unirse al equipo amarillo</Spanish>
@ -506,7 +506,7 @@
<Italian>Entra nella Squadra Gialla</Italian> <Italian>Entra nella Squadra Gialla</Italian>
<Hungarian>Csatlakozás a sárga csapathoz</Hungarian> <Hungarian>Csatlakozás a sárga csapathoz</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_JoinedTeam"> <Key ID="STR_ACE_Interaction_JoinedTeam">
<English>You joined Team %1</English> <English>You joined Team %1</English>
<German>Du bist Team %1 beigetreten</German> <German>Du bist Team %1 beigetreten</German>
<Spanish>Te has unido al equipo %1</Spanish> <Spanish>Te has unido al equipo %1</Spanish>
@ -518,7 +518,7 @@
<Italian>Sei entrato nella Squadra %1</Italian> <Italian>Sei entrato nella Squadra %1</Italian>
<Hungarian>Csatlakoztál a %1 csapathoz</Hungarian> <Hungarian>Csatlakoztál a %1 csapathoz</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_LeaveTeam"> <Key ID="STR_ACE_Interaction_LeaveTeam">
<English>Leave Team</English> <English>Leave Team</English>
<German>Team verlassen</German> <German>Team verlassen</German>
<Spanish>Dejar equipo</Spanish> <Spanish>Dejar equipo</Spanish>
@ -530,7 +530,7 @@
<Italian>Lascia la Squadra</Italian> <Italian>Lascia la Squadra</Italian>
<Hungarian>Csapat elhagyása</Hungarian> <Hungarian>Csapat elhagyása</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_LeftTeam"> <Key ID="STR_ACE_Interaction_LeftTeam">
<English>You left the Team</English> <English>You left the Team</English>
<German>Du hast das Team verlassen</German> <German>Du hast das Team verlassen</German>
<Spanish>Has dejado el equipo</Spanish> <Spanish>Has dejado el equipo</Spanish>
@ -542,7 +542,7 @@
<Italian>Hai lasciato la squadra</Italian> <Italian>Hai lasciato la squadra</Italian>
<Hungarian>Elhagytad a csapatot</Hungarian> <Hungarian>Elhagytad a csapatot</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Pardon"> <Key ID="STR_ACE_Interaction_Pardon">
<English>Pardon</English> <English>Pardon</English>
<German>Begnadigen</German> <German>Begnadigen</German>
<Spanish>Perdonar</Spanish> <Spanish>Perdonar</Spanish>
@ -554,7 +554,7 @@
<Italian>Perdona</Italian> <Italian>Perdona</Italian>
<Hungarian>Megbocsátás</Hungarian> <Hungarian>Megbocsátás</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_FlowMenu"> <Key ID="STR_ACE_Interaction_FlowMenu">
<English>Flow Menu</English> <English>Flow Menu</English>
<German>Mausradmenü</German> <German>Mausradmenü</German>
<Polish>Flow Menu</Polish> <Polish>Flow Menu</Polish>
@ -566,7 +566,7 @@
<Italian>Menù a Scorrimento</Italian> <Italian>Menù a Scorrimento</Italian>
<Hungarian>Legördülő menü</Hungarian> <Hungarian>Legördülő menü</Hungarian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_ScrollHint"> <Key ID="STR_ACE_Interaction_ScrollHint">
<English>Scroll</English> <English>Scroll</English>
<German>Scrollen</German> <German>Scrollen</German>
<Polish>Przewiń</Polish> <Polish>Przewiń</Polish>
@ -578,7 +578,7 @@
<Hungarian>Görgetés</Hungarian> <Hungarian>Görgetés</Hungarian>
<Czech>Otáčení</Czech> <Czech>Otáčení</Czech>
</Key> </Key>
<Key ID="STR_AGM_Interaction_ModifierKey"> <Key ID="STR_ACE_Interaction_ModifierKey">
<English>Modifier Key</English> <English>Modifier Key</English>
<German>Modifikator</German> <German>Modifikator</German>
<Polish>Modyfikator</Polish> <Polish>Modyfikator</Polish>
@ -590,7 +590,7 @@
<Hungarian>Módosító billentyű</Hungarian> <Hungarian>Módosító billentyű</Hungarian>
<Czech>Modifikátor</Czech> <Czech>Modifikátor</Czech>
</Key> </Key>
<Key ID="STR_AGM_Interaction_NotInRange"> <Key ID="STR_ACE_Interaction_NotInRange">
<English>Not in Range</English> <English>Not in Range</English>
<German>Außer Reichweite</German> <German>Außer Reichweite</German>
<French>Hors de portée.</French> <French>Hors de portée.</French>
@ -601,7 +601,7 @@
<Polish>Poza zasięgiem</Polish> <Polish>Poza zasięgiem</Polish>
<Czech>Mimo dosah</Czech> <Czech>Mimo dosah</Czech>
</Key> </Key>
<Key ID="STR_AGM_Interaction_AutoCloseMenu"> <Key ID="STR_ACE_Interaction_AutoCloseMenu">
<English>Close Menu on Key Release</English> <English>Close Menu on Key Release</English>
<German>Menü nach Loslassen schließen</German> <German>Menü nach Loslassen schließen</German>
<Polish>Zamknij menu automatycznie</Polish> <Polish>Zamknij menu automatycznie</Polish>
@ -611,7 +611,7 @@
<Russian>Закрывать меню при отжатии клавиши</Russian> <Russian>Закрывать меню при отжатии клавиши</Russian>
<Czech>Menu interakce (Na držení)</Czech> <Czech>Menu interakce (Na držení)</Czech>
</Key> </Key>
<Key ID="STR_AGM_Interaction_AutoCenterCursor"> <Key ID="STR_ACE_Interaction_AutoCenterCursor">
<English>Auto Center Cursor</English> <English>Auto Center Cursor</English>
<German>Mauszeiger automatisch zentrieren</German> <German>Mauszeiger automatisch zentrieren</German>
<Spanish>Auto-centrar cursor</Spanish> <Spanish>Auto-centrar cursor</Spanish>
@ -620,7 +620,7 @@
<Hungarian>Egér auto-centrírozása</Hungarian> <Hungarian>Egér auto-centrírozása</Hungarian>
<Russian>Автоцентрирование курсора</Russian> <Russian>Автоцентрирование курсора</Russian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Equipment"> <Key ID="STR_ACE_Interaction_Equipment">
<English>Equipment &gt;&gt;</English> <English>Equipment &gt;&gt;</English>
<German>Ausrüstung &gt;&gt;</German> <German>Ausrüstung &gt;&gt;</German>
<Spanish>Equipamiento &gt;&gt;</Spanish> <Spanish>Equipamiento &gt;&gt;</Spanish>
@ -630,7 +630,7 @@
<Hungarian>Felszerelés &gt;&gt;</Hungarian> <Hungarian>Felszerelés &gt;&gt;</Hungarian>
<Russian>Снаряжение &gt;&gt;</Russian> <Russian>Снаряжение &gt;&gt;</Russian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Push"> <Key ID="STR_ACE_Interaction_Push">
<English>Push</English> <English>Push</English>
<German>Schieben</German> <German>Schieben</German>
<Spanish>Empujar</Spanish> <Spanish>Empujar</Spanish>
@ -640,7 +640,7 @@
<Hungarian>Tolás</Hungarian> <Hungarian>Tolás</Hungarian>
<Russian>Толкать</Russian> <Russian>Толкать</Russian>
</Key> </Key>
<Key ID="STR_AGM_Interaction_Interact"> <Key ID="STR_ACE_Interaction_Interact">
<English>Interact</English> <English>Interact</English>
<German>Interagiere</German> <German>Interagiere</German>
<Czech>Interakce</Czech> <Czech>Interakce</Czech>