mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Add Ability to Transfer a Loadout from Saved to Default (#6793)
* Added weight override parameter to ace_dragging_fnc_setCarryable/setDraggable - Additional optional parameter that ignores the `startCarry`/`startDrag` weight checks. - Minor `==` to `isEqualto` replacements * `count crew _target isEqualto -1` to `count crew _target isEqualto 0` * Tab Replacement - remove \t * Reverted UAV check, Params formatting, Lazy Eval * Update addons/dragging/functions/fnc_startCarry.sqf Co-Authored-By: PiZZAD0X <509thparachuteinfantry@gmail.com> * Update fnc_startDrag.sqf * Remove beta suggestion extra line additions * Update addons/dragging/functions/fnc_startDrag.sqf Co-Authored-By: PiZZAD0X <509thparachuteinfantry@gmail.com> * Added ability to export loadout to defaultloadouts Shift + LMB on save button can export the selected saved loadout to the mission loadouts. Experimental Test. Warrants a separate button if there is enough demand. * Update fnc_buttonLoadoutsSave.sqf * Update addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf Co-Authored-By: PiZZAD0X <509thparachuteinfantry@gmail.com> * Add usage info to tooltip
This commit is contained in:
parent
ec840a793d
commit
9e609b3394
@ -124,7 +124,17 @@ switch (GVAR(currentLoadoutsTab)) do {
|
||||
};
|
||||
};
|
||||
|
||||
if (_loadoutIndex == -1) then {
|
||||
if (GVAR(shiftState) && {is3DEN} && {!(_loadoutName isEqualTo "")} && {_cursSelRow != -1} && {!(_loadoutIndex isEqualto -1)}) exitwith {
|
||||
private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName};
|
||||
if (_defaultLoadoutsSearch isEqualto -1) then {
|
||||
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout];
|
||||
} else {
|
||||
GVAR(defaultLoadoutsList) set [_defaultLoadoutsSearch , [ _loadoutName, _curSelLoadout]];
|
||||
};
|
||||
set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]];
|
||||
};
|
||||
|
||||
if (_loadoutIndex isEqualto -1) then {
|
||||
_data pushBack [_editBoxContent, _loadout];
|
||||
} else {
|
||||
_data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||
|
@ -48,6 +48,7 @@ switch (ctrlIDC _control) do {
|
||||
case IDC_buttonMyLoadouts: {
|
||||
_centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabMyLoadoutsText));
|
||||
|
||||
if (is3den) then { _saveButtonCtrl ctrlSetTooltip format ["%1\n%2", localize LSTRING(buttonSaveTooltip), localize LSTRING(buttonSaveTooltip_shiftClick)]; };
|
||||
_saveButtonCtrl ctrlEnable true;
|
||||
_saveButtonCtrl ctrlCommit 0;
|
||||
};
|
||||
@ -55,6 +56,7 @@ switch (ctrlIDC _control) do {
|
||||
case IDC_buttonDefaultLoadouts: {
|
||||
_centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabDefaultLoadoutsText));
|
||||
|
||||
if (is3den) then { _saveButtonCtrl ctrlSetTooltip localize LSTRING(buttonSaveTooltip); };
|
||||
_saveButtonCtrl ctrlEnable (is3DEN);
|
||||
_saveButtonCtrl ctrlCommit 0;
|
||||
};
|
||||
@ -62,6 +64,7 @@ switch (ctrlIDC _control) do {
|
||||
case IDC_buttonSharedLoadouts: {
|
||||
_centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabSharedLoadoutsText));
|
||||
|
||||
if (is3den) then { _saveButtonCtrl ctrlSetTooltip localize LSTRING(buttonSaveTooltip); };
|
||||
_saveButtonCtrl ctrlEnable false;
|
||||
_saveButtonCtrl ctrlCommit 0;
|
||||
};
|
||||
|
@ -100,6 +100,9 @@
|
||||
<Chinese>保存當前的裝備</Chinese>
|
||||
<Chinesesimp>保存当前的装备</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonSaveTooltip_shiftClick">
|
||||
<English>[Shift+Click to save to mission defaults]</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonRenameText">
|
||||
<English>Rename</English>
|
||||
<French>Renommer</French>
|
||||
|
Loading…
Reference in New Issue
Block a user