Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
armazac committed Jun 24, 2019
2 parents c5fba79 + 6302e1d commit f62c752
Show file tree
Hide file tree
Showing 83 changed files with 2,050 additions and 711 deletions.
Binary file modified addons/overthrow_main.pbo
Binary file not shown.
18 changes: 14 additions & 4 deletions addons/overthrow_main/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class CfgFunctions
class illegalInCar {};
class detectedByReputation {};
class detectedByReputationNATO {};
class gangRep {};
};

class Interaction
Expand Down Expand Up @@ -140,6 +141,7 @@ class CfgFunctions
class notifyMinor {};
class notifyBig {};
class notifyGood {};
class notifyBad {};
class notifySilent {};
class notifyVehicle {};
class playerDecision {};
Expand Down Expand Up @@ -256,10 +258,6 @@ class CfgFunctions
class sell {};
class sellAll {};

/* Gun Dealer */
class getMission {};
class assignMission {};

/* Factory */
class factoryQueueAdd {};
class factoryQueueRemove {};
Expand All @@ -276,6 +274,10 @@ class CfgFunctions

/* Jobs */
class setJobWaypoint {};
class requestJobResistance {};
class requestJobGang {};
class requestJobShop {};
class requestJobFaction {};

/* Safe */
class safePutMoney {};
Expand Down Expand Up @@ -332,6 +334,7 @@ class CfgFunctions
class nearestLocation {};
class nearestMobster {};
class nearestObjective {};
class nearestObjectiveNoComms {};
class nearestPositionRegion {};
class nearestTown {};
class getRegion {};
Expand Down Expand Up @@ -577,13 +580,17 @@ class CfgFunctions
class formOrJoinGang {};
class formGang {};
class addToGang {};
class gangJoinResistance {};
};

class GUER
{
file = "\overthrow_main\functions\factions\GUER";
class jobSystem {};
class assignJob {};
class acceptJob {};
class denyJob {};
class startJob {};
class jobLoop {};
class GUERLoop {};
};
Expand All @@ -604,6 +611,7 @@ class CfgFunctions
{
file = "\overthrow_main\functions\util";
class getOwner {};
class getOwnerUnit {};
class hasOwner {};
class setOwner {};
class unitStock {};
Expand All @@ -612,6 +620,8 @@ class CfgFunctions
class sortByInplace {};
class findReplace {};
class exportPrices {};
class datestamp {};
class logVerbose {};
};

