Merge remote-tracking branch 'origin' into agmNameTagsPort

This commit is contained in:
bux578 2015-01-13 20:14:19 +01:00
commit a29c48fd9a
44 changed files with 177 additions and 571 deletions

View File

@ -1,11 +0,0 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) );
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_postInit.sqf) );
};
};

View File

@ -1,64 +0,0 @@
// TODO Check what faction classes are available within ACE and move this to a core pbo
class CfgFactionClasses
{
class NO_CATEGORY;
class ACEMisc: NO_CATEGORY {
displayName = "ACE Misc Modules";
};
};
class CfgVehicles
{
class Logic;
class Module_F: Logic {
class ArgumentsBaseUnits {
};
};
class GVAR(Module): Module_F {
scope = 2;
displayName = $STR_ACE_NameTags_Title;
icon = QUOTE(PATHOF(data\module_icon.paa));
category = "ACEMisc";
function = QUOTE(FUNC(initalizeModule));
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
class Arguments {
class enableModule {
displayName = $STR_ACE_NameTags_Arg_enable;
description = $STR_ACE_NameTags_Arg_enable_Desc;
typeName = "BOOL";
defaultValue = 0;
};
class indirectDistance {
displayName = $STR_ACE_NameTags_Arg_indirectDistance;
description = $STR_ACE_NameTags_Arg_indirectDistance_Desc;
typeName = "NUMBER";
defaultValue = 7.5;
};
class cursorTargetDistance {
displayName = $STR_ACE_NameTags_Arg_directDistance;
description = $STR_ACE_NameTags_Arg_directDistance_Desc;
typeName = "NUMBER";
defaultValue = 20;
};
class allowDifferentSides {
displayName = $STR_ACE_NameTags_Arg_differentSides;
description = $STR_ACE_NameTags_Arg_differentSides_Desc;
typeName = "BOOL";
defaultValue = 0;
};
class enableSoundWaves {
displayName = $STR_ACE_NameTags_Arg_soundWaves;
description = $STR_ACE_NameTags_Arg_soundWaves_Desc;
typeName = "BOOL";
defaultValue = 0;
};
};
class ModuleDescription {
description = $STR_ACE_NameTags_ModuleDesc;
sync[] = {};
};
};
};

View File

@ -1,66 +0,0 @@
/**
* XEH_postInit.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
if (!hasInterface) exitwith {}; // No need for this module on HC or dedicated server.
#include "script_component.hpp"
// Settings
if (isNil QUOTE(ACE_NameTagsModule)) then {
GVAR(INDIRECT_TAGS_DISTANCE) = 7.5;
GVAR(DIRECT_TAG_DISTANCE) = 20;
GVAR(ENABLE_SOUNDWAVES) = false;
GVAR(ALLOW_OWN_SIDE_ONLY) = true;
GVAR(ENABLE_MODULE) = true;
};
// In case the module has been placed and the enable setting has been put to false
if (!GVAR(ENABLE_MODULE)) exitwith {};
// Client side options
// TODO Implement a framework for adjusting client side settings.
GVAR(DRAW_TAG_ICONS) = true;
GVAR(ENABLE_INDIRECT) = false;
GVAR(TAG_DISPLAY_COLOR) = [1,1,1,1];
GVAR(SHOW_SOUNDWAVES) = false;
GVAR(DISPLAY_RANK) = false;
// If the distance values are set incorrectly, ensure we handle this
if (GVAR(DIRECT_TAG_DISTANCE) < GVAR(INDIRECT_TAGS_DISTANCE)) then {
GVAR(DIRECT_TAG_DISTANCE) = GVAR(INDIRECT_TAGS_DISTANCE);
};
// If both are below 1m, exit because they will not show up.
if (GVAR(DIRECT_TAG_DISTANCE) < 1) exitwith {};
// Draw the icons for each nametag
// TODO Look into replacement with cutRsc instead of icon3d
addMissionEventHandler ["Draw3D", FUNC(drawNameTags)];
if (GVAR(ENABLE_SOUNDWAVES)) then {
GVAR(SOUNDWAVE_ICONS) = [QUOTE(PATHTOF(data\soundwaves\soundwave1.paa)),QUOTE(PATHTOF(data\soundwaves\soundwave2.paa)), QUOTE(PATHTOF(data\soundwaves\soundwave3.paa)), QUOTE(PATHTOF(data\soundwaves\soundwave4.paa)), QUOTE(PATHTOF(data\soundwaves\soundwave5.paa)), QUOTE(PATHTOF(data\soundwaves\soundwave6.paa)), QUOTE(PATHTOF(data\soundwaves\soundwave7.paa)), QUOTE(PATHTOF(data\soundwaves\soundwave8.paa)), QUOTE(PATHTOF(data\soundwaves\soundwave9.paa)), QUOTE(PATHTOF(data\soundwaves\soundwave_silent.paa))];
// TODO Implement function for checking if an addon is loaded
//if (["task_force_radio"] call ace_fnc_isModLoaded_F) then {
if (isnil "TFAR_fnc_isSpeaking") then {
TFAR_fnc_isSpeaking = { if (!isnil "TF_tangent_lr_pressed") then {(TF_tangent_lr_pressed || TF_tangent_sw_pressed || TF_tangent_dd_pressed)} else { false }; };
};
//};
// TODO Move to unscheduled environment with PFH
[] spawn {
waituntil{
waituntil {alive player};
/*ACE_player*/ player call FUNC(handleSpeaking);
!GVAR(ENABLE_SOUNDWAVES); // exit when the soundwaves have been disabled
};
};
};

