Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dogtags - Add context menu action to check dog tag #10101

Merged
merged 5 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions addons/dogtags/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,23 @@ if (["ace_arsenal"] call EFUNC(common,isModLoaded)) then {
}] call CBA_fnc_addEventHandler;
};

// Add context menu option
[
"ACE_dogtag",
["GROUND", "CARGO", "CONTAINER"],
LLSTRING(checkItem),
nil,
QPATHTOF(data\dogtag_icon_ca.paa),
[
{true},
{true}
],
{
[GVAR(dogtagsData) getOrDefault [_this select 2, []]] call FUNC(showDogtag);

false
}
] call CBA_fnc_addItemContextMenuOption;

// Disable dogtags for civilians
"CIV_F" call FUNC(disableFactionDogtags);
1 change: 0 additions & 1 deletion addons/dogtags/functions/fnc_getDogtagItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ if (GVAR(idCounter) > 999) exitWith {ERROR("Ran out of IDs");};
private _dogTagData = [_target] call FUNC(getDogTagData);
private _item = format ["ACE_dogtag_%1", GVAR(idCounter)];


[QGVAR(addDogtagItem), [_item, _dogTagData], [_player]] call CBA_fnc_targetEvent;

// Broadcast data globally, so that clients can use it where needed
Expand Down
Loading