Skip to content

Commit

Permalink
Initial figuring out of adding new category
Browse files Browse the repository at this point in the history
trying to add vehiclesPlaneLargeAA and vehiclesPlaneLargeCAS, with intention to be used in all places normal equivalents used, except spawning in hangars
  • Loading branch information
stutpip123 committed Aug 17, 2024
1 parent 94e8284 commit 02ef744
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion A3A/addons/core/Templates/Templates/CW/CW_AI_CIS.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
["vehiclesGunBoats", ["442_boat_armed"]] call _fnc_saveToTemplate;
["vehiclesAmphibious", []] call _fnc_saveToTemplate;

["vehiclesPlanesCAS", ["3AS_Tri_Fighter_DynamicLoadout"]] call _fnc_saveToTemplate;
["vehiclesPlanesCAS", ["3AS_BTLB_Bomber_Shadow"]] call _fnc_saveToTemplate;
["vehiclesPlanesAA", ["3AS_Z95_Blue"]] call _fnc_saveToTemplate;
["vehiclesPlanesTransport", ["3AS_Civilian_Transport_01"]] call _fnc_saveToTemplate;

Expand Down
4 changes: 3 additions & 1 deletion A3A/addons/core/Templates/Templates/CW/CW_AI_REP.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
["vehiclesAmphibious", []] call _fnc_saveToTemplate;

["vehiclesPlanesCAS", ["3AS_BTLB_Bomber"]] call _fnc_saveToTemplate;
["vehiclesPlanesAA", ["3AS_Z95_Republic","3as_Vwing_base"]] call _fnc_saveToTemplate;
["vehiclesPlanesLargeCAS", ["3AS_ARC_170_Red"]] call _fnc_saveToTemplate;
["vehiclesPlanesAA", ["3AS_Z95_Republic","3as_Vwing_base", "3AS_Delta7_F"]] call _fnc_saveToTemplate;
["vehiclesPlanesLargeAA", ["3AS_ARC_170_Red","3as_V19_base"]] call _fnc_saveToTemplate;
["vehiclesPlanesTransport", ["3AS_Republic_Transport_01"]] call _fnc_saveToTemplate;

["vehiclesPlanesGunship", ["3AS_LAAT_Mk1","lsd_heli_laati"]] call _fnc_saveToTemplate;
Expand Down
4 changes: 3 additions & 1 deletion A3A/addons/core/Templates/Templates/CW/CW_AI_REP_WBK.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
["vehiclesAmphibious", []] call _fnc_saveToTemplate;

["vehiclesPlanesCAS", ["3AS_BTLB_Bomber"]] call _fnc_saveToTemplate;
["vehiclesPlanesAA", ["3AS_Z95_Republic","3as_Vwing_base"]] call _fnc_saveToTemplate;
["vehiclesPlanesLargeCAS", ["3AS_ARC_170_Red"]] call _fnc_saveToTemplate;
["vehiclesPlanesAA", ["3AS_Z95_Republic","3as_Vwing_base", "3AS_Delta7_F"]] call _fnc_saveToTemplate;
["vehiclesPlanesLargeAA", ["3AS_ARC_170_Red","3as_V19_base"]] call _fnc_saveToTemplate;
["vehiclesPlanesTransport", ["3AS_Republic_Transport_01"]] call _fnc_saveToTemplate;

["vehiclesPlanesGunship", ["3AS_LAAT_Mk1","lsd_heli_laati"]] call _fnc_saveToTemplate;
Expand Down
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/Base/fn_sellVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private _costs = call {
or (_typeX in FactionGet(all,"vehiclesAA"))
or (_typeX in FactionGet(all,"vehiclesArtillery"))
) exitWith {6500};
if (_typeX in (FactionGet(all,"vehiclesPlanesCAS") + FactionGet(all,"vehiclesPlanesAA"))) exitWith {7500};
if (_typeX in (FactionGet(all,"vehiclesPlanesCAS") + FactionGet(all,"vehiclesPlanesAA") + FactionGet(all,"vehiclesPlanesLargeAA") + FactionGet(all,"vehiclesPlanesLargeCAS"))) exitWith {7500};
if (_typeX in (FactionGet(all,"vehiclesPlanesGunship"))) exitWith {10000};
0;
};
Expand Down
4 changes: 4 additions & 0 deletions A3A/addons/core/functions/Garrison/fn_checkVehicleType.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ params ["_vehicle", "_preference"];
|| {_vehicle in FactionGet(inv,"vehiclesPlanesCAS")} \
|| {_vehicle in FactionGet(inv,"vehiclesPlanesAA")} \
|| {_vehicle in FactionGet(occ,"vehiclesPlanesGunship")} \
|| {_vehicle in FactionGet(occ,"vehiclesPlanesLargeCAS")} \
|| {_vehicle in FactionGet(inv,"vehiclesPlanesLargeAA")} \
|| {_vehicle in FactionGet(occ,"vehiclesPlanesLargeAA")} \
|| {_vehicle in FactionGet(inv,"vehiclesPlanesLargeCAS")} \
|| {_vehicle in FactionGet(inv,"vehiclesPlanesGunship")}