View File

@ -1,17 +0,0 @@
/**
* XEH_preInit.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
PREP(drawNameTags);
PREP(findNearbyUnits);
PREP(handleSpeaking);
PREP(allowSide);
PREP(initalizeModule);

View File

@ -1,24 +0,0 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_gui","ACE_main"};
version = VERSION;
author[] = {$STR_ACE_Core_ACETeam};
authorUrl = "http://ACEmod.com"; // TODO website link?
};
};
class CfgAddons {
class PreloadAddons {
class ADDON {
list[] = {QUOTE(ADDON)};
};
};
};
#include "CfgVehicles.hpp"
#include "CfgEventHandlers.hpp"

Binary file not shown.

View File

@ -1,15 +0,0 @@
/**
* fn_allowSide_TAGS.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: side
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
if (GVAR(ALLOW_OWN_SIDE_ONLY)) exitwith {
_this == playerSide; /* side ACE_player */
};
((_this getFriend playerSide /* side ACE_player */ ) >= 0.6);

View File

@ -1,71 +0,0 @@
/**
* fn_drawNameTags_TAGS.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
#define FONT "EtelkaMonospacePro"
private ["_cursor","_soundWaves", "_nameOfUnit","_pos","_color", "_nearbyUnits", "_iconOptions", "_iconSets", "_unit", "_colorOfIcon", "_nearObj"];
if (visibleMap || !GVAR(DRAW_TAG_ICONS)) exitwith {};
_nearObj = if (isNull curatorCamera) then {/* ACE_player */ if (isNull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) then { player} else {(missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull]) }; } else { curatorCamera };
if (GVAR(ENABLE_INDIRECT)) then {
{
_nameOfUnit = _x select 0;
_pos = _x select 1;
_color = _x select 2;
_unit = _x select 3;
_iconDrawn = QUOTE(PATHTOF(data\empty.paa));
if (_unit getvariable [QGVAR(isSpeaking),false] && GVAR(SHOW_SOUNDWAVES)) then {
_iconDrawn = (GVAR(SOUNDWAVE_ICONS) select ((round(random (count GVAR(SOUNDWAVE_ICONS) - 1)))));
};
drawIcon3D [_iconDrawn,_color, _pos, 2, 2, 1 ,toUpper _nameOfUnit, 1, 0.03, FONT];
false;
}count (_nearObj call FUNC(findNearbyUnits));
};
_cursor = cursortarget;
if (_cursor == _cursor && isTouchingGround _cursor) then {
if (_cursor isKindOf "CAManBase" && ((_cursor distance _nearObj) < GVAR(DIRECT_TAG_DISTANCE)) && ((side _cursor) call FUNC(allowSide))) then {
// TODO Improve this switch statement
_pos = visiblePositionASL _cursor;
switch (stance _cursor) do {
case "STAND": {
_pos set [2, ((_cursor modelToWorld [0,0,0]) select 2)+2];
};
case "CROUCH": {
_pos set [2, ((_cursor modelToWorld [0,0,0]) select 2)+1.5];
};
case "PRONE": {
_pos set [2, ((_cursor modelToWorld [0,0,0]) select 2)+0.5];
};
default {
_pos set [2, ((_cursor modelToWorld [0,0,0]) select 2) + 1.5];
};
};
_color = +GVAR(TAG_DISPLAY_COLOR);
_nameOfUnit = name _cursor; //[_cursor] call FUNC(getName); // TODO Implement a getName function
// TODO implement module checking
/*if (ACE_NameTags_SYS_MEDICAL_SYSTEM_ENABLED_TAGS) then {
_status = [_cursor] call FUNC(getTriageStatus_CMS);
if ((_status select 1) >0) then {
_nameOfUnit = _nameOfUnit + " ["+ (_status select 0) + "]";
_color = _status select 2;
};
};*/
_iconDrawn = QUOTE(PATHTOF(data\empty.paa));
if (_unit getvariable [QGVAR(isSpeaking),false] && GVAR(SHOW_SOUNDWAVES)) then {
_iconDrawn = (GVAR(SOUNDWAVE_ICONS) select ((round(random (count GVAR(SOUNDWAVE_ICONS) - 1)))));
};
drawIcon3D [_iconDrawn,_color, _pos, 2, 2, 1 ,toUpper _nameOfUnit, 1, 0.03, FONT];
};
};

View File

