Tagging - For lastUsed use random if not used yet (#5687)

This commit is contained in:
PabstMirror 2017-10-31 12:13:55 -05:00 committed by GitHub
parent 25344deb80
commit ba97bb20fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -22,19 +22,22 @@ if (GVAR(quickTag) == 0) exitWith {};
params ["_unit"];
private _possibleTags = [];
private _useRandom = false;
// Last Used
if (GVAR(quickTag) == 1) then {
private _lastUsedTagClass = _unit getVariable [QGVAR(lastUsedTag), nil];
if (!isNil "_lastUsedTagClass") then {
if (isNil "_lastUsedTagClass") then {
_useRandom = true;
} else {
private _lastUsedTag = GVAR(cachedTags) select {(_x select 0) == _lastUsedTagClass};
_possibleTags = _lastUsedTag;
};
};
// Random X
if (GVAR(quickTag == 2)) then {
if ((GVAR(quickTag) == 2) || _useRandom) then {
private _xTags = GVAR(cachedTags) select {(_x select 0) in ["ACE_XBlack", "ACE_XRed", "ACE_XGreen", "ACE_XBlue"]};
_possibleTags = _xTags;
};

View File

@ -26,7 +26,7 @@
<Chinese>定義噴漆系統預設設定</Chinese>
</Key>
<Key ID="STR_ACE_Tagging_QuickTag">
<English>Quick Tag</English>
<English>Spray Paint - Quick Tag</English>
<Russian>Быстрый маркер</Russian>
<Japanese>クイック タグ</Japanese>
<Polish>Szybkie tagowanie</Polish>