mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Dogtags - Rename inventory items via CBA (#10130)
* Dogtags - Rename inventory items via CBA * Update addons/dogtags/XEH_postInit.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
parent
56eae4060c
commit
a6ab050a07
@ -3,6 +3,18 @@
|
||||
if (hasInterface || isServer) then {
|
||||
[QGVAR(broadcastDogtagInfo), {
|
||||
GVAR(dogtagsData) set _this;
|
||||
|
||||
if (isNil "CBA_fnc_renameInventoryItem") exitWith {}; // requires https://github.com/CBATeam/CBA_A3/pull/1329
|
||||
params ["_item", "_dogTagData"];
|
||||
private _name = _dogtagData param [0, ""];
|
||||
|
||||
// If data doesn't exist or body has no name, set name as "unknown"
|
||||
if (_name == "") then {
|
||||
_name = LELSTRING(common,unknown);
|
||||
};
|
||||
|
||||
_name = [LLSTRING(itemName), ": ", _name] joinString "";
|
||||
[_item, _name] call CBA_fnc_renameInventoryItem;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (isServer) then {
|
||||
|
Loading…
Reference in New Issue
Block a user