@ -1,65 +0,0 @@
/**
* fn_findNearbyUnits_TAGS.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
private ["_info", "_nameOfUnit", "_color", "_isTalking", "_pos", "_nearest"];
_info = [];
if (alive player) then {
_nearest = (_this nearEntities [["CAManBase"], GVAR(INDIRECT_TAGS_DISTANCE)]);
{
if (_x != _this && (vehicle _x == _x) && isTouchingGround _X) then {
if (lineIntersects [eyePos _this, eyePos _x, _x, _this]) exitwith{};
if ((side _x) call FUNC(allowSide) && !(_x == cursortarget)) then {
_nameOfUnit = name _x;
if (_x getvariable ["ACE_isDead",false]) then { // TODO, how do we check for dead units?
_nameOfUnit = _unit getvariable ["ACE_name","Unknown"]; // TODO is there are function to get the name of a unit?
};
_pos = visiblePositionASL _x;
// TODO This can be done better
switch (stance _x) do {
case "STAND": {
_pos set [2, ((_x modelToWorld [0,0,0]) select 2)+2];
};
case "CROUCH": {
_pos set [2, ((_x modelToWorld [0,0,0]) select 2)+1.5];
};
case "PRONE": {
_pos set [2, ((_x modelToWorld [0,0,0]) select 2) + 0.5];
};
default {
_pos set [2, ((_x modelToWorld [0,0,0]) select 2) + 1.5];
};
};
_color = +GVAR(TAG_DISPLAY_COLOR);
_color set [3, 0];
_isTalking = (_x getvariable [QGVAR(isSpeaking),false]);
// TODO implement module checking
/*if (ACE_NameTags_SYS_MEDICAL_SYSTEM_ENABLED_TAGS) then {
_status = [_x] call FUNC(getTriageStatus_CMS;
if ((_status select 1) >0) then {
_nameOfUnit = _nameOfUnit + " ["+ (_status select 0) + "]";
_color = _status select 2;
};
};*/
if (GVAR(DISPLAY_RANK)) then {
_nameOfUnit = (rank _x) + " " + _nameOfUnit;
};
_color set [3,(1-((_x distance _this) / GVAR(INDIRECT_TAGS_DISTANCE))) + 0.05];
_info pushback [_nameOfUnit, _pos, _color, _x];
};
};
}foreach _nearest;
};
_info;

View File

@ -1,40 +0,0 @@
/**
* fn_handleSpeaking_TAGS.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
// TODO Implement a check mod loaded function
#define ACTION_PUSH_TO_TALK_PRESSED (inputAction "PushToTalk" > 0)
#define ACTION_TFAR_RADIO_ACTIVE false // [] call {if (["task_force_radio"] call FUNC(isModLoaded_F)) then {player call TFAR_fnc_isSpeaking} else { false };}
#define ACTION_ACRE_RADIO_ACTIVE false // [] call {if (["acre_api"] call FUNC(isModLoaded_F)) then {[player] call ACRE_api_fnc_isBroadcasting} else { false };}
private ["_unit"];
_unit = _this select 0;
if (_unit != player /* _unit != ACE_Player */) exitwith {};
// TODO check mod loaded function
/*if (["task_force_radio"] call FUNC(isModLoaded_F)) then {
waituntil {!isnil "TF_tangent_lr_pressed"};
};*/
waituntil {
if (ACTION_TFAR_RADIO_ACTIVE || ACTION_PUSH_TO_TALK_PRESSED || ACTION_ACRE_RADIO_ACTIVE) then {
if !(_unit getvariable [QGVAR(isSpeaking), false]) then {
_unit setvariable [QGVAR(isSpeaking), true, true];
};
} else {
if (_unit getvariable [QGVAR(isSpeaking), false]) then {
_unit setvariable [QGVAR(isSpeaking), false, true];
};
};
!(alive _unit) /* _unit != ACE_Player */
};
_unit setvariable [QGVAR(isSpeaking),nil,true];

View File

@ -1,24 +0,0 @@
/**
* fnc_initalizeModule.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
if (!hasInterface) exitwith {}; // No need for this module on HC or dedicated server.
private ["_logic"];
_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
if (!isNull _logic) then {
// TODO default values should be defined somewhere through an include, so they are the same in CfgVehicles and here.
GVAR(ENABLE_MODULE) = _logic getvariable ["enableModule", false];
GVAR(INDIRECT_TAGS_DISTANCE) = _logic getvariable ["indirectDistance", 7.5];
GVAR(DIRECT_TAG_DISTANCE) = _logic getvariable ["cursorTargetDistance", 20];
GVAR(ALLOW_OWN_SIDE_ONLY) = !(_logic getvariable ["allowDifferentSides", false]);
GVAR(ENABLE_SOUNDWAVES) = _logic getvariable ["enableSoundWaves", false];
};

View File

@ -1,12 +0,0 @@
#define COMPONENT nametags
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_NAMETAGS
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_NAMETAGS
#define DEBUG_SETTINGS DEBUG_SETTINGS_NAMETAGS
#endif
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project name="ACE3">
<Package name="nametags">
<Container ID="Module">
<Key ID="STR_ACE_NameTags_Title">
<Original>Name Tags [ACE]</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_enable">
<Original>Enable Name Tags</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_enable_Desc">
<Original>Enable the name tags</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_indirectDistance">
<Original>Indirect Distance</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_indirectDistance_Desc">
<Original>Distance for indirect Tags</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_directDistance">
<Original>Target Distance</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_directDistance_Desc">
<Original>Distance for the direct Tag (Cursortarget)</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_soundWaves">
<Original>Enable Soundwaves</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_soundWaves_Desc">
<Original>Enable Soundwaves when a player is speaking</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_differentSides">
<Original>Allow Different sides</Original>
</Key>
<Key ID="STR_ACE_NameTags_Arg_differentSides_Desc">
<Original>Allow name tags for all friendly sides, instead of only player side</Original>
</Key>
<Key ID="STR_ACE_NameTags_ModuleDesc">
<Original>Adjust the name tags settings.</Original>
</Key>
</Container>
</Package>
</Project>

View File

@ -39,8 +39,8 @@ class CfgFunctions {
class CfgVehicles {
class Man;
class CAManBase: Man {
class AGM_SelfActions {
class AGM_Equipment {
class ACE_SelfActions {
class ACE_Equipment {
class GVAR(Attach) {
displayName = "$STR_AGM_Attach_AttachDetach";
condition = QUOTE( [_player, ''] call FUNC(canAttach) );

View File

@ -60,6 +60,6 @@ _attachables = items _unit;
},
{
call EFUNC(interaction,hideMenu);
if !(profileNamespace getVariable [EQGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
}
] call EFUNC(interaction,openSelectMenu);

View File

@ -30,7 +30,7 @@ class CfgVehicles {
author = "$STR_ACE_Common_ACETeam";
category = "ACE";
displayName = "Check PBOs";
function = "ACE_Common_fnc_moduleCheckPBOs";
function = QFUNC(moduleCheckPBOs);
scope = 2;
isGlobal = 1;
icon = QUOTE(PATHTOF(UI\IconCheckPBO_ca.paa));

View File

@ -134,7 +134,7 @@ PREP(monitor);
PREP(showUser);
// ACE_CuratorFix
PREP(addUnloadEventhandler);
PREP(addCuratorUnloadEventhandler);
PREP(fixCrateContent);
// Loop to update the ACE_player variable

View File

@ -51,13 +51,13 @@ class ACE_Rsc_Control_Base {
h = 0;
};
class GVAR(canInteractConditions) {
class ACE_canInteractConditions {
class GVAR(notOnMap) {
condition = "!visibleMap";
};
};
class GVAR(Options) {
class ACE_Options {
class enableNumberHotkeys {
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
default = 1;
@ -72,7 +72,7 @@ class GVAR(Options) {
/*
class RscControlsGroupNoScrollbars;
class RscAttributeInventory: RscControlsGroupNoScrollbars {
onSetFocus = "[_this,""RscAttributeInventory"",'CuratorCommon'] call (uinamespace getvariable ""BIS_fnc_initCuratorAttribute""); _this select 0 call ACE_CuratorFix_fnc_addUnloadEventhandler;";
onSetFocus = "[_this,""RscAttributeInventory"",'CuratorCommon'] call (uinamespace getvariable ""BIS_fnc_initCuratorAttribute""); _this select 0 call ACE_Common_fnc_addCuratorUnloadEventhandler;";
};
*/