//TODO this does not work properly (maybe even throws errors) as the template files arent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params ["_target", "_side", "_maxSpend", "_availTypes"];
// - static AA
// - AA tanks/trucks
// TODO: Rework vehicle type system to handle this shit better
private _allAA = (A3A_faction_all get "vehiclesPlanesAA") + (A3A_faction_all get "vehiclesAA") + (A3A_faction_all get "staticAA");
private _allAA = (A3A_faction_all get "vehiclesPlanesAA") + (A3A_faction_all get "vehiclesPlanesLargeAA") + (A3A_faction_all get "vehiclesAA") + (A3A_faction_all get "staticAA");
if (typeOf _target in _allAA) exitWith { 0 };

// Otherwise fine?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ setVar("vehiclesHelisAttack", OccAndInv("vehiclesHelisAttack") );
setVar("vehiclesHelisTransport", OccAndInv("vehiclesHelisTransport") );
setVar("vehiclesPlanesAA", OccAndInv("vehiclesPlanesAA") );
setVar("vehiclesPlanesCAS", OccAndInv("vehiclesPlanesCAS") );
setVar("vehiclesPlanesLargeAA", OccAndInv("vehiclesPlanesLargeAA") );
setVar("vehiclesPlanesLargeCAS", OccAndInv("vehiclesPlanesLargeCAS") );
setVar("vehiclesPlanesTransport", OccAndInv("vehiclesPlanesTransport"));
setVar("staticMortars", OccAndInv("staticMortars") + Riv("staticMortars") + Reb("staticMortars") + ("STATICMORTAR" call _fnc_extractMarketClasses));
setVar("staticAA", OccAndInv("staticAA") + Reb("staticAA") + ("STATICAA" call _fnc_extractMarketClasses));
Expand Down Expand Up @@ -178,6 +180,8 @@ setVar("vehiclesHelis", _vehHelis);
private _vehFixedWing =
OccAndInv("vehiclesPlanesCAS")
+ OccAndInv("vehiclesPlanesAA")
+ OccAndInv("vehiclesPlanesLargeAA")
+ OccAndInv("vehiclesPlanesLargeCAS")
+ OccAndInv("vehiclesPlanesTransport")
+ Reb("vehiclesPlane")
+ Reb("vehiclesCivPlane")
Expand Down
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/init/fn_initVarServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ private _vehicleResourceCosts = createHashMap;
{ _vehicleResourceCosts set [_x, 150] } forEach FactionGet(all, "vehiclesDropPod");
{ _vehicleResourceCosts set [_x, 250] } forEach FactionGet(all, "vehiclesPlanesCAS") + FactionGet(all, "vehiclesPlanesAA");
{ _vehicleResourceCosts set [_x, 250] } forEach FactionGet(all, "vehiclesHelisAttack");
{ _vehicleResourceCosts set [_x, 250] } forEach FactionGet(all, "vehiclesPlanesCAS") + FactionGet(all, "vehiclesPlanesAA") + FactionGet(all, "vehiclesPlanesGunship");
{ _vehicleResourceCosts set [_x, 250] } forEach FactionGet(all, "vehiclesPlanesLargeCAS") + FactionGet(all, "vehiclesPlanesLargeAA") + FactionGet(all, "vehiclesPlanesGunship");


// Threat table
Expand Down

0 comments on commit 02ef744

Please sign in to comment.