mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add various misc improvements for ACE Arsenal (#6111)
* Disable anim previews when center isn't the player * Abuse configs to change the edit loadout 3DEN entry * Remove inheriting as it's not needed * Remove uneeded condition * Add zeus modules for ACE Arsenal, revert old arsenal modules * Add 3 new arsenal EHs * Add a setting to disable the identity tabs in ace arsenal * Pass loadoutName in the onloadoutLoad EH * Change foreach to forEach and ctrlcommit to ctrlCommit * Resize the right window when the load bar isn't there * Add a tooltip for the "clear container" button * Improve onKeyDown, add classname copying using ctrl+c
This commit is contained in:
parent
eedb9fe614
commit
8b9480de40
@ -12,6 +12,8 @@ GVAR(modList) = ["","curator","kart","heli","mark","expansion","expansionpremium
|
|||||||
[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_Settings_fnc_init;
|
[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_Settings_fnc_init;
|
||||||
[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;
|
[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;
|
||||||
[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_Settings_fnc_init;
|
[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_Settings_fnc_init;
|
||||||
|
[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
|
||||||
|
|
||||||
|
|
||||||
// Arsenal loadouts
|
// Arsenal loadouts
|
||||||
[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
|
[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
|
||||||
|
@ -200,6 +200,21 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\
|
|||||||
IDC_rightTabContentListnBox,\
|
IDC_rightTabContentListnBox,\
|
||||||
RIGHT_PANEL_ITEMS_BACKGROUND_IDCS,\
|
RIGHT_PANEL_ITEMS_BACKGROUND_IDCS,\
|
||||||
IDC_buttonRemoveAll\
|
IDC_buttonRemoveAll\
|
||||||
|
];\
|
||||||
|
{\
|
||||||
|
_x = _display displayCtrl _x;\
|
||||||
|
_x ctrlSetPosition [\
|
||||||
|
safezoneX + safezoneW - 93 * GRID_W,\
|
||||||
|
safezoneY + 14 * GRID_H,\
|
||||||
|
80 * GRID_W,\
|
||||||
|
safezoneH - 28 * GRID_H\
|
||||||
|
];\
|
||||||
|
_x ctrlCommit 0;\
|
||||||
|
} foreach [\
|
||||||
|
IDC_rightTabContent,\
|
||||||
|
IDC_rightTabContentListnBox,\
|
||||||
|
IDC_blockRightFrame,\
|
||||||
|
IDC_blockRighttBackground\
|
||||||
];
|
];
|
||||||
|
|
||||||
#define TOGGLE_RIGHT_PANEL_CONTAINER\
|
#define TOGGLE_RIGHT_PANEL_CONTAINER\
|
||||||
@ -232,6 +247,21 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\
|
|||||||
IDC_buttonCurrentMag2,\
|
IDC_buttonCurrentMag2,\
|
||||||
IDC_iconBackgroundCurrentMag,\
|
IDC_iconBackgroundCurrentMag,\
|
||||||
IDC_iconBackgroundCurrentMag2\
|
IDC_iconBackgroundCurrentMag2\
|
||||||
|
];\
|
||||||
|
{\
|
||||||
|
_x = _display displayCtrl _x;\
|
||||||
|
_x ctrlSetPosition [\
|
||||||
|
safezoneX + safezoneW - 93 * GRID_W,\
|
||||||
|
safezoneY + 14 * GRID_H,\
|
||||||
|
80 * GRID_W,\
|
||||||
|
safezoneH - 34 * GRID_H\
|
||||||
|
];\
|
||||||
|
_x ctrlCommit 0;\
|
||||||
|
} foreach [\
|
||||||
|
IDC_rightTabContent,\
|
||||||
|
IDC_rightTabContentListnBox,\
|
||||||
|
IDC_blockRightFrame,\
|
||||||
|
IDC_blockRighttBackground\
|
||||||
];
|
];
|
||||||
|
|
||||||
#define TOGGLE_RIGHT_PANEL_HIDE\
|
#define TOGGLE_RIGHT_PANEL_HIDE\
|
||||||
|
@ -49,3 +49,5 @@ if (GVAR(shiftState)) then {
|
|||||||
|
|
||||||
[_display, localize LSTRING(exportCurrent)] call FUNC(message);
|
[_display, localize LSTRING(exportCurrent)] call FUNC(message);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[QGVAR(loadoutExported), [_display, GVAR(shiftState)]] call CBA_fnc_localEvent;
|
||||||
|
@ -109,3 +109,5 @@ if (GVAR(shiftState) && {is3DEN}) then {
|
|||||||
[_display, localize LSTRING(importedCurrent)] call FUNC(message);
|
[_display, localize LSTRING(importedCurrent)] call FUNC(message);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[QGVAR(loadoutImported), [_display, (GVAR(shiftState) && {is3DEN})]] call CBA_fnc_localEvent;
|
||||||
|
@ -88,3 +88,5 @@ call FUNC(updateUniqueItemsList);
|
|||||||
[GVAR(center), GVAR(currentInsignia)] call bis_fnc_setUnitInsignia;
|
[GVAR(center), GVAR(currentInsignia)] call bis_fnc_setUnitInsignia;
|
||||||
|
|
||||||
[(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutLoaded), _loadoutName] joinString " "] call FUNC(message);
|
[(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutLoaded), _loadoutName] joinString " "] call FUNC(message);
|
||||||
|
|
||||||
|
[QGVAR(onLoadoutLoad), [_loadout, _loadoutName]] call CBA_fnc_localEvent;
|
||||||
|
@ -99,5 +99,6 @@ GVAR(currentInsignia) = nil;
|
|||||||
GVAR(currentAction) = nil;
|
GVAR(currentAction) = nil;
|
||||||
|
|
||||||
GVAR(center) = nil;
|
GVAR(center) = nil;
|
||||||
|
GVAR(centerNotPlayer) = nil;
|
||||||
|
|
||||||
showHUD true;
|
showHUD true;
|
||||||
|
@ -87,8 +87,8 @@ for "_index" from 0 to 10 do {
|
|||||||
if (_x != "") then {
|
if (_x != "") then {
|
||||||
(GVAR(virtualItems) select _index) select ([2, 1, 0, 3] select _forEachIndex) pushBackUnique _x;
|
(GVAR(virtualItems) select _index) select ([2, 1, 0, 3] select _forEachIndex) pushBackUnique _x;
|
||||||
};
|
};
|
||||||
} foreach _x;
|
} forEach _x;
|
||||||
} foreach _accsArray;
|
} forEach _accsArray;
|
||||||
|
|
||||||
{
|
{
|
||||||
if !(_x isEqualTo []) then {
|
if !(_x isEqualTo []) then {
|
||||||
@ -101,7 +101,7 @@ for "_index" from 0 to 10 do {
|
|||||||
(GVAR(virtualItems) select 2) pushBackUnique (_x select 1);
|
(GVAR(virtualItems) select 2) pushBackUnique (_x select 1);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} foreach _magsArray;
|
} forEach _magsArray;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Inventory items
|
// Inventory items
|
||||||
@ -113,7 +113,7 @@ for "_index" from 0 to 10 do {
|
|||||||
default {
|
default {
|
||||||
private _array = (LIST_DEFAULTS select _index) select {!(_x isEqualTo "")};
|
private _array = (LIST_DEFAULTS select _index) select {!(_x isEqualTo "")};
|
||||||
if !(_array isEqualTo []) then {
|
if !(_array isEqualTo []) then {
|
||||||
{(GVAR(virtualItems) select _index) pushBackUnique _x} foreach _array;
|
{(GVAR(virtualItems) select _index) pushBackUnique _x} forEach _array;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -163,7 +163,7 @@ for "_index" from 0 to 15 do {
|
|||||||
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType));
|
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType));
|
||||||
|
|
||||||
GVAR(currentItems) set [_index, _x];
|
GVAR(currentItems) set [_index, _x];
|
||||||
} foreach (assignedItems GVAR(center));
|
} forEach (assignedItems GVAR(center));
|
||||||
|
|
||||||
GVAR(currentWeaponType) = switch true do {
|
GVAR(currentWeaponType) = switch true do {
|
||||||
case (currentWeapon GVAR(center) == GVAR(currentItems) select 0): {0};
|
case (currentWeapon GVAR(center) == GVAR(currentItems) select 0): {0};
|
||||||
@ -184,7 +184,7 @@ _mouseBlockCtrl ctrlEnable false;
|
|||||||
_x ctrlSetFade 1;
|
_x ctrlSetFade 1;
|
||||||
_x ctrlShow false;
|
_x ctrlShow false;
|
||||||
_x ctrlCommit 0;
|
_x ctrlCommit 0;
|
||||||
} foreach [
|
} forEach [
|
||||||
IDC_blockRightFrame,
|
IDC_blockRightFrame,
|
||||||
IDC_blockRighttBackground,
|
IDC_blockRighttBackground,
|
||||||
IDC_loadIndicator,
|
IDC_loadIndicator,
|
||||||
@ -258,8 +258,8 @@ if (is3DEN) then {
|
|||||||
private _ctrl = _display displayctrl _x;
|
private _ctrl = _display displayctrl _x;
|
||||||
_ctrl ctrlEnable false;
|
_ctrl ctrlEnable false;
|
||||||
_ctrl ctrlSetFade 0.6;
|
_ctrl ctrlSetFade 0.6;
|
||||||
_ctrl ctrlcommit 0;
|
_ctrl ctrlCommit 0;
|
||||||
} foreach [
|
} forEach [
|
||||||
IDC_buttonFace,
|
IDC_buttonFace,
|
||||||
IDC_buttonVoice,
|
IDC_buttonVoice,
|
||||||
IDC_buttonInsigna
|
IDC_buttonInsigna
|
||||||
@ -267,6 +267,19 @@ if (is3DEN) then {
|
|||||||
|
|
||||||
_buttonCloseCtrl = _display displayCtrl IDC_menuBarClose;
|
_buttonCloseCtrl = _display displayCtrl IDC_menuBarClose;
|
||||||
_buttonCloseCtrl ctrlSetText (localize "str_ui_debug_but_apply");
|
_buttonCloseCtrl ctrlSetText (localize "str_ui_debug_but_apply");
|
||||||
|
} else {
|
||||||
|
GVAR(centerNotPlayer) = (GVAR(center) != player);
|
||||||
|
|
||||||
|
{
|
||||||
|
private _ctrl = _display displayCtrl _x;
|
||||||
|
_ctrl ctrlEnable GVAR(enableIdentityTabs);
|
||||||
|
_ctrl ctrlSetFade ([0.6, 0] select GVAR(enableIdentityTabs));
|
||||||
|
_ctrl ctrlCommit 0;
|
||||||
|
} forEach [
|
||||||
|
IDC_buttonFace,
|
||||||
|
IDC_buttonVoice,
|
||||||
|
IDC_buttonInsigna
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
//--------------- Prepare the left panel
|
//--------------- Prepare the left panel
|
||||||
@ -282,7 +295,7 @@ GVAR(rightTabLnBFocus) = false;
|
|||||||
private _panel = _display displayCtrl _x;
|
private _panel = _display displayCtrl _x;
|
||||||
_panel ctrlSetFontHeight (GVAR(fontHeight) * GRID_H);
|
_panel ctrlSetFontHeight (GVAR(fontHeight) * GRID_H);
|
||||||
_panel ctrlCommit 0;
|
_panel ctrlCommit 0;
|
||||||
} foreach [IDC_leftTabContent, IDC_rightTabContent, IDC_rightTabContentListnBox];
|
} forEach [IDC_leftTabContent, IDC_rightTabContent, IDC_rightTabContentListnBox];
|
||||||
|
|
||||||
[_display, _display displayCtrl IDC_buttonPrimaryWeapon] call FUNC(fillLeftPanel);
|
[_display, _display displayCtrl IDC_buttonPrimaryWeapon] call FUNC(fillLeftPanel);
|
||||||
|
|
||||||
|
@ -85,10 +85,32 @@ if !(_loadoutsDisplay isEqualTo displayNull) then {
|
|||||||
case (_keyPressed == DIK_BACKSPACE): {
|
case (_keyPressed == DIK_BACKSPACE): {
|
||||||
[_display] call FUNC(buttonHide);
|
[_display] call FUNC(buttonHide);
|
||||||
};
|
};
|
||||||
// Export button
|
// Export button / export classname
|
||||||
case (_keyPressed == DIK_C && {_ctrlState}): {
|
case (_keyPressed == DIK_C && {_ctrlState}): {
|
||||||
|
if (GVAR(leftTabFocus) || {GVAR(rightTabFocus)} || {GVAR(rightTabLnBFocus)}) then {
|
||||||
|
switch true do {
|
||||||
|
case (GVAR(leftTabFocus)): {
|
||||||
|
private _control = (_display displayCtrl IDC_leftTabContent);
|
||||||
|
_control lbData (lbCurSel _control)
|
||||||
|
};
|
||||||
|
case (GVAR(rightTabFocus)): {
|
||||||
|
private _control = (_display displayCtrl IDC_rightTabContent);
|
||||||
|
_control lbData (lbCurSel _control)
|
||||||
|
};
|
||||||
|
case (GVAR(rightTabLnBFocus)): {
|
||||||
|
private _control = (_display displayCtrl IDC_rightTabContentListnBox);
|
||||||
|
_control lnbData [(lnbCurSelRow _control), 0]
|
||||||
|
};
|
||||||
|
} params ["_className"];
|
||||||
|
|
||||||
|
"ace_clipboard" callExtension (_className + ";");
|
||||||
|
"ace_clipboard" callExtension "--COMPLETE--";
|
||||||
|
|
||||||
|
[_display, localize LSTRING(exportedClassnameText)] call FUNC(message);
|
||||||
|
} else {
|
||||||
[_display] call FUNC(buttonExport);
|
[_display] call FUNC(buttonExport);
|
||||||
};
|
};
|
||||||
|
};
|
||||||
// Import button
|
// Import button
|
||||||
case (_keyPressed == DIK_V && {_ctrlState}): {
|
case (_keyPressed == DIK_V && {_ctrlState}): {
|
||||||
[_display] call FUNC(buttonImport);
|
[_display] call FUNC(buttonImport);
|
||||||
@ -124,6 +146,18 @@ if !(_loadoutsDisplay isEqualTo displayNull) then {
|
|||||||
|
|
||||||
playsound ["RscDisplayCurator_visionMode",true];
|
playsound ["RscDisplayCurator_visionMode",true];
|
||||||
};
|
};
|
||||||
|
// Panel up down
|
||||||
|
case (_keyPressed in [DIK_UP, DIK_DOWN]): {
|
||||||
|
if (GVAR(leftTabFocus) || {GVAR(rightTabFocus)} || {GVAR(rightTabLnBFocus)}) then {
|
||||||
|
_return = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
// Right panel lnb + and - buttons
|
||||||
|
case (_keyPressed in [DIK_LEFT, DIK_RIGHT]): {
|
||||||
|
if (GVAR(rightTabLnBFocus)) then {
|
||||||
|
[_display, [1, 0] select (_keyPressed == DIK_LEFT)] call FUNC(buttonCargo);
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
switch true do {
|
switch true do {
|
||||||
@ -167,22 +201,6 @@ if !(_loadoutsDisplay isEqualTo displayNull) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (GVAR(leftTabFocus) && {_keyPressed in [DIK_UP, DIK_DOWN]}) then {
|
|
||||||
_return = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (GVAR(rightTabFocus) && {_keyPressed in [DIK_UP, DIK_DOWN]}) then {
|
|
||||||
_return = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (GVAR(rightTabLnBFocus) && {_keyPressed in [DIK_UP, DIK_DOWN]}) then {
|
|
||||||
_return = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (GVAR(rightTabLnBFocus) && {_keyPressed in [DIK_LEFT, DIK_RIGHT]}) then {
|
|
||||||
[_display, [1, 0] select (_keyPressed == DIK_LEFT)] call FUNC(buttonCargo);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_return
|
_return
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
#include "..\defines.hpp"
|
#include "..\defines.hpp"
|
||||||
|
|
||||||
|
if (GVAR(centerNotPlayer)) exitWith {};
|
||||||
|
|
||||||
private _nextAction = switch (GVAR(currentLeftPanel)) do {
|
private _nextAction = switch (GVAR(currentLeftPanel)) do {
|
||||||
|
|
||||||
|
@ -682,5 +682,17 @@
|
|||||||
<Chinese>匯入當前/預設的裝備</Chinese>
|
<Chinese>匯入當前/預設的裝備</Chinese>
|
||||||
<Chinesesimp>汇入当前/预设的装备</Chinesesimp>
|
<Chinesesimp>汇入当前/预设的装备</Chinesesimp>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_enableIdentityTabsSettings">
|
||||||
|
<English>Enable the faces / voices / insignias tabs</English>
|
||||||
|
<French>Activer les onglets faces / voix / insignes</French>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_buttonClearContainerTooltip">
|
||||||
|
<English>Empty the selected container</English>
|
||||||
|
<French>Vider le conteneur selectionné</French>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_exportedClassnameText">
|
||||||
|
<English>Exported class name to clipboard</English>
|
||||||
|
<French>Nom de classe exporté dans le presse papier</French>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -717,6 +717,7 @@ class GVAR(display) {
|
|||||||
class buttonRemoveAll: ctrlButtonPicture {
|
class buttonRemoveAll: ctrlButtonPicture {
|
||||||
idc = IDC_buttonRemoveAll;
|
idc = IDC_buttonRemoveAll;
|
||||||
text = QPATHTOF(data\iconClearContainer.paa);
|
text = QPATHTOF(data\iconClearContainer.paa);
|
||||||
|
tooltip = CSTRING(buttonClearContainerTooltip);
|
||||||
colorBackground[]={0,0,0,0.5};
|
colorBackground[]={0,0,0,0.5};
|
||||||
onButtonClick = QUOTE(ctrlParent (_this select 0) call FUNC(buttonClearAll));
|
onButtonClick = QUOTE(ctrlParent (_this select 0) call FUNC(buttonClearAll));
|
||||||
fade=1;
|
fade=1;
|
||||||
|
@ -271,6 +271,17 @@ class Display3DEN {
|
|||||||
class ContextMenu :ctrlMenu {
|
class ContextMenu :ctrlMenu {
|
||||||
class Items {
|
class Items {
|
||||||
class Arsenal {
|
class Arsenal {
|
||||||
|
items[]= {"aceArsenal", "virtualArsenal"};
|
||||||
|
};
|
||||||
|
class virtualArsenal {
|
||||||
|
text = "BI Virtual Arsenal";
|
||||||
|
action= QUOTE(['arsenal'] call bis_fnc_3DENEntityMenu);
|
||||||
|
value=0;
|
||||||
|
data="Arsenal";
|
||||||
|
opensNewWindow=1;
|
||||||
|
};
|
||||||
|
class aceArsenal: virtualArsenal {
|
||||||
|
text = "ACE Arsenal";
|
||||||
action= QUOTE(call FUNC(open3DEN));
|
action= QUOTE(call FUNC(open3DEN));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -24,4 +24,9 @@ class CfgFactionClasses {
|
|||||||
priority = 2;
|
priority = 2;
|
||||||
side = 7;
|
side = 7;
|
||||||
};
|
};
|
||||||
|
class GVAR(Arsenal) {
|
||||||
|
displayName = "ACE Arsenal";
|
||||||
|
priority = 2;
|
||||||
|
side = 7;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -266,6 +266,18 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(ModuleRemoveArsenal_DisplayName);
|
displayName = CSTRING(ModuleRemoveArsenal_DisplayName);
|
||||||
function = QFUNC(moduleRemoveArsenal);
|
function = QFUNC(moduleRemoveArsenal);
|
||||||
};
|
};
|
||||||
|
class GVAR(AddFullAceArsenal): GVAR(moduleBase) {
|
||||||
|
curatorCanAttach = 1;
|
||||||
|
category = QGVAR(Arsenal);
|
||||||
|
displayName = CSTRING(ModuleAddFullACEArsenal_DisplayName);
|
||||||
|
function = QFUNC(moduleAddAceArsenal);
|
||||||
|
};
|
||||||
|
class GVAR(RemoveFullAceArsenal): GVAR(moduleBase) {
|
||||||
|
curatorCanAttach = 1;
|
||||||
|
category = QGVAR(Arsenal);
|
||||||
|
displayName = CSTRING(ModuleRemoveACEArsenal_DisplayName);
|
||||||
|
function = QFUNC(moduleRemoveAceArsenal);
|
||||||
|
};
|
||||||
class ModuleArsenal_F: Module_F {
|
class ModuleArsenal_F: Module_F {
|
||||||
function=QFUNC(bi_moduleArsenal);
|
function=QFUNC(bi_moduleArsenal);
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,7 @@ PREP(bi_moduleRemoteControl);
|
|||||||
PREP(getModuleDestination);
|
PREP(getModuleDestination);
|
||||||
PREP(handleZeusUnitAssigned);
|
PREP(handleZeusUnitAssigned);
|
||||||
PREP(moduleAddArsenal);
|
PREP(moduleAddArsenal);
|
||||||
|
PREP(moduleAddAceArsenal);
|
||||||
PREP(moduleAddSpareTrack);
|
PREP(moduleAddSpareTrack);
|
||||||
PREP(moduleAddSpareWheel);
|
PREP(moduleAddSpareWheel);
|
||||||
PREP(moduleAddOrRemoveFRIES);
|
PREP(moduleAddOrRemoveFRIES);
|
||||||
@ -18,6 +19,7 @@ PREP(moduleGlobalSetSkill);
|
|||||||
PREP(moduleGroupSide);
|
PREP(moduleGroupSide);
|
||||||
PREP(moduleLoadIntoCargo);
|
PREP(moduleLoadIntoCargo);
|
||||||
PREP(moduleRemoveArsenal);
|
PREP(moduleRemoveArsenal);
|
||||||
|
PREP(moduleRemoveAceArsenal);
|
||||||
PREP(moduleSearchNearby);
|
PREP(moduleSearchNearby);
|
||||||
PREP(moduleSetMedic);
|
PREP(moduleSetMedic);
|
||||||
PREP(moduleSetMedicalVehicle);
|
PREP(moduleSetMedicalVehicle);
|
||||||
|
@ -22,6 +22,8 @@ class CfgPatches {
|
|||||||
QGVAR(moduleSuppressiveFire),
|
QGVAR(moduleSuppressiveFire),
|
||||||
QGVAR(AddFullArsenal),
|
QGVAR(AddFullArsenal),
|
||||||
QGVAR(RemoveFullArsenal),
|
QGVAR(RemoveFullArsenal),
|
||||||
|
QGVAR(AddFullAceArsenal),
|
||||||
|
QGVAR(RemoveFullAceArsenal),
|
||||||
QGVAR(moduleTeleportPlayers)
|
QGVAR(moduleTeleportPlayers)
|
||||||
};
|
};
|
||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
@ -69,6 +71,12 @@ class CfgPatches {
|
|||||||
QGVAR(moduleConfigurePylons)
|
QGVAR(moduleConfigurePylons)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
class GVAR(arsenal): ADDON {
|
||||||
|
units[] = {
|
||||||
|
QGVAR(AddFullAceArsenal),
|
||||||
|
QGVAR(RemoveFullAceArsenal)
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_Curator {
|
class ACE_Curator {
|
||||||
@ -78,6 +86,7 @@ class ACE_Curator {
|
|||||||
GVAR(cargoAndRepair)[] = {"ace_cargo", "ace_repair"};
|
GVAR(cargoAndRepair)[] = {"ace_cargo", "ace_repair"};
|
||||||
GVAR(fastroping) = "ace_fastroping";
|
GVAR(fastroping) = "ace_fastroping";
|
||||||
GVAR(pylons) = "ace_pylons";
|
GVAR(pylons) = "ace_pylons";
|
||||||
|
GVAR(arsenal) = "ace_arsenal";
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CfgFactionClasses.hpp"
|
#include "CfgFactionClasses.hpp"
|
||||||
|
36
addons/zeus/functions/fnc_moduleAddAceArsenal.sqf
Normal file
36
addons/zeus/functions/fnc_moduleAddAceArsenal.sqf
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Author: alganthe
|
||||||
|
* Add a full ACE Arsenal to an object
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: The module logic <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params ["_logic"];
|
||||||
|
if (!local _logic) exitWith {};
|
||||||
|
|
||||||
|
private _object = attachedTo _logic;
|
||||||
|
TRACE_3("moduleAddArsenal",_logic,_object,typeOf _object);
|
||||||
|
|
||||||
|
switch (true) do {
|
||||||
|
case (isNull _object): {
|
||||||
|
[LSTRING(NothingSelected)] call FUNC(showMessage);
|
||||||
|
};
|
||||||
|
case (isPlayer _object): {
|
||||||
|
["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call FUNC(showMessage);
|
||||||
|
};
|
||||||
|
case (!alive _object): {
|
||||||
|
[LSTRING(OnlyAlive)] call FUNC(showMessage);
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
[_object, true, true] call EFUNC(arsenal,initBox);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
deleteVehicle _logic;
|
@ -29,16 +29,10 @@ switch (true) do {
|
|||||||
[LSTRING(OnlyAlive)] call FUNC(showMessage);
|
[LSTRING(OnlyAlive)] call FUNC(showMessage);
|
||||||
};
|
};
|
||||||
default {
|
default {
|
||||||
if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then {
|
|
||||||
|
|
||||||
[_object, true, true] call EFUNC(arsenal,initBox);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
TRACE_1("BIS_fnc_arsenal: AmmoboxInit",_object);
|
TRACE_1("BIS_fnc_arsenal: AmmoboxInit",_object);
|
||||||
// Global Effects: "Action to access the Arsenal will be added automatically on all clients."
|
// Global Effects: "Action to access the Arsenal will be added automatically on all clients."
|
||||||
["AmmoboxInit", [_object, true]] call BIS_fnc_arsenal;
|
["AmmoboxInit", [_object, true]] call BIS_fnc_arsenal;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
|
37
addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf
Normal file
37
addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Author: alganthe
|
||||||
|
* Remove ACE Arsenal from an object
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: The module logic <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params ["_logic"];
|
||||||
|
if (!local _logic) exitWith {};
|
||||||
|
|
||||||
|
private _object = attachedTo _logic;
|
||||||
|
TRACE_3("moduleRemoveArsenal",_logic,_object,typeOf _object);
|
||||||
|
|
||||||
|
switch (true) do {
|
||||||
|
case (isNull _object): {
|
||||||
|
[LSTRING(NothingSelected)] call FUNC(showMessage);
|
||||||
|
};
|
||||||
|
case (isPlayer _object): {
|
||||||
|
["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call FUNC(showMessage);
|
||||||
|
};
|
||||||
|
case (!alive _object): {
|
||||||
|
[LSTRING(OnlyAlive)] call FUNC(showMessage);
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
[_object, true, true] call EFUNC(arsenal,removeBox);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
deleteVehicle _logic;
|
@ -31,18 +31,12 @@ switch (true) do {
|
|||||||
};
|
};
|
||||||
default {
|
default {
|
||||||
|
|
||||||
if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then {
|
TRACE_1("Calling removeVirtualXXXCargo functions", _object);
|
||||||
|
|
||||||
[_object, true, true] call EFUNC(arsenal,removeBox);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
TRACE_1("Calling removeVirtualXXXCargo functions",_object);
|
|
||||||
[_object, (_object call BIS_fnc_getVirtualItemCargo), true] call BIS_fnc_removeVirtualItemCargo;
|
[_object, (_object call BIS_fnc_getVirtualItemCargo), true] call BIS_fnc_removeVirtualItemCargo;
|
||||||
[_object, (_object call BIS_fnc_getVirtualWeaponCargo), true] call BIS_fnc_removeVirtualWeaponCargo;
|
[_object, (_object call BIS_fnc_getVirtualWeaponCargo), true] call BIS_fnc_removeVirtualWeaponCargo;
|
||||||
[_object, (_object call BIS_fnc_getVirtualMagazineCargo), true] call BIS_fnc_removeVirtualMagazineCargo;
|
[_object, (_object call BIS_fnc_getVirtualMagazineCargo), true] call BIS_fnc_removeVirtualMagazineCargo;
|
||||||
[_object, (_object call BIS_fnc_getVirtualBackpackCargo), true] call BIS_fnc_removeVirtualBackpackCargo;
|
[_object, (_object call BIS_fnc_getVirtualBackpackCargo), true] call BIS_fnc_removeVirtualBackpackCargo;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
|
@ -1238,5 +1238,11 @@
|
|||||||
<Chinesesimp>解除驻军驻守状态</Chinesesimp>
|
<Chinesesimp>解除驻军驻守状态</Chinesesimp>
|
||||||
<Korean>주둔해제</Korean>
|
<Korean>주둔해제</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Zeus_ModuleAddFullACEArsenal_DisplayName">
|
||||||
|
<English>Add full ACE Arsenal</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Zeus_ModuleRemoveACEArsenal_DisplayName">
|
||||||
|
<English>Remove ACE Arsenal</English>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user