Misc arsenal fixes (#6083)

* Change backpack and scope checks in scanConfig and addVirtualItems

Reason: was not a good implementation
Might cause issue of people compalining about tents.

* Give IDC to menuBar controls, disable import button in MP

Reason: copyFromClipboard is disabled in MP

* Add tooltip strings for the loadouts, export, import menu buttons

* Remove double space in onArsenalOpen
This commit is contained in:
Josuan Albin 2018-01-28 22:39:46 +01:00 committed by PabstMirror
parent cc503e041b
commit 29a0b2ef09
6 changed files with 38 additions and 12 deletions

View File

@ -23,6 +23,10 @@
#define IDC_message 9 #define IDC_message 9
#define IDC_menuBar 10 #define IDC_menuBar 10
#define IDC_menuBarClose 1001 #define IDC_menuBarClose 1001
#define IDC_buttonHide 1002
#define IDC_buttonLoadouts 1003
#define IDC_buttonExport 1004
#define IDC_buttonImport 1005
#define IDC_infoBox 11 #define IDC_infoBox 11
#define IDC_infoBackground 1101 #define IDC_infoBackground 1101
#define IDC_infoName 1102 #define IDC_infoName 1102

View File

@ -210,7 +210,7 @@ if (_items isEqualType true) then {
}; };
}; };
case (isClass (configFile >> "CfgVehicles" >> _x)): { case (isClass (configFile >> "CfgVehicles" >> _x)): {
if (getText (configFile >> "CfgVehicles" >> _x >> "vehicleClass") == "Backpacks") then { if (getNumber (configFile >> "CfgVehicles" >> _x >> "isBackpack") == 1) then {
(_cargo select 6) pushBackUnique _x; (_cargo select 6) pushBackUnique _x;
}; };
}; };

View File

@ -199,6 +199,13 @@ _mouseBlockCtrl ctrlEnable false;
IDC_rightSearchbar IDC_rightSearchbar
]; ];
if (isMultiplayer) then {
private _importButtonCtrl = _display displayCtrl IDC_buttonImport;
_importButtonCtrl ctrlEnable false;
_importButtonCtrl ctrlSetFade 0.6;
_importButtonCtrl ctrlCommit 0;
};
//--------------- Camera prep //--------------- Camera prep
cutText ["","plain"]; cutText ["","plain"];
showCommandingMenu ""; showCommandingMenu "";

View File

