ACE3/addons/marker_flags/functions/fnc_addActions.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

40 lines
765 B
Plaintext

#include "script_component.hpp"
/*
* Author: Brett Mayson
* Adds the child actions for placing flags.
*
* Arguments:
* 0: Player <OBJECT>
*
* Return Value:
* Actions <ARRAY>
*
* Example:
* [player] call ace_marker_flags_fnc_addActions
*
* Public: No
*/
params ["_unit"];
private _actions = [];
{
private _config = configFile >> "CfgWeapons" >> _x;
_actions pushBack [
[
_x,
getText (_config >> "displayName"),
getText (_config >> "picture"),
{[_this select 0, _this select 2] call FUNC(placeFlag)},
{true},
{},
_x
] call EFUNC(interact_menu,createAction),
[],
_unit
];
} forEach ([_unit] call FUNC(getFlags));
_actions