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

Medical - Show "Inventory" action on unconscious units #8083

Merged
merged 3 commits into from
Mar 3, 2021
Merged
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
16 changes: 16 additions & 0 deletions addons/medical_status/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,20 @@ PREP_RECOMPILE_END;

addMissionEventHandler ["EntityKilled", {_this call FUNC(handleKilledMission)}];

if (hasInterface) {
//Add Inventory action to uncon units
["CAManBase", "init", {
params ["_unit"];

private _id = _unit addAction ["", {
params ["_target", "_caller", "_actionId", "_arguments"];

_caller action ["Gear", _target];
}, nil, 5.1, true, true, "gear", "_target getVariable ['ACE_isUnconscious',false] && {alive _target}", 3.5];

_unit setUserActionText [_id, localize "STR_ACTION_GEAR", "<img image='\A3\ui_f\data\igui\cfg\actions\gear_ca.paa' size='2.5' shadow=2 />"];

}, nil, nil, true] call CBA_fnc_addClassEventHandler;
};

ADDON = true;