Dogtags - Drop dogtag on ground if unit doesn't have inventory space (#10094)

* Drop dogtag on ground if unit doesn't have inventory space

* Only allow taking of dogtags if unit has space
This commit is contained in:
johnb432 2024-07-02 11:16:27 +02:00 committed by GitHub
parent 71afce53c1
commit ba47c12a97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -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];

View File

@ -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