mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e2ac18a05d
* advanced_ballistics * advanced_fatigue * advanced_throwing * ai * aircraft * arsenal * atragmx * attach * backpacks * ballistics * captives * cargo * chemlights * common * concertina_wire * cookoff * dagr * disarming * disposable * dogtags * dragging * explosives * fastroping * fcs * finger * frag * gestures * gforces * goggles * grenades * gunbag * hearing * hitreactions * huntir * interact_menu * interaction * inventory * kestrel4500 * laser * laserpointer * logistics_uavbattery * logistics_wirecutter * magazinerepack * map * map_gestures * maptools * markers * medical * medical_ai * medical_blood * medical_menu * microdagr * minedetector * missileguidance * missionmodules * mk6mortar * modules * movement * nametags * nightvision * nlaw * optics * optionsmenu * overheating * overpressure * parachute * pylons * quickmount * rangecard * rearm * recoil * refuel * reload * reloadlaunchers * repair * respawn * safemode * sandbag * scopes * slideshow * spectator * spottingscope * switchunits * tacticalladder * tagging * trenches * tripod * ui * vector * vehiclelock * vehicles * viewdistance * weaponselect * weather * winddeflection * yardage450 * zeus * arsenal defines.hpp * optionals * DEBUG_MODE_FULL 1 * DEBUG_MODE_FULL 2 * Manual fixes * Add SQF Validator check for #include after block comment * explosives fnc_openTimerUI * fix uniqueItems
68 lines
2.0 KiB
Plaintext
68 lines
2.0 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: bux578
|
|
* Open the select menu with the "personal" items of a frisked unit. It only shows "handgunWeapon", "uniformItems", "vestItems", "backpackItems" and "assignedItems" because every other item is visible on the character
|
|
*
|
|
* Arguments:
|
|
* 0: player unit <OBJECT>
|
|
* 1: unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [player, bob] call ACE_captives_fnc_doFristPerson;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_player", "_unit"];
|
|
|
|
private _weapon = currentWeapon _player;
|
|
if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
|
|
[_player, "AmovPercMstpSlowWrflDnon", 0] call EFUNC(common,doAnimation);
|
|
};
|
|
|
|
private _listedItemClasses = [];
|
|
|
|
private _actions = [localize LSTRING(FriskMenuHeader), ""] call ACE_Interaction_fnc_prepareSelectMenu;
|
|
|
|
private _allGear = [];
|
|
|
|
if ((handgunWeapon _unit) != "") then {
|
|
_allGear pushBack (handgunWeapon _unit);
|
|
};
|
|
if (count (uniformItems _unit) > 0) then {
|
|
_allGear = _allGear + (uniformItems _unit);
|
|
};
|
|
if (count (vestItems _unit) > 0) then {
|
|
_allGear = _allGear + (vestItems _unit);
|
|
};
|
|
if (count (backpackItems _unit) > 0) then {
|
|
_allGear = _allGear + (backpackItems _unit);
|
|
};
|
|
if (count (assignedItems _unit) > 0) then {
|
|
_allGear = _allGear + (assignedItems _unit);
|
|
};
|
|
|
|
// Handgun
|
|
// Uniform Items
|
|
// Vest Items
|
|
// Backpack Items
|
|
// Assigned Items
|
|
{
|
|
if (!(_x in _listedItemClasses)) then {
|
|
private _item = configFile >> "CfgMagazines" >> _x;
|
|
if (isNil "_item" || str _item == "") then { //str _item ?
|
|
_item = configFile >> "CfgWeapons" >> _x;
|
|
};
|
|
_actions = [_actions, getText(_item >> "displayName"), getText(_item >> "picture"), _x] call ACE_Interaction_fnc_addSelectableItem;
|
|
_listedItemClasses pushBack _x;
|
|
};
|
|
} forEach (_allGear);
|
|
|
|
[_actions, {call ACE_Interaction_fnc_hideMenu;}, {call ACE_Interaction_fnc_hideMenu;}] call ACE_Interaction_fnc_openSelectMenu;
|
|
|
|
// don't need an "Ok" Button
|
|
ctrlShow [8860, false];
|