/*
Expand Down
2 changes: 2 additions & 0 deletions addons/overthrow_main/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class CfgVehicles {
//Overthrow Vehicles
class I_Truck_02_box_F;
class OT_I_Truck_recovery : I_Truck_02_box_F {
scope = 2;
author = "ARMAzac";
displayName = "KamAZ Recovery";
class Library {
libTextDesc = "The Field Assistance and Recovery Truck (FART) is a specialized heavy truck used for field repairs and gear recovery after a battle. It can recover all items and bodies within a 150m radius into it's cargohold.";
Expand Down
10 changes: 10 additions & 0 deletions addons/overthrow_main/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ class CfgWeapons {
class ItemInfo: InventoryItem_Base_F {
mass = 250;
};
};
class OT_Lumber: OT_ItemCore {
scope = 2;
picture = "\overthrow_main\ui\items\wood_x_ca.paa";
displayName = "Lumber";
descriptionShort = "Lumber or timber is a type of wood that has been processed into beams and planks, a stage in the process of wood production.";
descriptionUse = "";
class ItemInfo: InventoryItem_Base_F {
mass = 200;
};
};
class OT_Steel: OT_ItemCore {
scope = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ OT_economicData = [
[[5180.36,10351,0],"Gliniska Farm"],
[[1352.23,8005,0],"Topolin Farm"],
[[1223.91,8923.21,0],"Topolin Quarry"],
[[5210.57,5668.39,0],"Huta Sawmill"]
[[5210.57,5668.39,0],"Huta Sawmill","OT_Wood","OT_Lumber"]
];
OT_factoryPos = [7343.56,2838.22,0];
OT_factoryVehicleSpawn = [7350.82,2841.75,0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OT_economicData = [
[[9456.82,7552.04,0],"Lami Lumberyard","","OT_Wood"],
[[8389.24,10229.8,0],"Tanoa Sugar Company","OT_Sugarcane","OT_Sugar"],
[[10945.1,7860.1,0],"Kotomo Banana Plantation","","ACE_Banana"],
[[11761.2,6949.91,0],"Sawmill","OT_Wood"],
[[11761.2,6949.91,0],"Sawmill","OT_Wood","OT_Lumber"],
[[5511.58,11888.2,0],"Saint-Julien Lumberyard","","OT_Wood"],
[[8878.1,11889.1,0],"Galili Lumberyard","","OT_Wood"],
[[12507.4,7820.99,0],"Ouméré Banana Plantations","","ACE_Banana"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OT_economicData = [
[[9456.82,7552.04,0],"Lami Lumberyard","","OT_Wood"],
[[8389.24,10229.8,0],"Tanoa Sugar Company","OT_Sugarcane","OT_Sugar"],
[[10945.1,7860.1,0],"Kotomo Banana Plantation","","ACE_Banana"],
[[11761.2,6949.91,0],"Sawmill","OT_Wood"],
[[11761.2,6949.91,0],"Sawmill","OT_Wood","OT_Lumber"],
[[5511.58,11888.2,0],"Saint-Julien Lumberyard","","OT_Wood"],
[[8878.1,11889.1,0],"Galili Lumberyard","","OT_Wood"],
[[12507.4,7820.99,0],"Ouméré Banana Plantations","","ACE_Banana"],
Expand Down
36 changes: 36 additions & 0 deletions addons/overthrow_main/data/gangnames.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
OT_gangNames = [
"Sons of %2",
"%1 Boyz",
"Sons of Anarchy",
"%1 People's Front",
"People's Front of %1",
"Bloodhound Gang",
"Legion of the Concrete Jungle",
"Gangsters Incorporated",
"ACAB",
"Devil's Tribe",
"%1 Raiders",
"Neighbourhood Bullies",
"Dungeons and Dragons",
"The Crackheads",
"The Snitches",
"Organised Morons",
"The Gay Mafia",
"The %1 Death Squad",
"Raiders of %1",
"The Always Sunny in %1 Gang",
"%1 Crew",
"Cool and the Gang",
"Ganja Boyz",
"NWA",
"Angel Cartel",
"The T-Birds",
"Rat Pack",
"Scooby Gang",
"The Stooges",
"Bad Company",
"Black Sun Empire",
"Teddy Killerz",
"Zombie Cats",
"The Runners" //Patreon: Fital Shell
];
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ private _activeshops = server getVariable [format["activeshopsin%1",_town],[]];

private _dest = [];

if(count _activeshops > 0) then {
if(count _activeshops > 0 && (random 100) > 50) then {
_shop = selectRandom _activeshops;
_dest = _shop select 0;
_dest = (_shop select 0) findEmptyPosition [3,50,OT_civType_local];
}else{
_dest = _town call OT_fnc_getRandomRoadPosition;
};
Expand Down
5 changes: 2 additions & 3 deletions addons/overthrow_main/functions/AI/NPC/fn_initCrimLeader.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ _unit setVariable ["hometown",_town,false];
[_unit, (OT_voices_local call BIS_fnc_selectRandom)] remoteExecCall ["setSpeaker", 0, _unit];
_unit forceAddUniform (OT_CRIM_Clothes call BIS_fnc_selectRandom);

private _loadout = (format["gang%1",_gangid]) call OT_fnc_getRandomLoadout;

_unit setUnitLoadout [_loadout,true];
private _gang = OT_civilians getVariable [format["gang%1",_gangid],[]];
_unit setUnitLoadout [_gang select 5,true];

if((random 100) < 50) then {
_unit addItem "OT_Ganja";
Expand Down
6 changes: 2 additions & 4 deletions addons/overthrow_main/functions/AI/NPC/fn_initCriminal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ _unit setRank "SERGEANT";
_unit setSkill 0.4 + (random 0.4);

_unit removeAllEventHandlers "FiredNear";

private _loadout = (format["gang%1",_gangid]) call OT_fnc_getRandomLoadout;

_unit setUnitLoadout [_loadout,true];
private _gang = OT_civilians getVariable [format["gang%1",_gangid],[]];
_unit setUnitLoadout [_gang select 5,true];

if((random 100) < 15) then {
_unit addItem "OT_Ganja";
Expand Down
17 changes: 2 additions & 15 deletions addons/overthrow_main/functions/AI/fn_doConversation.sqf
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
private _personOne = _this select 0;
private _personTwo = _this select 1;
private _lines = _this select 2;

private _onFinish = {};
private _params = [];

if((count _this) > 3) then {
_onFinish = _this select 3;
};

if((count _this) > 4) then {
_params = _this select 4;
};
params ["_personOne","_personTwo","_lines",["_onFinish",{}],["_params",[]]];

private _person = _personOne;
{
_person setRandomLip true;
_person globalChat _x;
sleep ceil ((count _x) * 0.08)+1;
sleep ceil ((count _x) * 0.08)+1;
_person setRandomLip false;
if(_person isEqualTo _personOne) then {
_person = _personTwo;
Expand Down
8 changes: 5 additions & 3 deletions addons/overthrow_main/functions/AI/orders/fn_squadGetOut.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
private _paras = (units _squad) - [driver _vehicle, gunner _vehicle, commander _vehicle];
private _dir = direction _vehicle;
private _chuteheight = 100;
_paras allowGetIn false;

{
spawner setvariable [format["eject_%1",[_x] call OT_fnc_getBuildID],getUnitLoadout _x,false];
removeBackpackGlobal _x;
_x disableCollisionWith _vehicle;// Sometimes units take damage when being ejected.
_x addBackpackGlobal "B_parachute";
unassignvehicle _x;
moveout _x;
unassignVehicle _x;
moveOut _x;
_x action ["Eject",_vehicle];
_x setDir (_dir + 90);// Exit the chopper at right angles.
sleep 1;
} forEach _paras;
Expand All @@ -39,7 +41,7 @@

waitUntil { !(alive _unit) || isTouchingGround _unit || (position _unit select 2) < 1 };

_unit action ["eject",_unit];
_unit action ["Eject",vehicle _unit];
sleep 1;
private _inv = name _unit;
private _id = [_unit] call OT_fnc_getBuildID;
Expand Down
5 changes: 3 additions & 2 deletions addons/overthrow_main/functions/UI/dialogs/fn_mainMenu.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ if(typename _b isEqualTo "ARRAY") then {
_txt = "";

if(_building call OT_fnc_hasOwner) then {

_owner = _building call OT_fnc_getOwner;
_ownername = players_NS getVariable format["name%1",_owner];
if(isNil "_ownername") then {_ownername = "Someone"};
Expand Down Expand Up @@ -309,7 +308,9 @@ if(typename _b isEqualTo "ARRAY") then {
};
};

if(!((typeof _building) in OT_allRealEstate + [OT_flag_IND])) then {
// Fetch the list of buildable houses
private _buildableHouses = (OT_Buildables param [9, []]) param [2, []];
if(!((typeof _building) in OT_allRealEstate + [OT_flag_IND]) and {!(typeOf _building in _buildableHouses)}) then {
ctrlEnable [1609,false];
ctrlEnable [1610,false];
ctrlEnable [1608,false];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@ private _job = [];
if(count _job > 0) then {
_job params ["_info","_markerPos"];
_info params ["_title","_desc"];
private _remains = spawner getVariable [format["OT_jobRemain%1",_id],0];
private _noexpire = spawner getVariable [format["OT_jobNoExpire%1",_id],false];

private _remainTxt = "";
if !(_noexpire) then {
private _hrs = floor (_remains / 60);
private _mins = _remains - (_hrs * 60);
_remainTxt = format["Expires in %1 hrs %2 mins",_hrs,_mins];
};

_textctrl = (findDisplay 8000) displayCtrl 1100;

_textctrl ctrlSetStructuredText parseText format["
<t align='center' size='1.1'>%1</t><br/><br/>
<t align='center' size='0.8'>%2</t><br/>
",_title,_desc];
<t align='center' size='0.8'>%2</t><br/>
<t align='center' size='0.8'>%3</t><br/>
",_title,_remainTxt,_desc];
};
5 changes: 5 additions & 0 deletions addons/overthrow_main/functions/UI/fn_notifyBad.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
["TaskFailed",["",_this]] call BIS_fnc_showNotification;
OT_notifyHistory pushback format["(%1) %2",call OT_fnc_formatTime, _this];
if(count OT_notifyHistory > 16) then {
OT_notifyHistory deleteAt 0;
};
2 changes: 1 addition & 1 deletion addons/overthrow_main/functions/actions/fn_addGarrison.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ params ["_p","_create",["_charge",true]];
private _b = _p call OT_fnc_nearestBase;
private _pos = _b select 0;
private _code = format["fob%1",_pos];
if((_pos distance player) > 30) then {
if((_pos distance player) > 100) then {
_b = _p call OT_fnc_nearestObjective;
_pos = _b select 0;
_code = _b select 1;
Expand Down
Loading

0 comments on commit f62c752

Please sign in to comment.