Skip to content

Commit 644f17b

Browse files
authored
Tagging - Use custom ace object type (#11170)
1 parent e13339f commit 644f17b

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

addons/tagging/CfgVehicles.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
class CfgVehicles {
2+
class UserTexture1m_F;
3+
class GVAR(texture1m): UserTexture1m_F {
4+
scope = 1;
5+
};
26
class ACE_Module;
37
class ACE_ModuleTagging: ACE_Module {
48
author = ECSTRING(common,ACETeam);

addons/tagging/functions/fnc_addCustomTag.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* 3: Textures Paths <ARRAY>
1111
* 4: Icon Path <STRING> (default: "")
1212
* 5: Material Paths <ARRAY> (default: [])
13-
* 6: Tag Model <STRING> (default: "UserTexture1m_F")
13+
* 6: Tag Model <STRING> (default: "ace_tagging_texture1m")
1414
* 7: Condition for the spraytag <CODE> (default: {true})
1515
*
1616
* Return Value:
@@ -29,7 +29,7 @@ params [
2929
["_textures", [], [[]]],
3030
["_icon", "", [""]],
3131
["_materials", [], [[]]],
32-
["_tagModel", "UserTexture1m_F", [""]],
32+
["_tagModel", QGVAR(texture1m), [""]],
3333
["_condition", {true}, [{}]]
3434
];
3535

addons/tagging/functions/fnc_createTag.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* 3: Object it should be tied to <OBJECT>
1111
* 4: Unit that created the tag <OBJECT>
1212
* 5: Material of the tag <STRING> (default: "")
13-
* 6: Model of the tag <STRING> (default: "UserTexture1m_F")
13+
* 6: Model of the tag <STRING> (default: "ace_tagging_texture1m")
1414
* 7: Vehicle Tag <BOOL> (default: false)
1515
*
1616
* Return Value:
@@ -22,7 +22,7 @@
2222
* Public: No
2323
*/
2424

25-
params ["_tagPosASL", "_vectorDirAndUp", "_texture", "_object", "_unit", ["_material","",[""]], ["_tagModel", "UserTexture1m_F", [""]], ["_isVehicleTag", false, [false]]];
25+
params ["_tagPosASL", "_vectorDirAndUp", "_texture", "_object", "_unit", ["_material","",[""]], ["_tagModel", QGVAR(texture1m), [""]], ["_isVehicleTag", false, [false]]];
2626
TRACE_5("createTag:",_tagPosASL,_vectorDirAndUp,_texture,_object,_unit);
2727

2828
if (_texture == "") exitWith {

addons/tagging/functions/fnc_parseConfigTag.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private _icon = getText (_cfg >> "icon");
6060

6161
private _tagModel = getText (_cfg >> "tagModel");
6262
if (_tagModel == "") then {
63-
_tagModel = "UserTexture1m_F";
63+
_tagModel = QGVAR(texture1m);
6464
};
6565

6666
private _condition = getText (_cfg >> "condition");

addons/tagging/functions/fnc_tag.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* 0: Unit <OBJECT>
88
* 1: The color of the tag (valid colors are black, red, green and blue or full path to custom texture) <STRING>
99
* 2: Material of the tag <STRING> (default: "")
10-
* 3: Tag Model <STRING> (default: "UserTexture1m_F")
10+
* 3: Tag Model <STRING> (default: "ace_tagging_texture1m")
1111
*
1212
* Return Value:
1313
* Success <BOOL>
@@ -22,7 +22,7 @@ params [
2222
["_unit", objNull, [objNull]],
2323
["_texture", "", [""]],
2424
["_material", "", [""]],
25-
["_tagModel", "UserTexture1m_F", [""]]
25+
["_tagModel", QGVAR(texture1m), [""]]
2626
];
2727

2828
if (isNull _unit || {_texture == ""}) exitWith {

docs/wiki/framework/tagging-framework.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ACE_Tags {
2929
textures[] = {"path\to\texture1.paa", "path\to\texture2.paa"}; // List of texture variations (one is randomly selected when tagging)
3030
materials[] = {"path\to\material.rvmat"}; // Optional: List of material variations (one is randomly selected). Keep empty if you don't need a custom material.
3131
icon = "path\to\icon.paa"; // Icon being displayed in the interaction menu
32-
tagModel = "UserTexture1m_F"; // Optional: The 3D Model that will be spawned with the texture on it, can either be CfgVehicles classname or P3D file path.
32+
tagModel = "ace_tagging_texture1m"; // Optional: The 3D Model that will be spawned with the texture on it, can either be CfgVehicles classname or P3D file path.
3333
condition = "true"; // Optional: Condition for the Spraytag Action. Needs to return bool.
3434
};
3535
};
@@ -50,7 +50,7 @@ class ACE_Tags {
5050
| 3 | Textures | Array | Required |
5151
| 4 | Icon | String | Optional (default: `""` - Default white point) |
5252
| 5 | Material Paths | Array | Optional (default: `[]` - No custom material) |
53-
| 6 | Tag Model | String | Optional (default: `"UserTexture1m_F"` - 1x1m texture surface) |
53+
| 6 | Tag Model | String | Optional (default: `"ace_tagging_texture1m"` - 1x1m texture surface) |
5454
| 7 | Condition | Code | Optional (default: `{true}` - always accessible) |
5555
| **R** | Successfully Added Tag | Boolean | Return value |
5656
@@ -82,7 +82,7 @@ class ACE_Tags {
8282
textures[] = {"@path\to\texture1.paa", "@path\to\texture2.paa"}; // List of texture variations (one is randomly selected when tagging)
8383
materials[] = {"@path\to\material.rvmat"}; // Optional: List of material variations (one is randomly selected). Keep empty if you don't need a custom material.
8484
icon = "@path\to\icon.paa"; // Icon being displayed in the interaction menu
85-
tagModel = "UserTexture1m_F"; // Optional: The 3D Model that will be spawned with the texture on it, can either be CfgVehicles classname or P3D file path.
85+
tagModel = "ace_tagging_texture1m"; // Optional: The 3D Model that will be spawned with the texture on it, can either be CfgVehicles classname or P3D file path.
8686
condition = "true"; // Optional: Condition for the Spraytag Action. Needs to return bool.
8787
};
8888
};

0 commit comments

Comments
 (0)