From b864cde7344c4d63cd0247cd94a73745ff529312 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sat, 29 Jun 2024 10:29:01 +0200 Subject: [PATCH 1/2] Drop dogtag on ground if unit doesn't have inventory space --- addons/dogtags/functions/fnc_addDogtagItem.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/dogtags/functions/fnc_addDogtagItem.sqf b/addons/dogtags/functions/fnc_addDogtagItem.sqf index 970bb1926e0..803c54d82ff 100644 --- a/addons/dogtags/functions/fnc_addDogtagItem.sqf +++ b/addons/dogtags/functions/fnc_addDogtagItem.sqf @@ -20,7 +20,8 @@ params ["_item", "_dogtagData"]; if (_item == "") exitWith {}; -[ace_player, _item] call CBA_fnc_addItem; +// Verify that the unit has inventory space, otherwise drop the dogtag on the ground +[ace_player, _item, true] call CBA_fnc_addItem; _dogtagData params ["_nickName"]; private _displayText = format [localize LSTRING(takeDogtagSuccess), _nickName]; From 09c4581cde80828aff2f31f9c8f5664556029dd1 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Mon, 1 Jul 2024 10:17:06 +0200 Subject: [PATCH 2/2] Only allow taking of dogtags if unit has space --- addons/dogtags/functions/fnc_canTakeDogtag.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/dogtags/functions/fnc_canTakeDogtag.sqf b/addons/dogtags/functions/fnc_canTakeDogtag.sqf index c482d74c1c9..815aeb7a79c 100644 --- a/addons/dogtags/functions/fnc_canTakeDogtag.sqf +++ b/addons/dogtags/functions/fnc_canTakeDogtag.sqf @@ -23,4 +23,4 @@ if (isNull _target) exitWith {false}; // check if disabled for faction if ((faction _target) in GVAR(disabledFactions)) exitWith {false}; -(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]} +((!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}) && {_player canAdd ["ACE_dogtag", 1/*, true*/]} // Todo: Uncomment in 2.18