diff --git a/addons/attach/CfgEventHandlers.hpp b/addons/attach/CfgEventHandlers.hpp index 8af0265fe2..5eca7fa129 100644 --- a/addons/attach/CfgEventHandlers.hpp +++ b/addons/attach/CfgEventHandlers.hpp @@ -1,5 +1,5 @@ class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) ); + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); }; }; \ No newline at end of file diff --git a/addons/attach/XEH_preInit.sqf b/addons/attach/XEH_preInit.sqf index 311aa874ec..bcbd7e543c 100644 --- a/addons/attach/XEH_preInit.sqf +++ b/addons/attach/XEH_preInit.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" -PREPF(attach); -PREPF(canAttach); -PREPF(canDetach); -PREPF(detach); -PREPF(openAttachUI); \ No newline at end of file +PREP(attach); +PREP(canAttach); +PREP(canDetach); +PREP(detach); +PREP(openAttachUI); \ No newline at end of file diff --git a/addons/attach/config.cpp b/addons/attach/config.cpp index f27d675efb..c7948fc323 100644 --- a/addons/attach/config.cpp +++ b/addons/attach/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {"AGM_IR_Strobe_Item"}; requiredVersion = 0.60; - requiredAddons[] = {AGM_Core, AGM_Interaction}; + requiredAddons[] = {"ace_common", "ace_interaction"}; version = "0.95"; versionStr = "0.95"; versionAr[] = {0,95,0}; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index b4cf675096..0c96e6f8ca 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -29,27 +29,27 @@ switch true do { case (_itemName == "AGM_IR_Strobe_Item") : { _attachedItem = "AGM_IR_Strobe_Effect" createVehicle [0,0,0]; _attachedItem attachTo [_unit,[0,-0.11,0.16],"pilot"];//makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri - [localize "STR_AGM_Attach_IrStrobe_Attached"] call EFUNC(core,displayTextStructured); + [localize "STR_AGM_Attach_IrStrobe_Attached"] call EFUNC(common,displayTextStructured); }; case (_itemName == "B_IR_Grenade") : { _attachedItem = "B_IRStrobe" createVehicle [0,0,0]; _attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"]; - [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(core,displayTextStructured); + [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured); }; case (_itemName == "O_IR_Grenade") : { _attachedItem = "O_IRStrobe" createVehicle [0,0,0]; _attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"]; - [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(core,displayTextStructured); + [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured); }; case (_itemName == "I_IR_Grenade") : { _attachedItem = "I_IRStrobe" createVehicle [0,0,0]; _attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"]; - [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(core,displayTextStructured); + [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured); }; case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : { _attachedItem = _itemName createVehicle [0,0,0]; _attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"]; - [localize "STR_AGM_Attach_Chemlight_Attached"] call EFUNC(core,displayTextStructured);; + [localize "STR_AGM_Attach_Chemlight_Attached"] call EFUNC(common,displayTextStructured);; }; default { if (true) exitWith {}; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 415429440b..5f50720d3e 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -24,7 +24,7 @@ if (_itemName == "") exitWith {}; _count = (count items _unit) + (count magazines _unit); _unit addItem _itemName; if ((count items _unit) + (count magazines _unit) <= _count) exitWith { - [localize "STR_AGM_Attach_Inventory_Full"] call EFUNC(core,displayTextStructured); + [localize "STR_AGM_Attach_Inventory_Full"] call EFUNC(common,displayTextStructured); }; if (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") then { @@ -51,13 +51,13 @@ _unit setVariable [QGVAR(Item),nil, true]; // Display message switch true do { case (_itemName == "AGM_IR_Strobe_Item") : { - [localize "STR_AGM_Attach_IrStrobe_Detached"] call EFUNC(core,displayTextStructured); + [localize "STR_AGM_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured); }; case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : { - [localize "STR_AGM_Attach_IrGrenade_Detached"] call EFUNC(core,displayTextStructured); + [localize "STR_AGM_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured); }; case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : { - [localize "STR_AGM_Attach_Chemlight_Detached"] call EFUNC(core,displayTextStructured); + [localize "STR_AGM_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured); }; default { if (true) exitWith {}; diff --git a/addons/attach/functions/script_component.hpp b/addons/attach/functions/script_component.hpp new file mode 100644 index 0000000000..b28de85182 --- /dev/null +++ b/addons/attach/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\attach\script_component.hpp" \ No newline at end of file diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index ee78ad3924..8ed770d786 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -33,7 +33,7 @@ class CfgVehicles { function = "ACE_Common_fnc_moduleCheckPBOs"; scope = 2; isGlobal = 1; - icon = PATHTOF(UI\IconCheckPBO_ca.paa); + icon = QUOTE(PATHTOF(UI\IconCheckPBO_ca.paa)); class Arguments { class Action { displayName = "Action"; diff --git a/addons/common/MenuConfig.hpp b/addons/common/MenuConfig.hpp index 418a7cb849..4d84bfb78b 100644 --- a/addons/common/MenuConfig.hpp +++ b/addons/common/MenuConfig.hpp @@ -366,7 +366,7 @@ class ACE_Common_OptionsMenu_Dialog { idc = 300; //type = 0; style = 48; - text = PATHTOF(UI\box_unchecked_ca.paa); + text = QUOTE(PATHTOF(UI\box_unchecked_ca.paa)); colorBackground[] = {0, 0, 0, 0}; colorText[] = {1, 1, 1, 1}; x = (HSPACE2 + 3 * 0.1) * safezoneW + safezoneX; diff --git a/addons/common/functions/script_component.hpp b/addons/common/functions/script_component.hpp new file mode 100644 index 0000000000..23da62b05c --- /dev/null +++ b/addons/common/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\common\script_component.hpp" \ No newline at end of file diff --git a/addons/frag/fnc_BIS_ARTY_WRAPPER.sqf b/addons/frag/functions/fnc_BIS_ARTY_WRAPPER.sqf similarity index 100% rename from addons/frag/fnc_BIS_ARTY_WRAPPER.sqf rename to addons/frag/functions/fnc_BIS_ARTY_WRAPPER.sqf diff --git a/addons/frag/fnc_addBlackList.sqf b/addons/frag/functions/fnc_addBlackList.sqf similarity index 100% rename from addons/frag/fnc_addBlackList.sqf rename to addons/frag/functions/fnc_addBlackList.sqf diff --git a/addons/frag/fnc_addManualTrack.sqf b/addons/frag/functions/fnc_addManualTrack.sqf similarity index 100% rename from addons/frag/fnc_addManualTrack.sqf rename to addons/frag/functions/fnc_addManualTrack.sqf diff --git a/addons/frag/fnc_addTrack.sqf b/addons/frag/functions/fnc_addTrack.sqf similarity index 100% rename from addons/frag/fnc_addTrack.sqf rename to addons/frag/functions/fnc_addTrack.sqf diff --git a/addons/frag/fnc_clearTraces.sqf b/addons/frag/functions/fnc_clearTraces.sqf similarity index 100% rename from addons/frag/fnc_clearTraces.sqf rename to addons/frag/functions/fnc_clearTraces.sqf diff --git a/addons/frag/fnc_denyFrag.sqf b/addons/frag/functions/fnc_denyFrag.sqf similarity index 100% rename from addons/frag/fnc_denyFrag.sqf rename to addons/frag/functions/fnc_denyFrag.sqf diff --git a/addons/frag/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf similarity index 100% rename from addons/frag/fnc_doSpall.sqf rename to addons/frag/functions/fnc_doSpall.sqf diff --git a/addons/frag/fnc_drawTraces.sqf b/addons/frag/functions/fnc_drawTraces.sqf similarity index 100% rename from addons/frag/fnc_drawTraces.sqf rename to addons/frag/functions/fnc_drawTraces.sqf diff --git a/addons/frag/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf similarity index 100% rename from addons/frag/fnc_fired.sqf rename to addons/frag/functions/fnc_fired.sqf diff --git a/addons/frag/fnc_frag_trace.sqf b/addons/frag/functions/fnc_frag_trace.sqf similarity index 100% rename from addons/frag/fnc_frag_trace.sqf rename to addons/frag/functions/fnc_frag_trace.sqf diff --git a/addons/frag/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf similarity index 100% rename from addons/frag/fnc_frago.sqf rename to addons/frag/functions/fnc_frago.sqf diff --git a/addons/frag/fnc_removeTrack.sqf b/addons/frag/functions/fnc_removeTrack.sqf similarity index 100% rename from addons/frag/fnc_removeTrack.sqf rename to addons/frag/functions/fnc_removeTrack.sqf diff --git a/addons/frag/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf similarity index 100% rename from addons/frag/fnc_spallHP.sqf rename to addons/frag/functions/fnc_spallHP.sqf diff --git a/addons/frag/fnc_spallTrack.sqf b/addons/frag/functions/fnc_spallTrack.sqf similarity index 100% rename from addons/frag/fnc_spallTrack.sqf rename to addons/frag/functions/fnc_spallTrack.sqf diff --git a/addons/frag/fnc_startTracing.sqf b/addons/frag/functions/fnc_startTracing.sqf similarity index 100% rename from addons/frag/fnc_startTracing.sqf rename to addons/frag/functions/fnc_startTracing.sqf diff --git a/addons/frag/fnc_stopTracing.sqf b/addons/frag/functions/fnc_stopTracing.sqf similarity index 100% rename from addons/frag/fnc_stopTracing.sqf rename to addons/frag/functions/fnc_stopTracing.sqf diff --git a/addons/frag/fnc_trackFragRound.sqf b/addons/frag/functions/fnc_trackFragRound.sqf similarity index 100% rename from addons/frag/fnc_trackFragRound.sqf rename to addons/frag/functions/fnc_trackFragRound.sqf diff --git a/addons/frag/fnc_trackTrace.sqf b/addons/frag/functions/fnc_trackTrace.sqf similarity index 100% rename from addons/frag/fnc_trackTrace.sqf rename to addons/frag/functions/fnc_trackTrace.sqf diff --git a/addons/frag/fnc_vectorDiffFast.sqf b/addons/frag/functions/fnc_vectorDiffFast.sqf similarity index 100% rename from addons/frag/fnc_vectorDiffFast.sqf rename to addons/frag/functions/fnc_vectorDiffFast.sqf diff --git a/addons/frag/functions/script_component.hpp b/addons/frag/functions/script_component.hpp new file mode 100644 index 0000000000..8312313751 --- /dev/null +++ b/addons/frag/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\frag\script_component.hpp" \ No newline at end of file diff --git a/addons/interaction/CfgEventHandlers.hpp b/addons/interaction/CfgEventHandlers.hpp index 359983754f..17200056b8 100644 --- a/addons/interaction/CfgEventHandlers.hpp +++ b/addons/interaction/CfgEventHandlers.hpp @@ -1,12 +1,12 @@ class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) ); + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_clientInit.sqf) ); + clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) ); }; }; diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp index f4e2f2c423..e59f861f79 100644 --- a/addons/interaction/config.cpp +++ b/addons/interaction/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = 0.60; - requiredAddons[] = {ACE_Core}; + requiredAddons[] = {"ace_common"}; version = "0.95"; versionStr = "0.95"; versionAr[] = {0,95,0}; diff --git a/addons/interaction/functions/fn_AddSelectableItem.sqf b/addons/interaction/functions/fnc_AddSelectableItem.sqf similarity index 95% rename from addons/interaction/functions/fn_AddSelectableItem.sqf rename to addons/interaction/functions/fnc_AddSelectableItem.sqf index 8b7eb1da5a..1e3065d234 100644 --- a/addons/interaction/functions/fn_AddSelectableItem.sqf +++ b/addons/interaction/functions/fnc_AddSelectableItem.sqf @@ -26,7 +26,7 @@ _picture = _this select 2; _data = _this select 3; if (_picture == "" || _picture == "PictureThing") then { - _picture = PATHTOF(UI\dot_ca.paa); + _picture = QUOTE(PATHTOF(UI\dot_ca.paa)); }; if ((profileNamespace getVariable [QGVAR(FlowMenu), false])) then { diff --git a/addons/interaction/functions/fn_GetActions.sqf b/addons/interaction/functions/fnc_GetActions.sqf similarity index 95% rename from addons/interaction/functions/fn_GetActions.sqf rename to addons/interaction/functions/fnc_GetActions.sqf index 41938c7faa..096050a6b3 100644 --- a/addons/interaction/functions/fn_GetActions.sqf +++ b/addons/interaction/functions/fnc_GetActions.sqf @@ -25,7 +25,7 @@ */ #include "script_component.hpp" -#define DEFAULT_ICON PATHTOF(UI\dot_ca.paa) +#define DEFAULT_ICON QUOTE(PATHTOF(UI\dot_ca.paa)) private ["_target", "_parents", "_actions", "_patches", "_baseConfig", "_actionType", "_i","_index", "_missionConfig", "_stdConfig"]; _target = _this select 0; _parents = _this select 1; @@ -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(core,canInteractWith)} ), getArray (_action >> "exceptions")]; + _condition = _condition + format [QUOTE( && {%1 call EGVAR(core,canInteract)} && {[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(debug,log); } else { - ["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(debug, log); + ["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(debug,log); _cachedAction = _cacheActions select (_cacheIndices select _indexCache); diff --git a/addons/interaction/functions/fn_MoveDown.sqf b/addons/interaction/functions/fnc_MoveDown.sqf similarity index 100% rename from addons/interaction/functions/fn_MoveDown.sqf rename to addons/interaction/functions/fnc_MoveDown.sqf diff --git a/addons/interaction/functions/fn_addInteraction.sqf b/addons/interaction/functions/fnc_addInteraction.sqf similarity index 100% rename from addons/interaction/functions/fn_addInteraction.sqf rename to addons/interaction/functions/fnc_addInteraction.sqf diff --git a/addons/interaction/functions/fn_addInteractionSelf.sqf b/addons/interaction/functions/fnc_addInteractionSelf.sqf similarity index 100% rename from addons/interaction/functions/fn_addInteractionSelf.sqf rename to addons/interaction/functions/fnc_addInteractionSelf.sqf diff --git a/addons/interaction/functions/fn_addToTooltip.sqf b/addons/interaction/functions/fnc_addToTooltip.sqf similarity index 100% rename from addons/interaction/functions/fn_addToTooltip.sqf rename to addons/interaction/functions/fnc_addToTooltip.sqf diff --git a/addons/interaction/functions/fn_applyButtons.sqf b/addons/interaction/functions/fnc_applyButtons.sqf similarity index 100% rename from addons/interaction/functions/fn_applyButtons.sqf rename to addons/interaction/functions/fnc_applyButtons.sqf diff --git a/addons/interaction/functions/fn_canInteractWith.sqf b/addons/interaction/functions/fnc_canInteractWith.sqf similarity index 100% rename from addons/interaction/functions/fn_canInteractWith.sqf rename to addons/interaction/functions/fnc_canInteractWith.sqf diff --git a/addons/interaction/functions/fn_canTapShoulder.sqf b/addons/interaction/functions/fnc_canTapShoulder.sqf similarity index 100% rename from addons/interaction/functions/fn_canTapShoulder.sqf rename to addons/interaction/functions/fnc_canTapShoulder.sqf diff --git a/addons/interaction/functions/fn_getActions2.sqf b/addons/interaction/functions/fnc_getActions2.sqf similarity index 94% rename from addons/interaction/functions/fn_getActions2.sqf rename to addons/interaction/functions/fnc_getActions2.sqf index 84c720cfbb..01c86d6db0 100644 --- a/addons/interaction/functions/fn_getActions2.sqf +++ b/addons/interaction/functions/fnc_getActions2.sqf @@ -45,7 +45,7 @@ _cacheIndices = _cache select 2; _condition = getText (_action >> "condition"); if (_condition == "") then {_condition = "true"}; - _condition = _condition + format [QUOTE( && {%1 call EFUNC(core,canInteract)} && {[ACE_player, GVAR(Target)] call FUNC(canInteractWith)} ), getArray (_action >> "exceptions")]; + _condition = _condition + format [QUOTE(&& {%1 call EFUNC(common,canInteract)} && {[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(debug,log); } else { - ["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(debug, log); + ["InteractionMenu", _action, {format ["%1 loaded from cache", _this]}] call EFUNC(debug,log); private ["_cachedAction", "_showDisabled"]; _cachedAction = _cacheActions select (_cacheIndices select _indexCache); diff --git a/addons/interaction/functions/fn_setCaptivityStatus.sqf b/addons/interaction/functions/fnc_getCaptivityStatus.sqf similarity index 50% rename from addons/interaction/functions/fn_setCaptivityStatus.sqf rename to addons/interaction/functions/fnc_getCaptivityStatus.sqf index 4de294c674..e97b580ce5 100644 --- a/addons/interaction/functions/fn_setCaptivityStatus.sqf +++ b/addons/interaction/functions/fnc_getCaptivityStatus.sqf @@ -1,4 +1,4 @@ // by commy2 #include "script_component.hpp" -_this call EFUNC(core,setCaptivityStatus); +_this call EFUNC(common,getCaptivityStatus); diff --git a/addons/interaction/functions/fn_getDoor.sqf b/addons/interaction/functions/fnc_getDoor.sqf similarity index 100% rename from addons/interaction/functions/fn_getDoor.sqf rename to addons/interaction/functions/fnc_getDoor.sqf diff --git a/addons/interaction/functions/fn_getDoorAnimations.sqf b/addons/interaction/functions/fnc_getDoorAnimations.sqf similarity index 100% rename from addons/interaction/functions/fn_getDoorAnimations.sqf rename to addons/interaction/functions/fnc_getDoorAnimations.sqf diff --git a/addons/interaction/functions/fn_getDown.sqf b/addons/interaction/functions/fnc_getDown.sqf similarity index 100% rename from addons/interaction/functions/fn_getDown.sqf rename to addons/interaction/functions/fnc_getDown.sqf diff --git a/addons/interaction/functions/fn_getSelectedButton.sqf b/addons/interaction/functions/fnc_getSelectedButton.sqf similarity index 100% rename from addons/interaction/functions/fn_getSelectedButton.sqf rename to addons/interaction/functions/fnc_getSelectedButton.sqf diff --git a/addons/interaction/functions/fn_hideMenu.sqf b/addons/interaction/functions/fnc_hideMenu.sqf similarity index 100% rename from addons/interaction/functions/fn_hideMenu.sqf rename to addons/interaction/functions/fnc_hideMenu.sqf diff --git a/addons/interaction/functions/fn_hideMouseHint.sqf b/addons/interaction/functions/fnc_hideMouseHint.sqf similarity index 100% rename from addons/interaction/functions/fn_hideMouseHint.sqf rename to addons/interaction/functions/fnc_hideMouseHint.sqf diff --git a/addons/interaction/functions/fn_initialiseInteraction.sqf b/addons/interaction/functions/fnc_initialiseInteraction.sqf similarity index 94% rename from addons/interaction/functions/fn_initialiseInteraction.sqf rename to addons/interaction/functions/fnc_initialiseInteraction.sqf index c951ea88d6..180a7024bb 100644 --- a/addons/interaction/functions/fn_initialiseInteraction.sqf +++ b/addons/interaction/functions/fnc_initialiseInteraction.sqf @@ -41,10 +41,10 @@ if (_this select 2) then { ACE_Interaction_SelectedButton = 0; (findDisplay 1713999) closeDisplay 1; if (_player getVariable ["ACE_AcceptAction", -1] == -1) then { - [{if(isNil {GVAR(MainButton)} || {!(profileNamespace getVariable [QGVAR(FlowMenu), false])})exitWith{false};(-(_this select 0) / 1.2) call FUNC(MoveDown);true}] call EFUNC(core,addScrollWheelEventHandler); + [{if(isNil {GVAR(MainButton)} || {!(profileNamespace getVariable [QGVAR(FlowMenu), false])})exitWith{false};(-(_this select 0) / 1.2) call FUNC(MoveDown);true}] call EFUNC(common,addScrollWheelEventHandler); - _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 ["ACE_AcceptAction", [_player, "menuBack", {(!isNil {GVAR(MainButton)}) && {(profileNamespace getVariable [QGVAR(FlowMenu), false])}}, {call GVAR(MainButton);}] call EFUNC(core,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(common,addActionEventHandler)]; + _player setVariable ["ACE_AcceptAction", [_player, "menuBack", {(!isNil {GVAR(MainButton)}) && {(profileNamespace getVariable [QGVAR(FlowMenu), false])}}, {call GVAR(MainButton);}] call EFUNC(common,addActionEventHandler)]; }; 0 call FUNC(moveDown); [localize "STR_ACE_Interaction_MakeSelection", if (_subMenu)then{localize "STR_ACE_Interaction_Back"}else{""}, localize "STR_ACE_Interaction_ScrollHint"] call FUNC(showMouseHint); @@ -59,8 +59,8 @@ if (_this select 2) then { (findDisplay 46) createDisplay QGVAR(Dialog); // Add eventhandlers - (findDisplay 1713999) displayAddEventHandler ["KeyDown", QUOTE( _this call EFUNC(core,onKeyDown) )]; - (findDisplay 1713999) displayAddEventHandler ["KeyUp", QUOTE( _this call EFUNC(core,onKeyUp) )]; + (findDisplay 1713999) displayAddEventHandler ["KeyDown", QUOTE( _this call EFUNC(common,onKeyDown) )]; + (findDisplay 1713999) displayAddEventHandler ["KeyUp", QUOTE( _this call EFUNC(common,onKeyUp) )]; (findDisplay 1713999) displayAddEventHandler ["KeyDown", QUOTE( _this call FUNC(menuKeyInput) )]; }; @@ -69,7 +69,7 @@ if (_this select 2) then { _ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3; if (profileNamespace getVariable [QGVAR(AutoCenterCursor), true]) then {setMousePosition [0.5, 0.5]}; if !(_subMenu) then { - _ctrlInteractionDialog ctrlSetText ([_target] call EFUNC(core,getName)); + _ctrlInteractionDialog ctrlSetText ([_target] call EFUNC(common,getName)); } else { _ctrlInteractionDialog ctrlSetText localize "STR_ACE_Interaction_Back"; }; @@ -94,7 +94,7 @@ if (_this select 2) then { _ctrlInteractionDialogShortcut ctrlSetText (_action select 10); //_ctrlInteractionDialogBackground ctrlShow true; - GVAR(Shortcuts) set [_i, [_action select 10] call EFUNC(core,letterToCode)]; + GVAR(Shortcuts) set [_i, [_action select 10] call EFUNC(common,letterToCode)]; } else { _ctrlInteractionDialog ctrlSetText ""; _ctrlInteractionDialog ctrlEnable false; diff --git a/addons/interaction/functions/fn_isInRange.sqf b/addons/interaction/functions/fnc_isInRange.sqf similarity index 100% rename from addons/interaction/functions/fn_isInRange.sqf rename to addons/interaction/functions/fnc_isInRange.sqf diff --git a/addons/interaction/functions/fn_joinTeam.sqf b/addons/interaction/functions/fnc_joinTeam.sqf similarity index 87% rename from addons/interaction/functions/fn_joinTeam.sqf rename to addons/interaction/functions/fnc_joinTeam.sqf index ad5d40c7f2..d0aeccc3ad 100644 --- a/addons/interaction/functions/fn_joinTeam.sqf +++ b/addons/interaction/functions/fnc_joinTeam.sqf @@ -7,7 +7,7 @@ _unit = _this select 0; _team = _this select 1; _unit setVariable [QGVAR(assignedFireTeam), _team, true]; -[_unit, format ["{_this assignTeam '%1'}", _team]] call EFUNC(core,execRemoteFnc); +[_unit, format ["{_this assignTeam '%1'}", _team]] call EFUNC(common,execRemoteFnc); if (_unit == ACE_player) then { _message = if (_team == "MAIN") then { @@ -17,5 +17,5 @@ if (_unit == ACE_player) then { format [localize "STR_ACE_Interaction_JoinedTeam", _team]; }; - [_message] call EFUNC(core,displayTextStructured); + [_message] call EFUNC(common,displayTextStructured); }; diff --git a/addons/interaction/functions/fn_menuKeyInput.sqf b/addons/interaction/functions/fnc_menuKeyInput.sqf similarity index 100% rename from addons/interaction/functions/fn_menuKeyInput.sqf rename to addons/interaction/functions/fnc_menuKeyInput.sqf diff --git a/addons/interaction/functions/fn_moduleInteraction.sqf b/addons/interaction/functions/fnc_moduleInteraction.sqf similarity index 88% rename from addons/interaction/functions/fn_moduleInteraction.sqf rename to addons/interaction/functions/fnc_moduleInteraction.sqf index 2d488c9880..78fd6e2acc 100644 --- a/addons/interaction/functions/fn_moduleInteraction.sqf +++ b/addons/interaction/functions/fnc_moduleInteraction.sqf @@ -16,6 +16,6 @@ _activated = _this select 2; if !(_activated) exitWith {}; -[_logic, QGVAR(EnableTeamManagement), "EnableTeamManagement"] call EFUNC(core,readBooleanParameterFromModule); +[_logic, QGVAR(EnableTeamManagement), "EnableTeamManagement"] call EFUNC(common,readBooleanParameterFromModule); diag_log text "[ACE]: Interaction Module Initialized."; diff --git a/addons/interaction/functions/fn_onButtonDown.sqf b/addons/interaction/functions/fnc_onButtonDown.sqf similarity index 90% rename from addons/interaction/functions/fn_onButtonDown.sqf rename to addons/interaction/functions/fnc_onButtonDown.sqf index 59d42e062f..27b46380e0 100644 --- a/addons/interaction/functions/fn_onButtonDown.sqf +++ b/addons/interaction/functions/fnc_onButtonDown.sqf @@ -12,4 +12,4 @@ if (isNull (findDisplay 1713999)) then { (findDisplay 1713999) closeDisplay 1; }; -[_player, "interactionMenuOpened", [_player, GVAR(Target), 0]] call EFUNC(core,callCustomEventHandlers); +[_player, "interactionMenuOpened", [_player, GVAR(Target), 0]] call EFUNC(common,callCustomEventHandlers); diff --git a/addons/interaction/functions/fn_onButtonDownSelf.sqf b/addons/interaction/functions/fnc_onButtonDownSelf.sqf similarity index 87% rename from addons/interaction/functions/fn_onButtonDownSelf.sqf rename to addons/interaction/functions/fnc_onButtonDownSelf.sqf index 3da470d05c..53f57827e9 100644 --- a/addons/interaction/functions/fn_onButtonDownSelf.sqf +++ b/addons/interaction/functions/fnc_onButtonDownSelf.sqf @@ -12,4 +12,4 @@ if (isNull (findDisplay 1713999)) then { (findDisplay 1713999) closeDisplay 1; }; -[_player, "interactionMenuOpened", [_player, GVAR(Target), 1]] call EFUNC(core,callCustomEventHandlers); +[_player, "interactionMenuOpened", [_player, GVAR(Target), 1]] call EFUNC(common,callCustomEventHandlers); diff --git a/addons/interaction/functions/fn_onButtonUp.sqf b/addons/interaction/functions/fnc_onButtonUp.sqf similarity index 100% rename from addons/interaction/functions/fn_onButtonUp.sqf rename to addons/interaction/functions/fnc_onButtonUp.sqf diff --git a/addons/interaction/functions/fn_onClick.sqf b/addons/interaction/functions/fnc_onClick.sqf similarity index 100% rename from addons/interaction/functions/fn_onClick.sqf rename to addons/interaction/functions/fnc_onClick.sqf diff --git a/addons/interaction/functions/fn_onSelectMenuDblClick.sqf b/addons/interaction/functions/fnc_onSelectMenuDblClick.sqf similarity index 100% rename from addons/interaction/functions/fn_onSelectMenuDblClick.sqf rename to addons/interaction/functions/fnc_onSelectMenuDblClick.sqf diff --git a/addons/interaction/functions/fn_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf similarity index 100% rename from addons/interaction/functions/fn_openDoor.sqf rename to addons/interaction/functions/fnc_openDoor.sqf diff --git a/addons/interaction/functions/fn_openMenu.sqf b/addons/interaction/functions/fnc_openMenu.sqf similarity index 100% rename from addons/interaction/functions/fn_openMenu.sqf rename to addons/interaction/functions/fnc_openMenu.sqf diff --git a/addons/interaction/functions/fn_openMenuSelectUI.sqf b/addons/interaction/functions/fnc_openMenuSelectUI.sqf similarity index 86% rename from addons/interaction/functions/fn_openMenuSelectUI.sqf rename to addons/interaction/functions/fnc_openMenuSelectUI.sqf index 552484abce..a13fa6a9f0 100644 --- a/addons/interaction/functions/fn_openMenuSelectUI.sqf +++ b/addons/interaction/functions/fnc_openMenuSelectUI.sqf @@ -7,7 +7,7 @@ _unit = _this select 0; _vehicle = _this select 1; // allow interaction with all cargo slots and all ffv slots -_cargo = [_vehicle, ["cargo", "ffv"], true] call EFUNC(core,getVehicleCrew); +_cargo = [_vehicle, ["cargo", "ffv"], true] call EFUNC(common,getVehicleCrew); // you can only interact if you are in cargo or ffv yourself. exit otherwise if !(_unit in _cargo) exitWith {}; @@ -23,8 +23,8 @@ _actions = [localize "STR_ACE_Interaction_InteractionMenu", localize "STR_ACE_In if (_x != _unit) then { _actions = [ _actions, - [_x] call EFUNC(core,getName), - PATHOD(UI\dot_ca.paa), + [_x] call EFUNC(common,getName), + QUOTE(PATHTOF(UI\dot_ca.paa)), _forEachIndex ] call FUNC(AddSelectableItem); }; diff --git a/addons/interaction/functions/fn_openMenuSelf.sqf b/addons/interaction/functions/fnc_openMenuSelf.sqf similarity index 100% rename from addons/interaction/functions/fn_openMenuSelf.sqf rename to addons/interaction/functions/fnc_openMenuSelf.sqf diff --git a/addons/interaction/functions/fn_openSelectMenu.sqf b/addons/interaction/functions/fnc_openSelectMenu.sqf similarity index 100% rename from addons/interaction/functions/fn_openSelectMenu.sqf rename to addons/interaction/functions/fnc_openSelectMenu.sqf diff --git a/addons/interaction/functions/fn_openSubMenu.sqf b/addons/interaction/functions/fnc_openSubMenu.sqf similarity index 100% rename from addons/interaction/functions/fn_openSubMenu.sqf rename to addons/interaction/functions/fnc_openSubMenu.sqf diff --git a/addons/interaction/functions/fn_openSubMenuSelf.sqf b/addons/interaction/functions/fnc_openSubMenuSelf.sqf similarity index 100% rename from addons/interaction/functions/fn_openSubMenuSelf.sqf rename to addons/interaction/functions/fnc_openSubMenuSelf.sqf diff --git a/addons/interaction/functions/fn_prepareSelectMenu.sqf b/addons/interaction/functions/fnc_prepareSelectMenu.sqf similarity index 100% rename from addons/interaction/functions/fn_prepareSelectMenu.sqf rename to addons/interaction/functions/fnc_prepareSelectMenu.sqf diff --git a/addons/interaction/functions/fn_push.sqf b/addons/interaction/functions/fnc_push.sqf similarity index 82% rename from addons/interaction/functions/fn_push.sqf rename to addons/interaction/functions/fnc_push.sqf index f3ea625bcd..f52a9d40de 100644 --- a/addons/interaction/functions/fn_push.sqf +++ b/addons/interaction/functions/fnc_push.sqf @@ -16,7 +16,7 @@ _boat = _this select 0; _velocity = _this select 1; if !(local _boat) exitWith { - [_this, QUOTE(FUNC(push)), _boat] call EFUNC(core,execRemoteFnc); + [_this, QUOTE(FUNC(push)), _boat] call EFUNC(common,execRemoteFnc); }; _boat setVelocity _velocity; diff --git a/addons/interaction/functions/fn_removeInteraction.sqf b/addons/interaction/functions/fnc_removeInteraction.sqf similarity index 100% rename from addons/interaction/functions/fn_removeInteraction.sqf rename to addons/interaction/functions/fnc_removeInteraction.sqf diff --git a/addons/interaction/functions/fn_removeInteractionSelf.sqf b/addons/interaction/functions/fnc_removeInteractionSelf.sqf similarity index 100% rename from addons/interaction/functions/fn_removeInteractionSelf.sqf rename to addons/interaction/functions/fnc_removeInteractionSelf.sqf diff --git a/addons/interaction/functions/fn_removeTag.sqf b/addons/interaction/functions/fnc_removeTag.sqf similarity index 100% rename from addons/interaction/functions/fn_removeTag.sqf rename to addons/interaction/functions/fnc_removeTag.sqf diff --git a/addons/interaction/functions/fn_sendAway.sqf b/addons/interaction/functions/fnc_sendAway.sqf similarity index 100% rename from addons/interaction/functions/fn_sendAway.sqf rename to addons/interaction/functions/fnc_sendAway.sqf diff --git a/addons/interaction/functions/fn_getCaptivityStatus.sqf b/addons/interaction/functions/fnc_setCaptivityStatus.sqf similarity index 50% rename from addons/interaction/functions/fn_getCaptivityStatus.sqf rename to addons/interaction/functions/fnc_setCaptivityStatus.sqf index d904000e24..fc6c618590 100644 --- a/addons/interaction/functions/fn_getCaptivityStatus.sqf +++ b/addons/interaction/functions/fnc_setCaptivityStatus.sqf @@ -1,4 +1,4 @@ // by commy2 #include "script_component.hpp" -_this call EFUNC(core,getCaptivityStatus); +_this call EFUNC(common,setCaptivityStatus); diff --git a/addons/interaction/functions/fn_showMenu.sqf b/addons/interaction/functions/fnc_showMenu.sqf similarity index 97% rename from addons/interaction/functions/fn_showMenu.sqf rename to addons/interaction/functions/fnc_showMenu.sqf index 58a6863bc3..b567a22ea4 100644 --- a/addons/interaction/functions/fn_showMenu.sqf +++ b/addons/interaction/functions/fnc_showMenu.sqf @@ -23,7 +23,7 @@ #include "script_component.hpp" private ["_player", "_vehicle", "_mainButtonAction", "_object", "_index", "_actions", "_result", "_menuType"]; -#define DEFAULT_ICON PATHOF(UI\dot_ca.paa) +#define DEFAULT_ICON QUOTE(PATHOF(UI\dot_ca.paa)) #define DEFAULT_DISTANCE 4 // seems to be 4 _player = ACE_player; _vehicle = vehicle _player; @@ -44,7 +44,7 @@ GVAR(Target) = _this select 1; _object = GVAR(Target); if (_menuType == 0 && {(isNull (_object) || {!([_object, 4] call FUNC(isInRange))})}) exitWith {}; -if !([_player, _object] call EFUNC(core,canInteractWith)) exitWith {}; +if !([_player, _object] call EFUNC(common,canInteractWith)) exitWith {}; // add actions or self actions of GVAR(Target) _parents = [configFile >> "CfgVehicles" >> typeOf _object, true] call BIS_fnc_returnParents; diff --git a/addons/interaction/functions/fn_showMouseHint.sqf b/addons/interaction/functions/fnc_showMouseHint.sqf similarity index 100% rename from addons/interaction/functions/fn_showMouseHint.sqf rename to addons/interaction/functions/fnc_showMouseHint.sqf diff --git a/addons/interaction/functions/fn_sortOptionsByPriority.sqf b/addons/interaction/functions/fnc_sortOptionsByPriority.sqf similarity index 100% rename from addons/interaction/functions/fn_sortOptionsByPriority.sqf rename to addons/interaction/functions/fnc_sortOptionsByPriority.sqf diff --git a/addons/interaction/functions/fn_tapShoulder.sqf b/addons/interaction/functions/fnc_tapShoulder.sqf similarity index 85% rename from addons/interaction/functions/fn_tapShoulder.sqf rename to addons/interaction/functions/fnc_tapShoulder.sqf index a37aeafa64..aedf6ce37f 100644 --- a/addons/interaction/functions/fn_tapShoulder.sqf +++ b/addons/interaction/functions/fnc_tapShoulder.sqf @@ -15,7 +15,7 @@ if (_target != ACE_player) exitWith { addCamShake [4, 0.5, 5]; -//_message = format ["%1 tapped you on your shoulder.", [_unit] call EFUNC(core,getName)]; +//_message = format ["%1 tapped you on your shoulder.", [_unit] call EFUNC(common,getName)]; _message = localize "STR_ACE_Interaction_YouWereTapped"; -[_message] call EFUNC(core,displayTextStructured); +[_message] call EFUNC(common,displayTextStructured); diff --git a/addons/interaction/functions/fn_updateTooltipPosition.sqf b/addons/interaction/functions/fnc_updateTooltipPosition.sqf similarity index 100% rename from addons/interaction/functions/fn_updateTooltipPosition.sqf rename to addons/interaction/functions/fnc_updateTooltipPosition.sqf diff --git a/addons/interaction/functions/script_component.hpp b/addons/interaction/functions/script_component.hpp new file mode 100644 index 0000000000..ef1c22f146 --- /dev/null +++ b/addons/interaction/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\interaction\script_component.hpp" \ No newline at end of file diff --git a/addons/laser/config.cpp b/addons/laser/config.cpp index ee1b9f1996..6fec248637 100644 --- a/addons/laser/config.cpp +++ b/addons/laser/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { "uo_main", "a3_ui_f" }; + requiredAddons[] = { "ace_common" }; version = VERSION; }; }; diff --git a/addons/laser/fnc_checkLos.sqf b/addons/laser/functions/fnc_checkLos.sqf similarity index 100% rename from addons/laser/fnc_checkLos.sqf rename to addons/laser/functions/fnc_checkLos.sqf diff --git a/addons/laser/fnc_findLaserDesignator.sqf b/addons/laser/functions/fnc_findLaserDesignator.sqf similarity index 100% rename from addons/laser/fnc_findLaserDesignator.sqf rename to addons/laser/functions/fnc_findLaserDesignator.sqf diff --git a/addons/laser/fnc_findStrongestRay.sqf b/addons/laser/functions/fnc_findStrongestRay.sqf similarity index 100% rename from addons/laser/fnc_findStrongestRay.sqf rename to addons/laser/functions/fnc_findStrongestRay.sqf diff --git a/addons/laser/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf similarity index 100% rename from addons/laser/fnc_laserTargetPFH.sqf rename to addons/laser/functions/fnc_laserTargetPFH.sqf diff --git a/addons/laser/fnc_laser_init.sqf b/addons/laser/functions/fnc_laser_init.sqf similarity index 100% rename from addons/laser/fnc_laser_init.sqf rename to addons/laser/functions/fnc_laser_init.sqf diff --git a/addons/laser/fnc_rotateVectLine.sqf b/addons/laser/functions/fnc_rotateVectLine.sqf similarity index 100% rename from addons/laser/fnc_rotateVectLine.sqf rename to addons/laser/functions/fnc_rotateVectLine.sqf diff --git a/addons/laser/fnc_rotateVectLineGetMap.sqf b/addons/laser/functions/fnc_rotateVectLineGetMap.sqf similarity index 100% rename from addons/laser/fnc_rotateVectLineGetMap.sqf rename to addons/laser/functions/fnc_rotateVectLineGetMap.sqf diff --git a/addons/laser/fnc_shootCone.sqf b/addons/laser/functions/fnc_shootCone.sqf similarity index 100% rename from addons/laser/fnc_shootCone.sqf rename to addons/laser/functions/fnc_shootCone.sqf diff --git a/addons/laser/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf similarity index 100% rename from addons/laser/fnc_shootRay.sqf rename to addons/laser/functions/fnc_shootRay.sqf diff --git a/addons/laser/fnc_translateToModelSpace.sqf b/addons/laser/functions/fnc_translateToModelSpace.sqf similarity index 100% rename from addons/laser/fnc_translateToModelSpace.sqf rename to addons/laser/functions/fnc_translateToModelSpace.sqf diff --git a/addons/laser/fnc_translateToWeaponSpace.sqf b/addons/laser/functions/fnc_translateToWeaponSpace.sqf similarity index 100% rename from addons/laser/fnc_translateToWeaponSpace.sqf rename to addons/laser/functions/fnc_translateToWeaponSpace.sqf diff --git a/addons/laser/functions/script_component.hpp b/addons/laser/functions/script_component.hpp new file mode 100644 index 0000000000..98d00342c0 --- /dev/null +++ b/addons/laser/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\laser\script_component.hpp" \ No newline at end of file diff --git a/addons/main/license.sqf b/addons/main/license.sqf new file mode 100644 index 0000000000..e97d9c51a3 --- /dev/null +++ b/addons/main/license.sqf @@ -0,0 +1,92 @@ +License (short) +=============== + +You are free: +- to Share — to copy, distribute and transmit the work + +Under the following conditions: +- Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). +- Noncommercial — You may not use this work for commercial purposes. +- No Derivative Works — You may not alter, transform, or build upon this work. + +With the understanding that: + +Waiver — Any of the above conditions can be waived if you get permission from the copyright holder. + +Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. + +Other Rights — In no way are any of the following rights affected by the license: + - Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; + - The author's moral rights; + - Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. + +Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. + + +Full license text +================= + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + +"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. +"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. +"Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership. +"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. +"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. +"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. +"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. +"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. +"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. + +Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. + +Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + +to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and, to Distribute and Publicly Perform the Work including as incorporated in Collections. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d). + +4. Restrictions. + +The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + +You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. +You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. +If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + +For the avoidance of doubt: + +Non-waivable Compulsory License Schemes. + +In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; +Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, +Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b). +Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. + +5. Representations, Warranties and Disclaimer. + +UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination. + +This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. +Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). + +Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous. + +Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. +If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. +This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. +The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 7811c32337..be16f947ac 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -177,6 +177,10 @@ #define DGVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(GVAR(varName)) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(GVAR(varName))); }; GVAR(varName) #define DVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(varName) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(varName)); }; varName #define DFUNC(var1) TRIPLES(ADDON,fnc,var1) +#define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) + +#define QFUNC(var1) QUOTE(DFUNC(var1)) +#define QEFUNC(var1,var2) QUOTE(DEFUNC(var1,var2)) #ifdef DISABLE_COMPILE_CACHE #define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf)) diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp index 42d23c98c0..be4ccc5a22 100644 --- a/addons/missileguidance/config.cpp +++ b/addons/missileguidance/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { "uo_main", "ace__laser", "a3_ui_f" }; + requiredAddons[] = { "ace_common", "ace_laser" }; version = VERSION; }; }; diff --git a/addons/missileguidance/fnc_fired.sqf b/addons/missileguidance/functions/fnc_fired.sqf similarity index 100% rename from addons/missileguidance/fnc_fired.sqf rename to addons/missileguidance/functions/fnc_fired.sqf diff --git a/addons/missileguidance/fnc_guidance_DAGR.sqf b/addons/missileguidance/functions/fnc_guidance_DAGR.sqf similarity index 100% rename from addons/missileguidance/fnc_guidance_DAGR.sqf rename to addons/missileguidance/functions/fnc_guidance_DAGR.sqf diff --git a/addons/missileguidance/fnc_guidance_HellfireII.sqf b/addons/missileguidance/functions/fnc_guidance_HellfireII.sqf similarity index 100% rename from addons/missileguidance/fnc_guidance_HellfireII.sqf rename to addons/missileguidance/functions/fnc_guidance_HellfireII.sqf diff --git a/addons/missileguidance/fnc_guidance_LGB.sqf b/addons/missileguidance/functions/fnc_guidance_LGB.sqf similarity index 100% rename from addons/missileguidance/fnc_guidance_LGB.sqf rename to addons/missileguidance/functions/fnc_guidance_LGB.sqf diff --git a/addons/missileguidance/fnc_rotateVectLine.sqf b/addons/missileguidance/functions/fnc_rotateVectLine.sqf similarity index 100% rename from addons/missileguidance/fnc_rotateVectLine.sqf rename to addons/missileguidance/functions/fnc_rotateVectLine.sqf diff --git a/addons/missileguidance/fnc_rotateVectLineGetMap.sqf b/addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf similarity index 100% rename from addons/missileguidance/fnc_rotateVectLineGetMap.sqf rename to addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf diff --git a/addons/missileguidance/fnc_translateToModelSpace.sqf b/addons/missileguidance/functions/fnc_translateToModelSpace.sqf similarity index 100% rename from addons/missileguidance/fnc_translateToModelSpace.sqf rename to addons/missileguidance/functions/fnc_translateToModelSpace.sqf diff --git a/addons/missileguidance/fnc_translateToWeaponSpace.sqf b/addons/missileguidance/functions/fnc_translateToWeaponSpace.sqf similarity index 100% rename from addons/missileguidance/fnc_translateToWeaponSpace.sqf rename to addons/missileguidance/functions/fnc_translateToWeaponSpace.sqf diff --git a/addons/missileguidance/functions/script_component.hpp b/addons/missileguidance/functions/script_component.hpp new file mode 100644 index 0000000000..7046e9271d --- /dev/null +++ b/addons/missileguidance/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\missileguidance\script_component.hpp" \ No newline at end of file diff --git a/addons/switchunits/CfgVehicles.hpp b/addons/switchunits/CfgVehicles.hpp index 04a08bd8d5..1a4a45d832 100644 --- a/addons/switchunits/CfgVehicles.hpp +++ b/addons/switchunits/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { function = FUNC(module); scope = 2; isGlobal = 1; - icon = PATHTOF(UI\IconSwitchUnits_ca.paa); + icon = QUOTE(PATHTOF(UI\IconSwitchUnits_ca.paa)); class Arguments { class SwitchToWest { displayName = "Switch to West?"; diff --git a/addons/switchunits/config.cpp b/addons/switchunits/config.cpp index 63e81332cc..1f60ca83ac 100644 --- a/addons/switchunits/config.cpp +++ b/addons/switchunits/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = 0.60; - requiredAddons[] = {"ace_core"}; + requiredAddons[] = {"ace_main", "ace_common"}; version = QUOTE(VERSION); versionStr = QUOTE(VERSION); versionAr[] = {VERSION_AR}; diff --git a/addons/switchunits/functions/fnc_initPlayer.sqf b/addons/switchunits/functions/fnc_initPlayer.sqf index 60e5eaabc7..27dd95a8e3 100644 --- a/addons/switchunits/functions/fnc_initPlayer.sqf +++ b/addons/switchunits/functions/fnc_initPlayer.sqf @@ -30,7 +30,7 @@ if (vehicle _playerUnit == _playerUnit) then { _playerUnit allowDamage false; GVAR(OriginalUnit) = _playerUnit; - GVAR(OriginalName) = [_playerUnit] call EFUNC(Core, getName); + GVAR(OriginalName) = [_playerUnit] call EFUNC(common,getName); GVAR(OriginalGroup) = group _playerUnit; // remove all starting gear of a player @@ -44,7 +44,7 @@ if (vehicle _playerUnit == _playerUnit) then { _playerUnit linkItem "ItemMap"; removeUniform _playerUnit; - [_playerUnit, "ACE_SwitchUnits", true] call EFUNC(Core, setForceWalkStatus); + [_playerUnit, "ACE_SwitchUnits", true] call EFUNC(common,setForceWalkStatus); - [_playerUnit, _sides] call AFUNC(addMapFunction); + [_playerUnit, _sides] call FUNC(addMapFunction); }; diff --git a/addons/switchunits/functions/fnc_isValidAi.sqf b/addons/switchunits/functions/fnc_isValidAi.sqf index 3803ce4fbd..99d8889563 100644 --- a/addons/switchunits/functions/fnc_isValidAi.sqf +++ b/addons/switchunits/functions/fnc_isValidAi.sqf @@ -20,7 +20,7 @@ private ["_unit"]; _unit = _this select 0; -!([_unit] call EFUNC(Core, isPlayer) +!([_unit] call EFUNC(common,isPlayer) || {_unit in playableUnits} || {vehicle _unit != _unit} || {_unit getVariable [QGVAR(IsPlayerUnit), false]} diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index 79e72c7379..dbf4fda7ab 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -39,7 +39,7 @@ _sidesToShow spawn { if (([_x] call FUNC(isValidAi) && (side group _x in _sides)) || (_x getVariable [QGVAR(IsPlayerControlled), false])) then { private ["_markerName", "_marker", "_markerColor"]; - //_markerName = format ["%1", [_x] call EFUNC(Core, getName)]; + //_markerName = format ["%1", [_x] call EFUNC(common,getName)]; _markerName = str _x; _marker = createMarkerLocal [_markerName, position _x]; diff --git a/addons/switchunits/functions/fnc_module.sqf b/addons/switchunits/functions/fnc_module.sqf index c614b9c6d7..7776caf645 100644 --- a/addons/switchunits/functions/fnc_module.sqf +++ b/addons/switchunits/functions/fnc_module.sqf @@ -27,14 +27,14 @@ if !(_activated) exitWith {}; GVAR(Module) = true; -[QGVAR(EnableSwitchUnits), true] call EFUNC(Core, setParameter); +[QGVAR(EnableSwitchUnits), true] call EFUNC(common,setParameter); -[_logic, QGVAR(SwitchToWest), "SwitchToWest"] call EFUNC(Core, readBooleanParameterFromModule); -[_logic, QGVAR(SwitchToEast), "SwitchToEast"] call EFUNC(Core, readBooleanParameterFromModule); -[_logic, QGVAR(SwitchToIndependent), "SwitchToIndependent"] call EFUNC(Core, readBooleanParameterFromModule); -[_logic, QGVAR(SwitchToCivilian), "SwitchToCivilian"] call EFUNC(Core, readBooleanParameterFromModule); +[_logic, QGVAR(SwitchToWest), "SwitchToWest"] call EFUNC(common,readBooleanParameterFromModule); +[_logic, QGVAR(SwitchToEast), "SwitchToEast"] call EFUNC(common,readBooleanParameterFromModule); +[_logic, QGVAR(SwitchToIndependent), "SwitchToIndependent"] call EFUNC(common,readBooleanParameterFromModule); +[_logic, QGVAR(SwitchToCivilian), "SwitchToCivilian"] call EFUNC(common,readBooleanParameterFromModule); -[_logic, QGVAR(EnableSafeZone), "EnableSafeZone"] call EFUNC(Core, readBooleanParameterFromModule); -[_logic, QGVAR(SafeZoneRadius), "SafeZoneRadius"] call EFUNC(Core, readNumericParameterFromModule); +[_logic, QGVAR(EnableSafeZone), "EnableSafeZone"] call EFUNC(common,readBooleanParameterFromModule); +[_logic, QGVAR(SafeZoneRadius), "SafeZoneRadius"] call EFUNC(common,readNumericParameterFromModule); diag_log text "[ACE]: SwitchUnits Module Initialized."; diff --git a/addons/switchunits/functions/fnc_nearestPlayers.sqf b/addons/switchunits/functions/fnc_nearestPlayers.sqf index 6475185171..1fade9e07a 100644 --- a/addons/switchunits/functions/fnc_nearestPlayers.sqf +++ b/addons/switchunits/functions/fnc_nearestPlayers.sqf @@ -25,7 +25,7 @@ _radius = _this select 1; _nearestPlayers = []; { - if ([_x] call EFUNC(Core, isPlayer) && {alive _x}) then { + if ([_x] call EFUNC(common,isPlayer) && {alive _x}) then { _nearestPlayers pushBack _x; }; } forEach (nearestObjects [_position, ["Man"], _radius]); diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index 6002ee3f8f..606fdccf22 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -33,7 +33,7 @@ _newUnit spawn { if (GVAR(EnableSafeZone)) then { _allNearestPlayers = [position _unit, GVAR(SafeZoneRadius)] call FUNC(nearestPlayers); - _nearestEnemyPlayers = [_allNearestPlayers, {((side GVAR(OriginalGroup)) getFriend (side _this) < 0.6) && !(_this getVariable [QGVAR(IsPlayerControlled), false])}] call EFUNC(Core, filter); + _nearestEnemyPlayers = [_allNearestPlayers, {((side GVAR(OriginalGroup)) getFriend (side _this) < 0.6) && !(_this getVariable [QGVAR(IsPlayerControlled), false])}] call EFUNC(common,filter); if (count _nearestEnemyPlayers > 0) exitWith { _leave = true; @@ -42,13 +42,13 @@ _newUnit spawn { // exitWith doesn't exit past the "if(EnableSafeZone)" block if (_leave) exitWith { - [localize "STR_ACE_SwitchUnits_TooCloseToEnemy"] call EFUNC(Core, displayTextStructured); + [localize "STR_ACE_SwitchUnits_TooCloseToEnemy"] call EFUNC(common,displayTextStructured); }; // 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(Core, execRemoteFnc); + [[_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); _oldUnit = player; waitUntil {sleep 0.2; local _unit}; @@ -74,8 +74,8 @@ _newUnit spawn { // set owner back to original owner _oldOwner = _oldUnit getVariable[QGVAR(OriginalOwner), -1]; if (_oldOwner > -1) then { - [[_oldUnit, _oldOwner], QUOTE({(_this select 0) setOwner (_this select 1)}), 1] call EFUNC(Core, execRemoteFnc); + [[_oldUnit, _oldOwner], QUOTE({(_this select 0) setOwner (_this select 1)}), 1] call EFUNC(common,execRemoteFnc); }; - [localize "STR_ACE_SwitchUnits_SwitchedUnit"] call EFUNC(Core, displayTextStructured); + [localize "STR_ACE_SwitchUnits_SwitchedUnit"] call EFUNC(common,displayTextStructured); }; diff --git a/addons/switchunits/functions/script_component.hpp b/addons/switchunits/functions/script_component.hpp new file mode 100644 index 0000000000..df5c7a0d96 --- /dev/null +++ b/addons/switchunits/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\switchunits\script_component.hpp" \ No newline at end of file diff --git a/addons/wep_dragon/CfgAmmo.hpp b/addons/wep_dragon/CfgAmmo.hpp index e51ea122b9..62769fec2b 100644 --- a/addons/wep_dragon/CfgAmmo.hpp +++ b/addons/wep_dragon/CfgAmmo.hpp @@ -48,7 +48,7 @@ class CfgAmmo { }; class ace_missile_dragon : M_47_AT_EP1 { - model = PATHTOF(models\dragon.p3d); + model = QUOTE(PATHTOF(models\dragon.p3d)); maxSpeed = 120; thrust = 0; initTime = 0; diff --git a/addons/wep_dragon/CfgMagazines.hpp b/addons/wep_dragon/CfgMagazines.hpp index 904f53a0c9..8b00f7b2fb 100644 --- a/addons/wep_dragon/CfgMagazines.hpp +++ b/addons/wep_dragon/CfgMagazines.hpp @@ -2,6 +2,6 @@ class CfgMagazines { class CA_LauncherMagazine; class Dragon_EP1: CA_LauncherMagazine { - model = PATHTOF(models\ace_m47_magazine.p3d); + model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d)); }; }; \ No newline at end of file diff --git a/addons/wep_dragon/CfgVehicles.hpp b/addons/wep_dragon/CfgVehicles.hpp index 5e5682e9c6..1d7d3841a7 100644 --- a/addons/wep_dragon/CfgVehicles.hpp +++ b/addons/wep_dragon/CfgVehicles.hpp @@ -21,7 +21,7 @@ class CfgVehicles { class ACE_M47_Static: ACE_M47_Static_Base { scope = 1; // Hide it for now - model = PATHTOF(models\ace_m47_static.p3d); + model = QUOTE(PATHTOF(models\ace_m47_static.p3d)); displayName = "M47 Dragon"; class Turrets: Turrets { class MainTurret: MainTurret { diff --git a/addons/wep_dragon/CfgWeapons.hpp b/addons/wep_dragon/CfgWeapons.hpp index 851796b260..b873219e04 100644 --- a/addons/wep_dragon/CfgWeapons.hpp +++ b/addons/wep_dragon/CfgWeapons.hpp @@ -20,13 +20,13 @@ class CfgWeapons { class M47Launcher_EP1: Launcher { displayName = "M47 Dragon"; canlock = 0; - model = PATHTOF(models\ace_m47_magazine.p3d); - picture = PATHTOF(textures\m47_dragon_item_ca.paa); + model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d)); + picture = QUOTE(PATHTOF(textures\m47_dragon_item_ca.paa)); }; class ACE_M47_Daysight: M47Launcher_EP1 { displayName = $STR_DN_ACE_DRAGONSUP36; // Stay next to tubes in gear dialogs - model = PATHTOF(models\ace_m47_optic.p3d); - picture = PATHTOF(textures\m47_daysight_item_ca.paa); + model = QUOTE(PATHTOF(models\ace_m47_optic.p3d)); + picture = QUOTE(PATHTOF(textures\m47_daysight_item_ca.paa)); optics = 1; weaponInfoType = "RscWeaponEmpty"; modelOptics = "\ca\Weapons_e\optics_m47"; diff --git a/addons/wep_dragon/config.cpp b/addons/wep_dragon/config.cpp index 775fd26357..235e643b18 100644 --- a/addons/wep_dragon/config.cpp +++ b/addons/wep_dragon/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = { "ACE_M47_Static" }; weapons[] = { "ACE_M47StaticLauncher", "M47Launcher_EP1", "ACE_M47_Daysight" }; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { "uo_main", "a3_data_f", "a3_static_f"}; + requiredAddons[] = { "ace_main", "ace_common" }; version = VERSION; }; }; diff --git a/addons/wep_dragon/fnc_dragon_fired.sqf b/addons/wep_dragon/functions/fnc_dragon_fired.sqf similarity index 100% rename from addons/wep_dragon/fnc_dragon_fired.sqf rename to addons/wep_dragon/functions/fnc_dragon_fired.sqf diff --git a/addons/wep_dragon/functions/script_component.hpp b/addons/wep_dragon/functions/script_component.hpp new file mode 100644 index 0000000000..0aae3f8cee --- /dev/null +++ b/addons/wep_dragon/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\wep_dragon\script_component.hpp" \ No newline at end of file diff --git a/addons/wep_javelin/config.cpp b/addons/wep_javelin/config.cpp index c47e95b44c..07a1e33d41 100644 --- a/addons/wep_javelin/config.cpp +++ b/addons/wep_javelin/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { "uo_main", "ace__laser", "a3_ui_f", "a3_weapons_f" }; + requiredAddons[] = { "ace_main", "ace_common", "ace_laser" }; version = VERSION; }; }; diff --git a/addons/wep_javelin/fnc_fired.sqf b/addons/wep_javelin/functions/fnc_fired.sqf similarity index 100% rename from addons/wep_javelin/fnc_fired.sqf rename to addons/wep_javelin/functions/fnc_fired.sqf diff --git a/addons/wep_javelin/fnc_onGetLockedTarget.sqf b/addons/wep_javelin/functions/fnc_onGetLockedTarget.sqf similarity index 100% rename from addons/wep_javelin/fnc_onGetLockedTarget.sqf rename to addons/wep_javelin/functions/fnc_onGetLockedTarget.sqf diff --git a/addons/wep_javelin/functions/script_component.hpp b/addons/wep_javelin/functions/script_component.hpp new file mode 100644 index 0000000000..fdc194ff7b --- /dev/null +++ b/addons/wep_javelin/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\wep_javelin\script_component.hpp" \ No newline at end of file diff --git a/tools/build.bat b/tools/build.bat index 837aee5490..32973803dc 100644 --- a/tools/build.bat +++ b/tools/build.bat @@ -1,4 +1,6 @@ pushd ..\addons\ for /D %%i in (*.*) do ( makepbo -NUP -@=z\addons\ace\%%i %%i ace_%%i.pbo + if %errorlevel% neq 0 exit /b %errorlevel% ) +popd diff --git a/tools/rename_fn.py b/tools/rename_fn.py new file mode 100644 index 0000000000..a6ebfa5056 --- /dev/null +++ b/tools/rename_fn.py @@ -0,0 +1,13 @@ +import os + +for root, dirs, files in os.walk(os.getcwd()): + for filename in files: + oldname = filename + newname = filename.replace('fn_', 'fnc_') + + print os.path.join(root,oldname) + print newname + if newname != oldname: + print os.path.join(root,oldname) + print oldname + ' -> ' + newname + os.rename(os.path.join(root,oldname), os.path.join(root,newname)) \ No newline at end of file