Tagging - Fix tagModel not being utilized for custom tags (#9366)

fix tagModel
This commit is contained in:
Grim 2023-09-06 12:20:04 -04:00 committed by GitHub
parent 576e6b7d55
commit f75d237d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@
* Public: No
*/
params ["_class", "_displayName", "_requiredItem", "_textures", "_icon", "_materials"];
params ["_class", "_displayName", "_requiredItem", "_textures", "_icon", "_materials", "_tagModel"];
private _actions = GVAR(itemActions) getOrDefault [_requiredItem, []];
@ -24,7 +24,7 @@ _actions pushBack ([
_displayName,
_icon,
{
(_this select 2) params ["_class", "_textures", "_materials"];
(_this select 2) params ["_class", "_textures", "_materials", "_tagModel"];
(
if (count _textures == count _materials) then {
@ -35,12 +35,12 @@ _actions pushBack ([
}
) params ["_randomTexture", "_randomMaterial"];
[_player, _randomTexture, _randomMaterial] call FUNC(tag);
[_player, _randomTexture, _randomMaterial, _tagModel] call FUNC(tag);
_player setVariable [QGVAR(lastUsedTag), _class];
},
{true}, // required item is checked at an upper level
{},
[_class, _textures, _materials]
[_class, _textures, _materials, _tagModel]
] call EFUNC(interact_menu,createAction));
GVAR(itemActions) set [_requiredItem, _actions];