Skip to content

Commit

Permalink
Merge pull request #1683 from Vdauphin/Add-ACE_flag
Browse files Browse the repository at this point in the history
Add: ACE3 Flags support since 3.19 update
  • Loading branch information
Vdauphin authored Jan 30, 2025
2 parents a8b975e + 5d5cd7a commit 0f8356b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ btc_flag_textures = [
"\A3\Data_F\Flags\flag_red_CO.paa",
"\A3\Data_F\Flags\flag_green_CO.paa",
"\A3\Data_F\Flags\flag_blue_CO.paa",
'#(argb,8,8,3)color(0.9,0.9,0,1)',
"z\ace\addons\flags\data\Flag_yellow_co.paa",
"\A3\Data_F\Flags\flag_NATO_CO.paa"
];

Expand Down
2 changes: 1 addition & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ class Params {
title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_OTHER_ALLOWFLAG"]);
values[]={0,1,2,3};
texts[]={$STR_DISABLED,$STR_BTC_HAM_PARAM_OTHER_FLAGVEH,$STR_BTC_HAM_PARAM_OTHER_FLAGVEHLEADER,$STR_BTC_HAM_PARAM_OTHER_FLAGVEHPLAYER};
default = 3;
default = 1;
};
class btc_p_debug { // Debug:
title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_OTHER_DEBUG"]);
Expand Down
5 changes: 5 additions & 0 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,8 @@ if (btc_p_respawn_ticketsAtStart >= 0) then {
params ["_unit", "_flag"];
_flag remoteExecCall ["btc_log_fnc_init", 2];
}] call CBA_fnc_addEventHandler;

["ace_flags_placed", {
params ["_player", "_flag", "_item"];
_flag remoteExecCall ["btc_log_fnc_init", 2];
}] call CBA_fnc_addEventHandler;
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ if (btc_p_flag > 1) then {
[player, 1, ["ACE_SelfActions", "ACE_Equipment"], _action] call ace_interact_menu_fnc_addActionToObject;
_action = ["btc_flag_cutPlayer", localize "STR_BTC_HAM_ACTION_VEHINIT_CUTFLAG", "\A3\ui_f\data\map\markers\handdrawn\flag_CA.paa", {
_target forceFlagTexture "";
}, {getForcedFlagTexture _target isNotEqualTo ""}] call ace_interact_menu_fnc_createAction;
}, {getForcedFlagTexture _target isNotEqualTo "" && !([player] call ace_flags_fnc_isCarryingFlag)}] call ace_interact_menu_fnc_createAction;
[player, 1, ["ACE_SelfActions", "ACE_Equipment"], _action] call ace_interact_menu_fnc_addActionToObject;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Author:
"_isContaminated",
"_medicalDeserializeState",
["_vehicle", objNull, [objNull]],
["_field_rations", [], [[]]]
["_field_rations", [], [[]]],
["_aceFlagItem", "", [""]]
];

if (
Expand All @@ -49,7 +50,11 @@ Author:
player setPosASL _previousPos;
};
player setDir _dir;
player forceFlagTexture _flagTexture;
if (_aceFlagItem isEqualTo "") then {
player forceFlagTexture _flagTexture;
} else {
[player, _aceFlagItem] call ace_flags_fnc_carryFlag;
};
[{player getVariable ["ace_medical_initialized", false]}, {
[player, _this] call ace_medical_fnc_deserializeState;
}, _medicalDeserializeState] call CBA_fnc_waitUntilAndExecute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ private _data = [
[
_unit getVariable ["acex_field_rations_thirst", 0],
_unit getVariable ["acex_field_rations_hunger", 0]
]
],
_unit getVariable ["ace_flags_carryingFlag", ""]
];

if (btc_debug || btc_debug_log) then {
Expand Down

0 comments on commit 0f8356b

Please sign in to comment.