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

Prevent SAM supports being used by WW2 factions #3287

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//////////////////////////

["attributeLowAir", true] call _fnc_saveToTemplate; // Use fewer air units in general
["attributeNoSAM", true] call _fnc_saveToTemplate; // Don't use SAM supports

["ammobox", "B_supplyCrate_F"] call _fnc_saveToTemplate;
["surrenderCrate", "SPE_Mine_AmmoBox_US"] call _fnc_saveToTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//////////////////////////

["attributeLowAir", true] call _fnc_saveToTemplate; // Use fewer air units in general
["attributeNoSAM", true] call _fnc_saveToTemplate; // Don't use SAM supports

["ammobox", "B_supplyCrate_F"] call _fnc_saveToTemplate;
["surrenderCrate", "SPE_Weaponcrate_MP40_GER"] call _fnc_saveToTemplate;
Expand Down
2 changes: 2 additions & 0 deletions A3A/addons/core/functions/Supports/fn_initSupports.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ private _fnc_buildSupportHM =
{
params ["_faction"];
private _lowAir = _faction getOrDefault ["attributeLowAir", false];
private _noSAM = _faction getOrDefault ["attributeNoSAM", false];
private _suppHM = createHashMap;
{
_x params ["_suppType", "_baseType", "_weight", "_lowAirWeight", "_effRadius", "_strikepower", "_flags", "_reqType"];
if (_faction get _reqType isEqualTo []) then { continue };
if ("u" in _flags and !allowUnfairSupports) then { continue };
if ("f" in _flags and !allowFuturisticSupports) then { continue };
if (_suppType == "SAM" and _noSAM) then { continue };
ante185 marked this conversation as resolved.
Show resolved Hide resolved

private _weight = [_weight, _lowAirWeight] select _lowAir;
_suppHM set [_suppType, [_baseType, _weight, _effRadius, _strikepower]];
Expand Down