Interaction - Check canInteractWith before taking dropped weapons (#9783)

* Interaction - Block interaction on carried ground weapon holders

* Don't check if cargo container is claimed
This commit is contained in:
PabstMirror 2024-04-01 07:11:14 -05:00 committed by GitHub
parent 0365565efc
commit 0c589c2346
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -168,7 +168,7 @@ private _action = [
// action display name will be overwritten in modifier function
QGVAR(takeWeapon), "take", "\A3\ui_f\data\igui\cfg\actions\take_ca.paa",
{_player action ["TakeWeapon", _target, weaponCargo _target select 0]},
{count weaponCargo _target == 1},
{(count weaponCargo _target == 1) && {[_player, objNull, []] call EFUNC(common,canInteractWith)}}, // Not checking if container is claimed
nil, nil, nil, nil, nil,
{
params ["_target", "", "", "_actionData"];