ACE3/addons/marker_flags/XEH_postInit.sqf
Brett 6851183e1f
Add Marker Flags (#8696)
* add marker flags

* minor cleanup

* use pictures for actions

* check canDig

* review changes

* Update fnc_placeFlag.sqf

* fix hiddenSelectionsTextures

* Update addons/marker_flags/functions/fnc_pickUpFlag.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* Cache flag list at pre-start

* Add model for flag pole

* Pass item name to pickUpFlag via action

* Update addons/marker_flags/stringtable.xml

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
2022-05-09 20:28:10 -05:00

23 lines
701 B
Plaintext

#include "script_component.hpp"
if (!hasInterface) exitWith {};
private _weapons = (call (uiNamespace getVariable [QGVAR(flagItems), {[]}])) apply {configFile >> "CfgWeapons" >> _x};
{
private _name = configName _x;
private _vehicle = getText (_x >> QGVAR(vehicle));
GVAR(flagCache) set [_name, _vehicle];
private _action = [
QGVAR(pickup),
LLSTRING(ActionPickUp),
"",
{call FUNC(pickUpFlag)},
{[_player, _target, []] call EFUNC(common,canInteractWith)},
{},
[_name]
] call EFUNC(interact_menu,createAction);
[_vehicle, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);
} forEach _weapons;