Skip to content

Commit 0f8356b

Browse files
authored
Merge pull request #1683 from Vdauphin/Add-ACE_flag
Add: ACE3 Flags support since 3.19 update
2 parents a8b975e + 5d5cd7a commit 0f8356b

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ btc_flag_textures = [
727727
"\A3\Data_F\Flags\flag_red_CO.paa",
728728
"\A3\Data_F\Flags\flag_green_CO.paa",
729729
"\A3\Data_F\Flags\flag_blue_CO.paa",
730-
'#(argb,8,8,3)color(0.9,0.9,0,1)',
730+
"z\ace\addons\flags\data\Flag_yellow_co.paa",
731731
"\A3\Data_F\Flags\flag_NATO_CO.paa"
732732
];
733733

=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ class Params {
495495
title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_OTHER_ALLOWFLAG"]);
496496
values[]={0,1,2,3};
497497
texts[]={$STR_DISABLED,$STR_BTC_HAM_PARAM_OTHER_FLAGVEH,$STR_BTC_HAM_PARAM_OTHER_FLAGVEHLEADER,$STR_BTC_HAM_PARAM_OTHER_FLAGVEHPLAYER};
498-
default = 3;
498+
default = 1;
499499
};
500500
class btc_p_debug { // Debug:
501501
title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_OTHER_DEBUG"]);

=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,8 @@ if (btc_p_respawn_ticketsAtStart >= 0) then {
136136
params ["_unit", "_flag"];
137137
_flag remoteExecCall ["btc_log_fnc_init", 2];
138138
}] call CBA_fnc_addEventHandler;
139+
140+
["ace_flags_placed", {
141+
params ["_player", "_flag", "_item"];
142+
_flag remoteExecCall ["btc_log_fnc_init", 2];
143+
}] call CBA_fnc_addEventHandler;

=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/int/add_actions.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ if (btc_p_flag > 1) then {
229229
[player, 1, ["ACE_SelfActions", "ACE_Equipment"], _action] call ace_interact_menu_fnc_addActionToObject;
230230
_action = ["btc_flag_cutPlayer", localize "STR_BTC_HAM_ACTION_VEHINIT_CUTFLAG", "\A3\ui_f\data\map\markers\handdrawn\flag_CA.paa", {
231231
_target forceFlagTexture "";
232-
}, {getForcedFlagTexture _target isNotEqualTo ""}] call ace_interact_menu_fnc_createAction;
232+
}, {getForcedFlagTexture _target isNotEqualTo "" && !([player] call ace_flags_fnc_isCarryingFlag)}] call ace_interact_menu_fnc_createAction;
233233
[player, 1, ["ACE_SelfActions", "ACE_Equipment"], _action] call ace_interact_menu_fnc_addActionToObject;
234234
};
235235

=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/slot/deserializeState.sqf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Author:
3636
"_isContaminated",
3737
"_medicalDeserializeState",
3838
["_vehicle", objNull, [objNull]],
39-
["_field_rations", [], [[]]]
39+
["_field_rations", [], [[]]],
40+
["_aceFlagItem", "", [""]]
4041
];
4142

4243
if (
@@ -49,7 +50,11 @@ Author:
4950
player setPosASL _previousPos;
5051
};
5152
player setDir _dir;
52-
player forceFlagTexture _flagTexture;
53+
if (_aceFlagItem isEqualTo "") then {
54+
player forceFlagTexture _flagTexture;
55+
} else {
56+
[player, _aceFlagItem] call ace_flags_fnc_carryFlag;
57+
};
5358
[{player getVariable ["ace_medical_initialized", false]}, {
5459
[player, _this] call ace_medical_fnc_deserializeState;
5560
}, _medicalDeserializeState] call CBA_fnc_waitUntilAndExecute;

=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/slot/serializeState.sqf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ private _data = [
4141
[
4242
_unit getVariable ["acex_field_rations_thirst", 0],
4343
_unit getVariable ["acex_field_rations_hunger", 0]
44-
]
44+
],
45+
_unit getVariable ["ace_flags_carryingFlag", ""]
4546
];
4647

4748
if (btc_debug || btc_debug_log) then {

0 commit comments

Comments
 (0)