Skip to content

Commit 2b0b2db

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/dev'
2 parents 89f9343 + a9b48e4 commit 2b0b2db

87 files changed

Lines changed: 1768 additions & 578 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

addons/overthrow_main.pbo

41.4 KB
Binary file not shown.

addons/overthrow_main/CfgFunctions.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,16 @@ class CfgFunctions
279279
class restoreLoadout {};
280280
class saveLoadout {};
281281
class dumpStuff {};
282+
class dumpIntoWarehouse {};
282283
class takeStuff {};
284+
class openArsenal {};
283285

284286
/* Other */
285287
class craft {};
286288
class recruitSoldier {};
287289
class recruitSquad {};
290+
class editLoadout {};
291+
class editPoliceLoadout {};
288292
class addGarrison {};
289293
class addPolice {};
290294
class lockVehicle {};
@@ -328,6 +332,7 @@ class CfgFunctions
328332
class weatherSystem {};
329333
class getRandomRoadPosition {};
330334
class isRadarInRange {};
335+
class positionIsAtWarehouse {};
331336
};
332337

333338
/*
@@ -418,11 +423,16 @@ class CfgFunctions
418423
class Warehouse
419424
{
420425
file = "\overthrow_main\functions\warehouse";
426+
class addToWarehouse {};
421427
class removeFromWarehouse {};
422428
class findHelmetInWarehouse {};
423429
class findScopeInWarehouse {};
424430
class findWeaponInWarehouse {};
425431
class findVestInWarehouse {};
432+
class verifyLoadoutFromWarehouse {};
433+
class applyLoadoutFromWarehouse {};
434+
class qtyInWarehouse {};
435+
class isInWarehouse {};
426436
};
427437

428438
/*
@@ -433,6 +443,7 @@ class CfgFunctions
433443
file = "\overthrow_main\functions\AI";
434444
class createSoldier {};
435445
class getSoldier {};
446+
class getSquad {};
436447
class parachuteAll {};
437448
class NATOsearch {};
438449
class createSquad {};
@@ -448,6 +459,7 @@ class CfgFunctions
448459
file = "\overthrow_main\functions\AI\orders";
449460
class orderLoot {};
450461
class orderOpenInventory {};
462+
class orderOpenArsenal {};
451463
class orderRevivePlayer {};
452464
class squadAssignVehicle {};
453465
class squadGetIn {};

addons/overthrow_main/CfgVehicles.hpp

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
class CfgVehicles {
2424
class Item_Base_F;
2525
class ThingX;
26+
class CargoNet_01_ammo_base_F;
2627

2728
//Overthrow Vehicles
2829
class I_Truck_02_box_F;
@@ -33,7 +34,8 @@ class CfgVehicles {
3334
};
3435
};
3536

36-
//ACE actions
37+
//ACE actions----
38+
//Map
3739
class Land_MapBoard_F : ThingX {
3840
class ACE_Actions {
3941
class ACE_MainActions {
@@ -55,6 +57,27 @@ class CfgVehicles {
5557
};
5658
};
5759
};
60+
//ammobox
61+
class B_CargoNet_01_ammo_F : CargoNet_01_ammo_base_F {
62+
class ACE_Actions {
63+
class ACE_MainActions {
64+
displayName = "Interactions";
65+
distance = 6;
66+
67+
class arsenal {
68+
displayName = "Open Arsenal (This Ammobox)";
69+
condition = "!(call OT_fnc_playerIsAtWarehouse)";
70+
statement = "[_target,_player] call OT_fnc_openArsenal;";
71+
};
72+
class warehouse {
73+
displayName = "Open Arsenal (Warehouse)";
74+
condition = "(call OT_fnc_playerIsAtWarehouse)";
75+
statement = "['WAREHOUSE',_player,_target] call OT_fnc_openArsenal;";
76+
};
77+
};
78+
};
79+
};
80+
//END ACE actions----
5881
class Mapboard_tanoa_F: Land_MapBoard_F {
5982
displayName = "Map (Tanoa)";
6083
hiddenSelectionsTextures[] = {"\overthrow_main\ui\maptanoa.paa"};

addons/overthrow_main/campaign/missions/OverthrowMpTanoa.Tanoa/data/towns.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OT_townData = [
1010
[[9407.35,4133.13,0],"Moddergat"],
1111
[[10200.8,4964.28,0],"Lösi"],
1212
[[9014.23,10214.2,0],"Tanouka"],
13-
[[8741.21,3556.31,0],"Tobakoro"],
13+
[[8900.22,3612.34,0],"Tobakoro"],
1414
[[5476.22,10070.7,0],"Georgetown"],
1515
[[10974.5,6232.58,0],"Kotomo"],
1616
[[3413.58,6680.26,0],"Rautake"],
@@ -61,6 +61,6 @@ OT_townData = [
6161
[[12317.8,13929.5,0],"Ipota"]
6262
];
6363

64-
OT_spawnTowns = ["Savaka","Namuvaka","Cerebu","Koumac","Laikoro","Tavu","Muaceba","Leqa","La Foa","Tobakoro","Lösi","Lailai"];
64+
OT_spawnTowns = ["Savaka","Namuvaka","Cerebu","Tavu","Muaceba","Leqa","La Foa","Tobakoro","Lösi","Lailai"];
6565
OT_capitals = ["Georgetown","Lijnhaven","Katkoula","Balavu","Tuvanaka"]; //region capitals
6666
OT_sprawling = ["Blue Pearl industrial port"];

addons/overthrow_main/campaign/missions/OverthrowMpTanoa.Tanoa/initVar.sqf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
139139
OT_NATO_Vehicles_AirSupport = ["B_Heli_Attack_01_F"];
140140
OT_NATO_Vehicles_AirSupport_Small = ["B_Heli_Light_01_armed_F"];
141141
OT_NATO_Vehicles_GroundSupport = ["B_T_MRAP_01_gmg_F","B_T_MRAP_01_hmg_F","B_T_LSV_01_armed_F"];
142-
OT_NATO_Vehicles_TankSupport = ["B_MBT_01_TUSK_F","B_MBT_01_cannon_F"];
143-
OT_NATO_Vehicles_Convoy = ["B_UGV_01_rcws_F","B_T_MRAP_01_hmg_F","B_T_LSV_01_armed_F","B_T_LSV_01_armed_F","B_T_LSV_01_armed_F"];
142+
OT_NATO_Vehicles_TankSupport = ["B_T_MBT_01_TUSK_F","B_T_MBT_01_cannon_F"];
143+
OT_NATO_Vehicles_Convoy = ["B_T_UGV_01_rcws_olive_F","B_T_MRAP_01_hmg_F","B_T_LSV_01_armed_F","B_T_LSV_01_armed_F","B_T_LSV_01_armed_F"];
144144
OT_NATO_Vehicles_AirWingedSupport = ["B_Plane_CAS_01_F"];
145145
OT_NATO_Vehicle_AirTransport_Small = "B_Heli_Transport_01_camo_F";
146146
OT_NATO_Vehicle_AirTransport = ["B_Heli_Transport_03_F","B_Heli_Transport_01_F","B_Heli_Transport_01_F"];
147147
OT_NATO_Vehicle_AirTransport_Large = "B_Heli_Transport_03_F";
148-
OT_NATO_Vehicle_Boat_Small = "B_Boat_Armed_01_minigun_F";
148+
OT_NATO_Vehicle_Boat_Small = "B_T_Boat_Armed_01_minigun_F";
149149
OT_NATO_Vehicles_APC = ["B_T_APC_Wheeled_01_cannon_F"];
150150

151151
OT_NATO_Sandbag_Curved = "Land_BagFence_01_round_green_F";

addons/overthrow_main/campaign/missions/OverthrowSpTanoa.Tanoa/data/towns.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OT_townData = [
1010
[[9407.35,4133.13,0],"Moddergat"],
1111
[[10200.8,4964.28,0],"Lösi"],
1212
[[9014.23,10214.2,0],"Tanouka"],
13-
[[8741.21,3556.31,0],"Tobakoro"],
13+
[[8900.22,3612.34,0],"Tobakoro"],
1414
[[5476.22,10070.7,0],"Georgetown"],
1515
[[10974.5,6232.58,0],"Kotomo"],
1616
[[3413.58,6680.26,0],"Rautake"],
@@ -61,6 +61,6 @@ OT_townData = [
6161
[[12317.8,13929.5,0],"Ipota"]
6262
];
6363

64-
OT_spawnTowns = ["Savaka","Namuvaka","Cerebu","Koumac","Laikoro","Tavu","Muaceba","Leqa","La Foa","Tobakoro","Lösi","Lailai"];
64+
OT_spawnTowns = ["Savaka","Namuvaka","Cerebu","Tavu","Muaceba","Leqa","La Foa","Tobakoro","Lösi","Lailai"];
6565
OT_capitals = ["Georgetown","Lijnhaven","Katkoula","Balavu","Tuvanaka"]; //region capitals
6666
OT_sprawling = ["Blue Pearl industrial port"];

addons/overthrow_main/campaign/missions/OverthrowSpTanoa.Tanoa/initVar.sqf

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ OT_clothes_mob = "U_I_C_Soldier_Camo_F";
8686

8787
//NATO stuff
8888
OT_NATO_HMG = "B_HMG_01_high_F";
89-
9089
OT_NATO_Vehicles_AirGarrison = [
9190
["B_T_VTOL_01_vehicle_F",1],
9291
["B_T_VTOL_01_infantry_F",1],
@@ -97,15 +96,15 @@ OT_NATO_Vehicles_AirGarrison = [
9796
["B_Heli_Transport_01_F",2]
9897
];
9998

100-
OT_NATO_Vehicles_JetGarrison = [
101-
["B_Plane_CAS_01_F",1]
102-
];
103-
10499
OT_NATO_Vehicles_StaticAAGarrison = [
105100
"B_T_static_AA_F",
106101
"B_T_static_AA_F"
107102
]; //Added to every airfield
108103

104+
OT_NATO_Vehicles_JetGarrison = [
105+
["B_Plane_CAS_01_F",1]
106+
];
107+
109108
if(OT_hasJetsDLC) then {
110109
OT_NATO_Vehicles_JetGarrison pushback ["B_Plane_Fighter_01_F",1];
111110
OT_NATO_Vehicles_JetGarrison pushback ["B_Plane_Fighter_01_Stealth_F",1];
@@ -140,13 +139,13 @@ OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
140139
OT_NATO_Vehicles_AirSupport = ["B_Heli_Attack_01_F"];
141140
OT_NATO_Vehicles_AirSupport_Small = ["B_Heli_Light_01_armed_F"];
142141
OT_NATO_Vehicles_GroundSupport = ["B_T_MRAP_01_gmg_F","B_T_MRAP_01_hmg_F","B_T_LSV_01_armed_F"];
143-
OT_NATO_Vehicles_TankSupport = ["B_MBT_01_TUSK_F","B_MBT_01_cannon_F"];
144-
OT_NATO_Vehicles_Convoy = ["B_UGV_01_rcws_F","B_T_MRAP_01_hmg_F","B_T_LSV_01_armed_F","B_T_LSV_01_armed_F","B_T_LSV_01_armed_F"];
142+
OT_NATO_Vehicles_TankSupport = ["B_T_MBT_01_TUSK_F","B_T_MBT_01_cannon_F"];
143+
OT_NATO_Vehicles_Convoy = ["B_T_UGV_01_rcws_olive_F","B_T_MRAP_01_hmg_F","B_T_LSV_01_armed_F","B_T_LSV_01_armed_F","B_T_LSV_01_armed_F"];
145144
OT_NATO_Vehicles_AirWingedSupport = ["B_Plane_CAS_01_F"];
146145
OT_NATO_Vehicle_AirTransport_Small = "B_Heli_Transport_01_camo_F";
147146
OT_NATO_Vehicle_AirTransport = ["B_Heli_Transport_03_F","B_Heli_Transport_01_F","B_Heli_Transport_01_F"];
148147
OT_NATO_Vehicle_AirTransport_Large = "B_Heli_Transport_03_F";
149-
OT_NATO_Vehicle_Boat_Small = "B_Boat_Armed_01_minigun_F";
148+
OT_NATO_Vehicle_Boat_Small = "B_T_Boat_Armed_01_minigun_F";
150149
OT_NATO_Vehicles_APC = ["B_T_APC_Wheeled_01_cannon_F"];
151150

152151
OT_NATO_Sandbag_Curved = "Land_BagFence_01_round_green_F";

addons/overthrow_main/functions/AI/NPC/fn_initGendarm.sqf

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,10 @@ if((random 100) > 90) exitWith {
5353
_unit addItem "ACE_epinephrine";
5454
};
5555

56-
private _weapons = OT_allSubMachineGuns;
57-
if(count OT_NATO_weapons_Police > 0) then {
58-
_weapons = OT_NATO_weapons_Police;
56+
_weapon = selectRandom OT_allBLUSMG;
57+
if((call OT_fnc_getControlledPopulation) > 1000) then {
58+
_weapon = selectRandom OT_allBLURifles;
5959
};
60-
61-
_weapon = selectRandom _weapons;
6260
_base = [_weapon] call BIS_fnc_baseWeapon;
6361
_magazine = (getArray (configFile / "CfgWeapons" / _base / "magazines")) select 0;
6462
_unit addMagazineGlobal _magazine;
@@ -74,7 +72,7 @@ if((random 100) > 80) exitWith {
7472
_unit addPrimaryWeaponItem "optic_Aco_smg"
7573
};
7674

77-
_weapon = OT_NATO_weapons_Pistols call BIS_fnc_selectRandom;
75+
_weapon = OT_allBLUPistols call BIS_fnc_selectRandom;
7876
_base = [_weapon] call BIS_fnc_baseWeapon;
7977
_magazine = (getArray (configFile / "CfgWeapons" / _base / "magazines")) select 0;
8078
_unit addMagazineGlobal _magazine;
Lines changed: 134 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,141 @@
11
_unit = _this select 0;
22

3+
_type = typeof _unit;
4+
5+
//Make silencers rare
6+
_items = primaryWeaponItems _unit;
7+
if !(_items#0 isEqualTo "") then {
8+
if((random 100) < 99) then {
9+
_unit removePrimaryWeaponItem (_items#0);
10+
}
11+
};
12+
13+
//Re-Equip this soldier (75% of the time)
14+
if((random 100) > 25) then {
15+
//Primary Weapon
16+
_accessories = _unit weaponAccessories primaryWeapon _unit;
17+
_base = [primaryWeapon _unit] call BIS_fnc_baseWeapon;
18+
_unit removeWeapon (primaryWeapon _unit);
19+
_magazines = getArray (configFile / "CfgWeapons" / _base / "magazines");
20+
_stock = _unit call OT_fnc_unitStock;
21+
{
22+
_x params ["_cls","_num"];
23+
if(_cls in _magazines) then {
24+
private _count = 0;
25+
while {_count < _num} do {
26+
_unit removeMagazineGlobal _cls;
27+
_count = _count + 1;
28+
};
29+
};
30+
}foreach(_stock);
31+
32+
33+
_wpn = _base call {
34+
if(_this in OT_allBLUGLRifles) exitWith {selectRandom OT_allBLUGLRifles};
35+
if(_this in OT_allBLUSniperRifles) exitWith {_unit addItemToUniform "ACE_rangeCard";selectRandom OT_allBLUSniperRifles};
36+
if(_this in OT_allBLUMachineGuns) exitWith {selectRandom OT_allBLUMachineGuns};
37+
selectRandom OT_allBLURifles;
38+
};
39+
40+
_unit addWeapon _wpn;
41+
//put accessories back (where possible)
42+
{
43+
_unit addWeaponItem [_wpn, _x];
44+
}foreach(_accessories);
45+
46+
_magazines = getArray (configFile / "CfgWeapons" / _wpn / "magazines");
47+
48+
_mag = selectRandom _magazines;
49+
_unit addWeaponItem [_wpn, _mag];
50+
_unit addMagazineGlobal _mag;
51+
_unit addMagazineGlobal _mag;
52+
_unit addMagazineGlobal _mag;
53+
_unit addMagazineGlobal _mag;
54+
_unit addMagazineGlobal _mag;
55+
_unit addMagazineGlobal _mag;
56+
57+
_secondmags = [];
58+
{
59+
if !(_x isEqualTo "this") then {
60+
_secondmags = _secondmags + getArray (configFile / "CfgWeapons" / _wpn / _x / "magazines")
61+
};
62+
}foreach(getArray (configFile / "CfgWeapons" / _wpn / "muzzles"));
63+
if((count _secondmags) > 0) then {
64+
_mag = _secondmags select 0;
65+
_unit addWeaponItem [_wpn, _mag];
66+
_unit addMagazineGlobal _mag;
67+
_unit addMagazineGlobal _mag;
68+
_unit addMagazineGlobal _mag;
69+
_unit addMagazineGlobal _mag;
70+
_unit addMagazineGlobal _mag;
71+
_unit addMagazineGlobal _mag;
72+
};
73+
74+
//Secondary Weapon
75+
if !((_type find "_AA_") > -1) then {
76+
if !(secondaryWeapon _unit isEqualTo "") then {
77+
_base = [secondaryWeapon _unit] call BIS_fnc_baseWeapon;
78+
_unit removeWeapon (secondaryWeapon _unit);
79+
_magazines = getArray (configFile / "CfgWeapons" / _base / "magazines");
80+
{
81+
_x params ["_cls","_num"];
82+
if(_cls in _magazines) then {
83+
private _count = 0;
84+
while {_count < _num} do {
85+
_unit removeMagazineGlobal _cls;
86+
_count = _count + 1;
87+
};
88+
};
89+
}foreach(_stock);
90+
_wpn = selectRandom OT_allBLULaunchers;
91+
_unit addWeapon _wpn;
92+
_magazines = getArray (configFile / "CfgWeapons" / _wpn / "magazines");
93+
94+
_mag = selectRandom _magazines;
95+
if !(_mag isEqualTo "ACE_PreloadedMissileDummy") then {
96+
_unit addWeaponItem [_wpn, _mag];
97+
_unit addMagazineGlobal _mag;
98+
_unit addMagazineGlobal _mag;
99+
}else{
100+
removeBackpack _unit;
101+
};
102+
};
103+
};
104+
105+
//Pistol
106+
_base = [handgunWeapon _unit] call BIS_fnc_baseWeapon;
107+
_unit removeWeapon (handgunWeapon _unit);
108+
_magazines = getArray (configFile / "CfgWeapons" / _base / "magazines");
109+
{
110+
_x params ["_cls","_num"];
111+
if(_cls in _magazines) then {
112+
private _count = 0;
113+
while {_count < _num} do {
114+
_unit removeMagazineGlobal _cls;
115+
_count = _count + 1;
116+
};
117+
};
118+
}foreach(_stock);
119+
120+
_wpn = selectRandom OT_allBLUPistols;
121+
_unit addWeapon _wpn;
122+
_magazines = getArray (configFile / "CfgWeapons" / _wpn / "magazines");
123+
124+
_mag = selectRandom _magazines;
125+
_unit addWeaponItem [_wpn, _mag];
126+
_unit addMagazineGlobal _mag;
127+
_unit addMagazineGlobal _mag;
128+
129+
_unit selectWeapon (primaryWeapon _unit);
130+
131+
};
132+
3133
_unit addEventHandler ["HandleDamage", {
4134
_me = _this select 0;
5135
_src = _this select 3;
6136
if(captive _src) then {
7137
if((vehicle _src) != _src || (_src call OT_fnc_unitSeenNATO)) then {
8-
_src setCaptive false;
9-
};
10-
};
11-
}];
138+
_src setCaptive false;
139+
};
140+
};
141+
}];

addons/overthrow_main/functions/AI/NPC/fn_initNATOCheckpoint.sqf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private _bargates = _start nearobjects ["Land_BarGate_F",50];
1616
while {!(isNil "_group") && count (units _group) > 0} do {\
1717
_group setVariable ["VCM_NORESCUE",true];
1818
_group setVariable ["VCM_TOUGHSQUAD",true];
19-
19+
2020
_vehs = [];
2121
_friendly = [];
2222

@@ -130,7 +130,7 @@ while {!(isNil "_group") && count (units _group) > 0} do {\
130130
{
131131
_x setCaptive false;
132132
[_x] call OT_fnc_revealToNATO;
133-
}foreach(units _v);
133+
}foreach(units vehicle _unit);
134134
}else{
135135
_msg = "We found some illegal items and confiscated them, be on your way";
136136
};
@@ -140,7 +140,7 @@ while {!(isNil "_group") && count (units _group) > 0} do {\
140140
{
141141
_x setCaptive false;
142142
[_x] call OT_fnc_revealToNATO;
143-
}foreach(units _v);
143+
}foreach(units vehicle _unit);
144144
};
145145
};
146146
[[_leader,_msg], {(_this select 0) globalchat (_this select 1)}] remoteExec ["call", _x, false];

0 commit comments

Comments
 (0)