@ -166,17 +166,17 @@ private _putList = [];
[_magazineGroups, _x, _entry] call CBA_fnc_hashSet; [_magazineGroups, _x, _entry] call CBA_fnc_hashSet;
} forEach getArray (_x >> "magazineGroup") } forEach getArray (_x >> "magazineGroup")
}; };
} foreach configProperties [(configFile >> "CfgMagazines"), "isClass _x && {getNumber (_x >> 'scope') == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; } foreach configProperties [(configFile >> "CfgMagazines"), "isClass _x && {(if (isNumber (_x >> 'scopeArsenal')) then {getNumber (_x >> 'scopeArsenal')} else {getNumber (_x >> 'scope')}) == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true];
{ {
if (getText (_x >> "vehicleClass") == "Backpacks") then { if (getNumber (_x >> "isBackpack") == 1) then {
(_cargo select 6) pushBackUnique (configName _x); (_cargo select 6) pushBackUnique (configName _x);
}; };
} foreach configProperties [(configFile >> "CfgVehicles"), "isClass _x && {getNumber (_x >> 'scope') == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; } foreach configProperties [(configFile >> "CfgVehicles"), "isClass _x && {(if (isNumber (_x >> 'scopeArsenal')) then {getNumber (_x >> 'scopeArsenal')} else {getNumber (_x >> 'scope')}) == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true];
{ {
(_cargo select 7) pushBackUnique (configName _x); (_cargo select 7) pushBackUnique (configName _x);
} foreach configProperties [(configFile >> "CfgGlasses"), "isClass _x && {getNumber (_x >> 'scope') == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; } foreach configProperties [(configFile >> "CfgGlasses"), "isClass _x && {(if (isNumber (_x >> 'scopeArsenal')) then {getNumber (_x >> 'scopeArsenal')} else {getNumber (_x >> 'scope')}) == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true];
uiNamespace setVariable [QGVAR(configItems), _cargo]; uiNamespace setVariable [QGVAR(configItems), _cargo];
uiNamespace setVariable [QGVAR(magazineGroups), _magazineGroups]; uiNamespace setVariable [QGVAR(magazineGroups), _magazineGroups];

View File

@ -434,17 +434,17 @@
<Italian>Impossibile aprire l'arsenale ACE</Italian> <Italian>Impossibile aprire l'arsenale ACE</Italian>
<Japanese>ACE 武器庫を開けません</Japanese> <Japanese>ACE 武器庫を開けません</Japanese>
</Key> </Key>
<Key ID= "STR_ACE_Arsenal_portLoadoutsText"> <Key ID="STR_ACE_Arsenal_portLoadoutsText">
<English>Import BI VA loadouts to ACE Arsenal</English> <English>Import BI VA loadouts to ACE Arsenal</English>
<French>Importe les loadouts de BI VA dans ACE Arsenal</French> <French>Importe les loadouts de BI VA dans ACE Arsenal</French>
<Japanese>標準の VA 装備から ACE 武器庫へ取り込み</Japanese> <Japanese>標準の VA 装備から ACE 武器庫へ取り込み</Japanese>
</Key> </Key>
<Key ID= "STR_ACE_Arsenal_portLoadoutsPlayerError"> <Key ID="STR_ACE_Arsenal_portLoadoutsPlayerError">
<English>No player unit available! Place a unit and mark it as "Player".</English> <English>No player unit available! Place a unit and mark it as "Player".</English>
<French>Aucune unité joueur disponible ! Placez une unité et marquez la en tant que "joueur".</French> <French>Aucune unité joueur disponible ! Placez une unité et marquez la en tant que "joueur".</French>
<Japanese>プレイヤー ユニットがありません!ユニットを設置しそれを"Player"と名付けてください。</Japanese> <Japanese>プレイヤー ユニットがありません!ユニットを設置しそれを"Player"と名付けてください。</Japanese>
</Key> </Key>
<Key ID= "STR_ACE_Arsenal_portLoadoutsLoadoutError"> <Key ID="STR_ACE_Arsenal_portLoadoutsLoadoutError">
<English>No loadouts to import.</English> <English>No loadouts to import.</English>
<French>Aucun loadout à importer.</French> <French>Aucun loadout à importer.</French>
<Japanese>取り込みする装備がありません。</Japanese> <Japanese>取り込みする装備がありません。</Japanese>
@ -469,5 +469,17 @@
<German>Probiere verschiedene Waffen und Ausrüstung aus und stelle dir eigene Ausrüstungsprofile zusammen.</German> <German>Probiere verschiedene Waffen und Ausrüstung aus und stelle dir eigene Ausrüstungsprofile zusammen.</German>
<Japanese>さまざまな武器と装備を試して、あなただけの装備を作成してください。</Japanese> <Japanese>さまざまな武器と装備を試して、あなただけの装備を作成してください。</Japanese>
</Key> </Key>
<Key ID="STR_ACE_Arsenal_buttonLoadoutsTooltip">
<English>Open the loadouts screen</English>
<French>Affiche la page des équipements</French>
</Key>
<Key ID="STR_ACE_Arsenal_buttonExportTooltip">
<English>Export current / default loadouts</English>
<French>Exporte l'équipement actuel ou la liste d'équipements de base</French>
</Key>
<Key ID="STR_ACE_Arsenal_buttonImportTooltip">
<English>Import current / default loadouts</English>
<French>Importer l'équipement actuel ou la liste d'équipements de base</French>
</Key>
</Package> </Package>
</Project> </Project>

View File

@ -167,7 +167,7 @@ class GVAR(display) {
h = QUOTE(7 * GRID_H); h = QUOTE(7 * GRID_H);
class controls { class controls {
class buttonHide: ctrlButton { class buttonHide: ctrlButton {
idc = -1; idc = IDC_buttonHide;
colorBackground[] = {0,0,0,0.8}; colorBackground[] = {0,0,0,0.8};
x = QUOTE(1 * WIDTH_GAP + 0 * WIDTH_SINGLE); x = QUOTE(1 * WIDTH_GAP + 0 * WIDTH_SINGLE);
y = QUOTE(0); y = QUOTE(0);
@ -180,21 +180,24 @@ class GVAR(display) {
onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonHide)); onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonHide));
}; };
class buttonLoadouts: buttonHide { class buttonLoadouts: buttonHide {
idc = -1; idc = IDC_buttonLoadouts;
x = QUOTE(2 * WIDTH_GAP + 1 * WIDTH_SINGLE); x = QUOTE(2 * WIDTH_GAP + 1 * WIDTH_SINGLE);
text = CSTRING(buttonLoadoutsText); text = CSTRING(buttonLoadoutsText);
tooltip = CSTRING(buttonLoadoutsTooltip);
onButtonClick = QUOTE(createDialog QQGVAR(loadoutsDisplay)); onButtonClick = QUOTE(createDialog QQGVAR(loadoutsDisplay));
}; };
class buttonExport: buttonHide { class buttonExport: buttonHide {
idc = -1; idc = IDC_buttonExport;
x = QUOTE(3 * WIDTH_GAP + 2 * WIDTH_SINGLE); x = QUOTE(3 * WIDTH_GAP + 2 * WIDTH_SINGLE);
text = CSTRING(buttonExportText); text = CSTRING(buttonExportText);
tooltip = CSTRING(buttonExportTooltip);
onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonExport)); onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonExport));
}; };
class buttonImport: buttonHide { class buttonImport: buttonHide {
idc = -1; idc = IDC_buttonImport;
x = QUOTE(4 * WIDTH_GAP + 3 * WIDTH_SINGLE); x = QUOTE(4 * WIDTH_GAP + 3 * WIDTH_SINGLE);
text = CSTRING(buttonImportText); text = CSTRING(buttonImportText);
tooltip = CSTRING(buttonImportTooltip);
onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonImport)); onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonImport));
}; };
class buttonClose: ctrlButtonOK { class buttonClose: ctrlButtonOK {