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

Add placeable and carryable flags #8943

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6a95746
Add ability to carry and place flags
Timi007 Jun 10, 2022
e607248
Add white icons
Timi007 Jun 10, 2022
4cafe0d
Fix cache
Timi007 Jun 10, 2022
434402e
Fix icon paths
Timi007 Jun 10, 2022
f6500a5
Fix action text
Timi007 Jun 10, 2022
e86fbf4
Fix placing and picking up flags
Timi007 Jun 10, 2022
cebc7c0
Disable debugging
Timi007 Jun 10, 2022
6fef624
Rename var
Timi007 Jun 10, 2022
d0f97f0
Remove hack
Timi007 Jun 10, 2022
8a78b1b
Casing
Timi007 Jun 10, 2022
37cd98a
Add setting to hide place or carry actions
Timi007 Jun 10, 2022
a7d5ba6
Refactor
Timi007 Jun 21, 2022
cee6fa0
Fix function rename
Timi007 Jun 21, 2022
e4d41ed
Add purple, black and orange flags
Timi007 Jun 21, 2022
65814f8
Add new flags to weapons array
Timi007 Jun 21, 2022
44511c5
Add description
Timi007 Jun 21, 2022
8a3c74d
Fix stringtable checks
Timi007 Jun 21, 2022
8318fef
Lazy eval
Timi007 Jun 22, 2022
78bfefb
Save CfgWeapons in var
Timi007 Jun 23, 2022
1322155
Refactor clamping height
Timi007 Jun 23, 2022
ae36edb
Fix docs
Timi007 Jun 30, 2022
b81988e
Add existing translation
Timi007 Jun 30, 2022
c011c66
Use macro
Timi007 Jul 2, 2022
c601f89
Remove obsolete line
Timi007 Jul 2, 2022
7ef33d5
Merge branch 'acemod:master' into flags
Timi007 Nov 10, 2024
00e2762
Fix hemtt build
Timi007 Nov 10, 2024
f82e676
Fix hemtt warnings
Timi007 Nov 10, 2024
2e5cd28
Fix floating
Timi007 Nov 10, 2024
8462536
Increase mass
Timi007 Nov 10, 2024
a64c744
Use new script_component path
Timi007 Nov 10, 2024
917078f
Use EFUNC and check canInteractWith
Timi007 Nov 10, 2024
88aea4a
Merge branch 'acemod:master' into flags
Timi007 Dec 20, 2024
94de944
Correct spelling
Timi007 Dec 20, 2024
69cc11a
Build item cache in preStart
Timi007 Dec 20, 2024
b7fe43e
Add private
Timi007 Dec 20, 2024
f8ac07e
Move config cache to fnc_scanConfig
Timi007 Dec 21, 2024
481790b
Make flag carrier customizable
Timi007 Dec 21, 2024
4bf9803
More descriptive var
Timi007 Dec 21, 2024
b06498b
Reduce round brackets
Timi007 Dec 21, 2024
c831818
Improve German translation
Timi007 Dec 21, 2024
33c2f02
Improve spelling
Timi007 Dec 21, 2024
c7a7712
Merge branch 'master' into pr/8943
johnb432 Jan 17, 2025
6c59408
Rename to isCarryingFlag
Timi007 Jan 17, 2025
491941c
Remove explicit _this
Timi007 Jan 17, 2025
0719455
Add check for already picked up flag
Timi007 Jan 17, 2025
c7f87b5
Formatting
Timi007 Jan 17, 2025
0de8d45
Use cancel STR from common
Timi007 Jan 17, 2025
394548d
Fix finding
Timi007 Jan 18, 2025
9635215
Add carrier for each flag
Timi007 Jan 18, 2025
557a6e6
Add editor previews
Timi007 Jan 18, 2025
9ca650f
Fix hook
Timi007 Jan 18, 2025
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
12 changes: 0 additions & 12 deletions addons/flags/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,3 @@ GVAR(isPlacing) = PLACE_CANCEL;
] call EFUNC(interact_menu,createAction);
[_flag, 0, [], _pickupFlag] call EFUNC(interact_menu,addActionToObject);
}] call CBA_fnc_addEventHandler;

private _cfgWeapons = configFile >> "CfgWeapons";
private _flagItems = (call (uiNamespace getVariable [QGVAR(allFlagItems), {[]}])) apply {_cfgWeapons >> _x};
{
private _name = configName _x;
private _displayName = getText (_x >> "displayName");
private _texture = getText (_x >> QGVAR(texture));
private _actionIconPlace = getText (_x >> QGVAR(actionIconPlace));
private _actionIconCarry = getText (_x >> QGVAR(actionIconCarry));

GVAR(flagItemCache) set [_name, [_displayName, _texture, _actionIconPlace, _actionIconCarry]];
} forEach _flagItems;
2 changes: 1 addition & 1 deletion addons/flags/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ PREP_RECOMPILE_END;

#include "initSettings.inc.sqf"

GVAR(flagItemCache) = createHashMap;
GVAR(flagItemCache) = +(uiNamespace getVariable [QGVAR(flagItemCache), createHashMap]);

ADDON = true;
16 changes: 14 additions & 2 deletions addons/flags/XEH_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,17 @@

#include "XEH_PREP.hpp"

private _flagItems = (configProperties [configFile >> "CfgWeapons", QUOTE(isClass _x && {isText (_x >> QQGVAR(texture))}), true]) apply {configName _x};
uiNamespace setVariable [QGVAR(allFlagItems), compileFinal str _flagItems];
private _flagItems = configProperties [configFile >> "CfgWeapons", QUOTE(isClass _x && {isText (_x >> QQGVAR(texture))}), true];
private _flagItemCache = createHashMap;

{
private _name = configName _x;
private _displayName = getText (_x >> "displayName");
private _texture = getText (_x >> QGVAR(texture));
private _actionIconPlace = getText (_x >> QGVAR(actionIconPlace));
private _actionIconCarry = getText (_x >> QGVAR(actionIconCarry));

_flagItemCache set [_name, [_displayName, _texture, _actionIconPlace, _actionIconCarry]];
} forEach _flagItems;

uiNamespace setVariable [QGVAR(flagItemCache), _flagItemCache];
Timi007 marked this conversation as resolved.
Show resolved Hide resolved
Loading