skip removing clan tag if spray painted (#9285)

This commit is contained in:
Grim 2023-07-24 02:23:13 +03:00 committed by GitHub
parent dbe372cb48
commit e9cde7268f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,11 @@ params ["_vehicle"];
private _selectionClan = getText (configOf _vehicle >> "selectionClan");
if !(_selectionClan in selectionNames _vehicle) exitWith {
TRACE_2("vehicle does not have 'selectionClan' selection",_vehicle,_selectionLogo);
TRACE_2("vehicle does not have 'selectionClan' selection",_vehicle,_selectionClan);
};
if (_vehicle getVariable [QEGVAR(tagging,hasTag), false]) exitWith {
TRACE_1("vehicle has tag applied",_vehicle);
};
TRACE_1("replacing clan logo with empty texture",_vehicle);

View File

@ -32,6 +32,7 @@ if (_texture == "") exitWith {
if (_isVehicleTag) exitWith {
TRACE_3("tagging vehicle",_object,typeOf _object,_texture);
_object setObjectTextureGlobal [getText (configOf _object >> "selectionClan"), _texture];
_object setVariable [QGVAR(hasTag), true, true];
// if (_material != "") then { _object setObjectMaterialGlobal ["clan", _material] }; // ??
["ace_tagCreated", [objNull, _texture, _object, _unit]] call CBA_fnc_globalEvent;
};