View File

@ -17,7 +17,7 @@ _overwrite = _this select 0;
_saveProfile = false;
_config = configFile >> QGVAR(Default_Keys);
_config = configFile >> "ACE_Default_Keys";
_count = count _config;
for "_index" from 0 to (_count - 1) do {
@ -38,7 +38,7 @@ for "_index" from 0 to (_count - 1) do {
};
};
_config = configFile >> QGVAR(Options);
_config = configFile >> "ACE_Options";
_count = count _config;
for "_index" from 0 to (_count - 1) do {

View File

@ -1,7 +1,7 @@
// by commy2
#include "\z\ace\addons\common\script_component.hpp"
_config = configFile >> QGVAR(Default_Keys);
_config = configFile >> "ACE_Default_Keys";
_count = count _config;
_header = format ["_keyCode = [_this select 1, _this select 2, _this select 3, _this select 4] call %1; _keyIndex = floor _keyCode; if (_keyIndex == 0) exitWith {false}; if (!(profileNamespace getVariable ['ACE_enableNumberHotkeys', true]) && {_keyIndex < 12} && {_keyIndex > 1} && {_keyCode mod 1 == 0}) exitWith {false}; _time = time; _player = ACE_player; _vehicle = vehicle _player; _isInput = false;", QUOTE(FUNC(convertKeyCode))];
@ -26,7 +26,7 @@ for "_index" from 0 to (_count - 1) do {
_statement = getText (_configFile >> "statement");
_exceptions = getArray (_configFile >> "exceptions");
_canInteract = format ["%1 call GVAR(canInteract)", _exceptions];
_canInteract = format [QUOTE(%1 call GVAR(canInteract)), _exceptions];
_conditionName = format ["ACE_Key_%1_Condition", _keyName];
_statementName = format ["ACE_Key_%1_Statement", _keyName];

View File

@ -2,13 +2,13 @@
PREP(addInteraction);
PREP(addInteractionSelf);
PREP(AddSelectableItem);
PREP(addSelectableItem);
PREP(addToTooltip);
PREP(applyButtons);
PREP(canInteractWith);
PREP(canTapShoulder);
PREP(getActions);
PREP(getActions2);
PREP(GetActions);
PREP(getDoor);
PREP(getDoorAnimations);
PREP(getDown);
@ -43,4 +43,4 @@ PREP(showMenu);
PREP(showMouseHint);
PREP(sortOptionsByPriority);
PREP(tapShoulder);
PREP(updateTooltipPosition);
PREP(updateTooltipPosition);

View File

@ -16,7 +16,7 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
class ACE_Core_Default_Keys {
class ACE_Default_Keys {
class openInteractionMenuNew {
displayName = "$STR_ACE_Interaction_InteractionMenu";
condition = "true";
@ -75,7 +75,7 @@ class ACE_Core_Default_Keys {
};
};
class ACE_Core_Options {
class ACE_Options {
class Interaction_FlowMenu {
displayName = "$STR_ACE_Interaction_FlowMenu";
default = 0;
@ -97,7 +97,7 @@ class ACE_Parameters_Boolean {
ACE_Interaction_EnableTeamManagement = 1;
};
class ACE_Core_canInteractConditions {
class ACE_canInteractConditions {
class ACE_Interaction_isNotEscorting {
condition = QUOTE( !(_player getVariable ['ACE_isEscorting', false]) );
};
@ -147,11 +147,11 @@ class CfgVehicles {
class ACE_TeamManagement {
displayName = "$STR_ACE_Interaction_TeamManagement";
distance = 4;
condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} && {GVAR(EnableTeamManagement)} );
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player} && {GVAR(EnableTeamManagement)});
statement = "";
showDisabled = 0;
priority = 3.2;
icon = PATHOF(UI\team\team_management_ca.paa);
icon = PATHTOF(UI\team\team_management_ca.paa);
subMenu[] = {"ACE_TeamManagement", 0};
hotkey = "M";
enableInside = 1;
@ -159,10 +159,10 @@ class CfgVehicles {
class ACE_JoinTeamRed {
displayName = "$STR_ACE_Interaction_JoinTeamRed";
distance = 4;
condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} );
statement = QUOTE( [_target, 'RED'] call FUNC(joinTeam) );
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player});
statement = QUOTE([ARR2(_target,'RED')] call DFUNC(joinTeam));
showDisabled = 1;
icon = PATHOF(UI\team\team_red_ca.paa);
icon = PATHTOF(UI\team\team_red_ca.paa);
priority = 2.4;
hotkey = "R";
enableInside = 1;
@ -170,10 +170,10 @@ class CfgVehicles {
class ACE_JoinTeamGreen {
displayName = "$STR_ACE_Interaction_JoinTeamGreen";
distance = 4;
condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} );
statement = QUOTE( [_target, 'GREEN'] call FUNC(joinTeam) );
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player});
statement = QUOTE([ARR_2(_target,'GREEN')] call DFUNC(joinTeam));
showDisabled = 1;
icon = PATHOF(UI\team\team_green_ca.paa);
icon = PATHTOF(UI\team\team_green_ca.paa);
priority = 2.3;
hotkey = "G";
enableInside = 1;
@ -181,10 +181,10 @@ class CfgVehicles {
class ACE_JoinTeamBlue {
displayName = "$STR_ACE_Interaction_JoinTeamBlue";
distance = 4;
condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} );
statement = QUOTE( [_target, 'BLUE'] call FUNC(joinTeam) );
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player});
statement = QUOTE([ARR_2(_target,'BLUE')] call DFUNC(joinTeam));
showDisabled = 1;
icon = PATHOF(UI\team\team_blue_ca.paa);
icon = PATHTOF(UI\team\team_blue_ca.paa);
priority = 2.2;
hotkey = "B";
enableInside = 1;
@ -192,10 +192,10 @@ class CfgVehicles {
class ACE_JoinTeamYellow {
displayName = "$STR_ACE_Interaction_JoinTeamYellow";
distance = 4;
condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} );
statement = QUOTE( [_target, 'YELLOW'] call FUNC(joinTeam) );
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player});
statement = QUOTE([ARR_2(_target,'YELLOW')] call DFUNC(joinTeam));
showDisabled = 1;
icon = PATHOF(UI\team\team_yellow_ca.paa);
icon = PATHTOF(UI\team\team_yellow_ca.paa);
priority = 2.1;
hotkey = "Y";
enableInside = 1;
@ -204,10 +204,10 @@ class CfgVehicles {
class ACE_LeaveTeam {
displayName = "$STR_ACE_Interaction_LeaveTeam";
distance = 4;
condition = QUOTE( alive _target && {!isPlayer _target} && {_target in units group _player} && {assignedTeam _player != 'MAIN'} );
statement = QUOTE( [_target, 'MAIN'] call FUNC(joinTeam) );
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player} && {assignedTeam _player != 'MAIN'});
statement = QUOTE([ARR_2(_target,'MAIN')] call DFUNC(joinTeam));
showDisabled = 1;
icon = PATHOF(UI\team\team_white_ca.paa);
icon = PATHTOF(UI\team\team_white_ca.paa);
priority = 2.5;
hotkey = "N";
enableInside = 1;
@ -217,8 +217,8 @@ class CfgVehicles {
class ACE_TapShoulder {
displayName = "$STR_ACE_Interaction_TapShoulder";
distance = 4;
condition = QUOTE( [_player, _target] call FUNC(canTapShoulder) );
statement = QUOTE( [_player, _target] call FUNC(tapShoulder) );
condition = QUOTE([ARR_2(_player, _target)] call DFUNC(canTapShoulder));
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(tapShoulder));
showDisabled = 1;
priority = 2.8;
hotkey = "Q";
@ -227,11 +227,11 @@ class CfgVehicles {
class ACE_JoinGroup {
displayName = "$STR_ACE_Interaction_JoinGroup";
distance = 4;
condition = QUOTE( side group _player == side group _target && {group _player != group _target} );
statement = QUOTE( [_player] joinSilent group _target; );
condition = QUOTE(side group _player == side group _target && {group _player != group _target});
statement = QUOTE([_player] joinSilent group _target;);
showDisabled = 0;
priority = 2.6;
icon = PATHOF(UI\team\team_management_ca.paa);
icon = PATHTOF(UI\team\team_management_ca.paa);
hotkey = "J";
enableInside = 1;
};
@ -239,24 +239,24 @@ class CfgVehicles {
class ACE_GetDown {
displayName = "$STR_ACE_Interaction_GetDown";
distance = 4;
condition = QUOTE( [_target] call FUNC(canInteractWith) );
statement = QUOTE( [_target] call FUNC(getDown) );
condition = QUOTE([_target] call DFUNC(canInteractWith));
statement = QUOTE([_target] call DFUNC(getDown));
showDisabled = 0;
priority = 2.2;
};
class ACE_SendAway {
displayName = "$STR_ACE_Interaction_SendAway";
distance = 4;
condition = QUOTE( [_target] call FUNC(canInteractWith) );
statement = QUOTE( [_target] call FUNC(sendAway) );
condition = QUOTE([_target] call DFUNC(canInteractWith));
statement = QUOTE([_target] call DFUNC(sendAway));
showDisabled = 0;
priority = 2.0;
};
class ACE_Pardon {
displayName = "$STR_ACE_Interaction_Pardon";
distance = 4;
condition = QUOTE( rating _target < -2000 && {alive _target} && {side group _player == side group _target} );
statement = QUOTE( [_target, '{_this addRating -rating _this}', _target] call EFUNC(core,execRemoteFnc) );
condition = QUOTE(rating _target < -2000 && {alive _target} && {side group _player == side group _target});
statement = QUOTE([ARR_3(_target,'{_this addRating -rating _this}',_target)] call DEFUNC(common,execRemoteFnc));
showDisabled = 0;
priority = 2.5;
enableInside = 1;
@ -266,84 +266,84 @@ class CfgVehicles {
class ACE_SelfActions {
class ACE_TeamManagement {
displayName = "$STR_ACE_Interaction_TeamManagement";
condition = QUOTE( GVAR(EnableTeamManagement) );
condition = QUOTE(GVAR(EnableTeamManagement));
statement = "";
showDisabled = 1;
priority = 3.2;
icon = PATHOF(UI\team\team_management_ca.paa);
icon = PATHTOF(UI\team\team_management_ca.paa);
subMenu[] = {"ACE_TeamManagement", 1};
enableInside = 1;
hotkey = "M";
class ACE_JoinTeamRed {
displayName = "$STR_ACE_Interaction_JoinTeamRed";
condition = QUOTE( true );
statement = QUOTE( [_player, 'RED'] call FUNC(joinTeam) );
condition = QUOTE(true);
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.4;
icon = PATHOF(UI\team\team_red_ca.paa);
icon = PATHTOF(UI\team\team_red_ca.paa);
enableInside = 1;
hotkey = "R";
};
class ACE_JoinTeamGreen {
displayName = "$STR_ACE_Interaction_JoinTeamGreen";
condition = QUOTE( true );
statement = QUOTE( [_player, 'GREEN'] call FUNC(joinTeam) );
condition = QUOTE(true);
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.3;
icon = PATHOF(UI\team\team_green_ca.paa);
icon = PATHTOF(UI\team\team_green_ca.paa);
enableInside = 1;
hotkey = "G";
};
class ACE_JoinTeamBlue {
displayName = "$STR_ACE_Interaction_JoinTeamBlue";
condition = QUOTE( true );
statement = QUOTE( [_player, 'BLUE'] call FUNC(joinTeam) );
condition = QUOTE(true);
statement = QUOTE([ARR_2(_player,'BLUE')] call FUNC(joinTeam));
showDisabled = 1;
priority = 2.2;
icon = PATHOF(UI\team\team_blue_ca.paa);
icon = PATHTOF(UI\team\team_blue_ca.paa);
enableInside = 1;
hotkey = "B";
};
class ACE_JoinTeamYellow {
displayName = "$STR_ACE_Interaction_JoinTeamYellow";
condition = QUOTE( true );
statement = QUOTE( [_player, 'YELLOW'] call FUNC(joinTeam) );
condition = QUOTE(true);
statement = QUOTE([ARR_2(_player,'YELLOW')] call FUNC(joinTeam));
showDisabled = 1;
priority = 2.1;
icon = PATHOF(UI\team\team_yellow_ca.paa);
icon = PATHTOF(UI\team\team_yellow_ca.paa);
enableInside = 1;
hotkey = "Y";
};
class ACE_LeaveTeam {
displayName = "$STR_ACE_Interaction_LeaveTeam";
condition = QUOTE( assignedTeam _player != 'MAIN' );
statement = QUOTE( [_player, 'MAIN'] call FUNC(joinTeam) );
condition = QUOTE(assignedTeam _player != 'MAIN');
statement = QUOTE([ARR_2(_player,'MAIN')] call FUNC(joinTeam));
showDisabled = 1;
priority = 2.5;
icon = PATHOF(UI\team\team_white_ca.paa);
icon = PATHTOF(UI\team\team_white_ca.paa);
enableInside = 1;
hotkey = "N";
};
class ACE_BecomeLeader {
displayName = "$STR_ACE_Interaction_BecomeLeader";
condition = QUOTE( count (units group _player) > 1 && {leader group _player != _player} );
statement = QUOTE( _newGroup = createGroup side group _player; (units group _player) joinSilent _newGroup; _newGroup selectLeader _player; );
condition = QUOTE(count (units group _player) > 1 && {leader group _player != _player});
statement = QUOTE(_newGroup = createGroup side group _player; (units group _player) joinSilent _newGroup; _newGroup selectLeader _player;);
showDisabled = 1;
priority = 1.0;
icon = PATHOF(UI\team\team_white_ca.paa);
icon = PATHTOF(UI\team\team_white_ca.paa);
enableInside = 1;
hotkey = "L";
};
class ACE_LeaveGroup {
displayName = "$STR_ACE_Interaction_LeaveGroup";
condition = QUOTE( count (units group _player) > 1 );
statement = QUOTE( _oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup; );
condition = QUOTE(count (units group _player) > 1);
statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;);
showDisabled = 1;
priority = 1.2;
icon = PATHOF(UI\team\team_management_ca.paa);
icon = PATHTOF(UI\team\team_management_ca.paa);
enableInside = 1;
hotkey = "M";
};
@ -373,7 +373,7 @@ class CfgVehicles {
showDisabled = 1;
priority = 3.5;
subMenu[] = {"ACE_Gestures", 1};
icon = "ACE_Interaction\UI\gestures_ca.paa";
icon = PATHTOF(UI\gestures_ca.paa);
hotkey = "G";
/*class ACE_Gesture_Advance {
@ -385,87 +385,87 @@ class CfgVehicles {
};*/
class ACE_Gesture_Advance {
displayName = "$STR_ACE_Interaction_Gestures_Advance";
condition = "canStand _target";
statement = "_target playActionNow 'gestureAdvance';";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureAdvance';);
showDisabled = 1;
priority = 1.9;
hotkey = "1";
};
class ACE_Gesture_Go {
displayName = "$STR_ACE_Interaction_Gestures_Go";
condition = "canStand _target";
statement = "_target playActionNow (['gestureGo', 'gestureGoB'] select (floor random 2));";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
showDisabled = 1;
priority = 1.8;
hotkey = "2";
};
class ACE_Gesture_Follow {
displayName = "$STR_ACE_Interaction_Gestures_Follow";
condition = "canStand _target";
statement = "_target playActionNow 'gestureFollow';";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureFollow';);
showDisabled = 1;
priority = 1.7;
hotkey = "3";
};
/*class ACE_Gesture_Point {
displayName = "$STR_ACE_Interaction_Gestures_Point";
condition = "canStand _target";
statement = "_target playActionNow 'gesturePoint';";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gesturePoint';);
showDisabled = 1;
priority = 1.6;
};*/
class ACE_Gesture_Up {
displayName = "$STR_ACE_Interaction_Gestures_Up";
condition = "canStand _target";
statement = "_target playActionNow 'gestureUp';";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureUp';);
showDisabled = 1;
priority = 1.5;
hotkey = "4";
};
class ACE_Gesture_Cover {
displayName = "$STR_ACE_Interaction_Gestures_Cover";
condition = "canStand _target";
statement = "_target playActionNow 'gestureCover';";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureCover';);
showDisabled = 1;
priority = 1.4;
hotkey = "5";
};
class ACE_Gesture_CeaseFire {
displayName = "$STR_ACE_Interaction_Gestures_Cease_Fire";
condition = "canStand _target";
statement = "_target playActionNow 'gestureCeaseFire';";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
showDisabled = 1;
priority = 1.3;
hotkey = "6";
};
class ACE_Gesture_Freeze {
displayName = "$STR_ACE_Interaction_Gestures_Freeze";
condition = "canStand _target";
statement = "_target playActionNow 'gestureFreeze';";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureFreeze';);
showDisabled = 1;
priority = 1.2;
hotkey = "7";
};
class ACE_Gesture_Yes {
displayName = "$STR_ACE_Interaction_Gestures_Yes";
condition = "canStand _target";
statement = "_target playActionNow (['gestureYes', 'gestureNod'] select (floor random 2));";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2););
showDisabled = 1;
priority = 1.1;
hotkey = "8";
};
class ACE_Gesture_No {
displayName = "$STR_ACE_Interaction_Gestures_No";
condition = "canStand _target";
statement = "_target playActionNow 'gestureNo';";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureNo';);
showDisabled = 1;
priority = 1.0;
hotkey = "9";
};
class ACE_Gesture_Hi {
displayName = "$STR_ACE_Interaction_Gestures_Hi";
condition = "canStand _target";
statement = "_target playActionNow (['gestureHi', 'gestureHiB', 'gestureHiC'] select (floor random 3));";
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3););
showDisabled = 1;
priority = 0.9;
hotkey = "0";
@ -474,7 +474,7 @@ class CfgVehicles {
class ACE_Equipment {
displayName = "$STR_ACE_Interaction_Equipment";
condition = "true";
condition = QUOTE(true);
statement = "";
showDisabled = 1;
priority = 4.5;
@ -485,11 +485,11 @@ class CfgVehicles {
class ACE_Dummy {
displayName = "";
condition = "false";
condition = QUOTE(false);
statement = "";
showDisabled = 1;
priority = -99;
icon = PATHOF(UI\blank_CO.paa);
icon = PATHTOEF(common,UI\blank_CO.paa);
enableInside = 1;
};
};
@ -522,8 +522,8 @@ class CfgVehicles {
class ACE_Push {
displayName = "$STR_ACE_Interaction_Push";
distance = 4;
condition = QUOTE( getMass _target < 1000 and alive _target );
//statement = QUOTE( [_target, [2 * (vectorDir _player select 0), 2 * (vectorDir _player select 1), 0.5]] call FUNC(push); );
condition = QUOTE(getMass _target < 1000 && {alive _target});
statement = QUOTE([ARR_2(_target, [ARR_3(2 * (vectorDir _player select 0), 2 * (vectorDir _player select 1), 0.5)])] call FUNC(push););
showDisabled = 0;
priority = -1;
};
@ -557,8 +557,8 @@ class CfgWeapons {
class ACE_CableTie: ACE_ItemCore {
displayName = "$STR_ACE_Interaction_CableTie_Name";
descriptionShort = "$STR_ACE_Interaction_CableTie_Description";
model = PATHOF(ACE_cabletie.p3d);
picture = PATHOF(UI\ACE_cabletie_x_ca.paa);
model = PATHTOF(ACE_cabletie.p3d);
picture = PATHTOF(UI\ACE_cabletie_x_ca.paa);
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 1;

View File

@ -77,7 +77,7 @@ for "_i" from 0 to (_count - 1) do {
_condition = getText (_action >> "condition");
if (_condition == "") then {_condition = "true"};
_condition = _condition + format [QUOTE( && {%1 call EGVAR(core,canInteract)} && {[ACE_player, GVAR(Target)] call EFUNC(common,canInteractWith)} ), getArray (_action >> "exceptions")];
_condition = _condition + format [QUOTE( && {%1 call EGVAR(common,canInteract)} && {[ARR_2(ACE_player, GVAR(Target))] call EFUNC(common,canInteractWith)} ), getArray (_action >> "exceptions")];
if (_enableInside != 1) then {_condition = _condition + " && {_player == _vehicle}"};
_condition = compile _condition;
@ -129,9 +129,9 @@ for "_i" from 0 to (_count - 1) do {
_cacheIndices pushBack _indexCache;
_cache = [_cacheConfigs, _cacheActions, _cacheIndices];
["InteractionMenu", _action, {format ["%1 loaded into cache", _this]}] call EFUNC(debug,log);
["InteractionMenu", _action, {format ["%1 loaded into cache", _this]}] call EFUNC(common,log);
} else {
["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(debug,log);
["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(common,log);
_cachedAction = _cacheActions select (_cacheIndices select _indexCache);

View File

@ -45,7 +45,7 @@ _cacheIndices = _cache select 2;
_condition = getText (_action >> "condition");
if (_condition == "") then {_condition = "true"};
_condition = _condition + format [QUOTE(&& {%1 call EFUNC(common,canInteract)} && {[ACE_player, GVAR(Target)] call FUNC(canInteractWith)}), getArray (_action >> "exceptions")];
_condition = _condition + format [QUOTE(&& {%1 call EFUNC(common,canInteract)} && {[ARR_2(ACE_player, GVAR(Target))] call FUNC(canInteractWith)}), getArray (_action >> "exceptions")];
if (_enableInside != 1) then {_condition = _condition + " && {_player == _vehicle}"};
_condition = compile _condition;
@ -97,9 +97,9 @@ _cacheIndices = _cache select 2;
_cacheIndices pushBack _indexCache;
_cache = [_cacheConfigs, _cacheActions, _cacheIndices];
["InteractionMenu", _action, {format ["%1 loaded into cache", _this]}] call EFUNC(debug,log);
["InteractionMenu", _action, {format ["%1 loaded into cache", _this]}] call EFUNC(common,log);
} else {
["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(debug,log);
["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(common,log);
private ["_cachedAction", "_showDisabled"];
_cachedAction = _cacheActions select (_cacheIndices select _indexCache);

View File

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

View File

@ -31,7 +31,7 @@ _player = ACE_player;
_vehicle = vehicle _player;
//_object = [GVAR(Target), _player] select (GVAR(MenuType) % 2 == 1);
if !([_target, 5] call GVAR(isInRange)) exitWith {};
if !([_target, 5] call FUNC(isInRange)) exitWith {};
GVAR(Shortcuts) = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
@ -119,7 +119,7 @@ if (_this select 2) then {
_target = [GVAR(Target), _player] select (GVAR(MenuType) % 2 == 1);
waitUntil {
if !([_target, 5] call GVAR(isInRange)) exitWith {
if !([_target, 5] call FUNC(isInRange)) exitWith {
(findDisplay 1713999) closeDisplay 1
};
@ -134,7 +134,7 @@ if (_this select 2) then {
GVAR(CurrentTooltip) = [];
_enable = (_distance == 0 || {[_target, _distance] call GVAR(isInRange)}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow};
_enable = (_distance == 0 || {[_target, _distance] call FUNC(isInRange)}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow};
if (isNil "_enable") then {_enable = false};
GVAR(Tooltips) set [_forEachIndex, GVAR(CurrentTooltip)];

View File

@ -19,7 +19,7 @@ _subMenu = _action select 4;
// back
if (_index == -1) exitWith {
call FUNC(MainButton);
call GVAR(MainButton);
};
if (count _subMenu < 2) then {

View File

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

View File

@ -9,7 +9,7 @@ _target = _this select 1;
if (_target != ACE_player) exitWith {
addCamShake [4, 0.5, 5];
if !(local _target) then {
[[_tapper, _target], QUOTE(FUNC(tapShoulder)), _target] call EFUNC(execRemoteFnc);
[[_tapper, _target], QUOTE(DFUNC(tapShoulder)), _target] call EFUNC(common,execRemoteFnc);
};
};

View File

@ -182,6 +182,8 @@
#define QFUNC(var1) QUOTE(DFUNC(var1))
#define QEFUNC(var1,var2) QUOTE(DEFUNC(var1,var2))
#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2)
#ifdef DISABLE_COMPILE_CACHE
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf))
#else

View File

@ -48,7 +48,7 @@ _newUnit spawn {
// should switch locality
// This doesn't work anymore, because one's now able to switch to units from a different side
//[_unit] joinSilent group player;
[[_unit, player], QUOTE({(_this select 0) setVariable [QGVAR(OriginalOwner), owner (_this select 0), true]; (_this select 0) setOwner owner (_this select 1)}), 1] call EFUNC(common,execRemoteFnc);
[[_unit, player], QUOTE({(_this select 0) setVariable [ARR_3(QUOTE(QGVAR(OriginalOwner)), owner (_this select 0), true)]; (_this select 0) setOwner owner (_this select 1)}), 1] call EFUNC(common,execRemoteFnc);
_oldUnit = player;
waitUntil {sleep 0.2; local _unit};

File diff suppressed because one or more lines are too long