Skip to content

Commit

Permalink
Merge pull request #31 from jabberzac/dev
Browse files Browse the repository at this point in the history
0.5.2
  • Loading branch information
armazac authored Nov 1, 2016
2 parents f828bed + e6e0981 commit 6ac594e
Show file tree
Hide file tree
Showing 24 changed files with 187 additions and 149 deletions.
Binary file removed addons/overthrow_main.pbo
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ while {_count < _numgroups} do {
{
[_x] joinSilent _tgroup;
_x setVariable ["garrison","HQ",false];
_x setVariable ["NOAI",true,false];
}foreach(crew _veh);

{
Expand All @@ -99,7 +100,7 @@ while {_count < _numgroups} do {
_x setVariable ["garrison","HQ",false];
}foreach(units _group);

sleep 1;
sleep 2;

_moveto = [OT_NATO_HQPos,500,_dir] call SHK_pos;
_wp = _tgroup addWaypoint [_moveto,0];
Expand Down Expand Up @@ -161,25 +162,25 @@ while {_count < _numgroups} do {
_townpop = server getVariable [format["population%1",_town],0];

private ["_size","_active","_alive"];
sleep 20;
_size = count _soldiers;
_lostat = round(_size * 0.2);
_lostat = round(_size * 0.4);
_active = true;


while {_active} do {
_alive = [];
_inrange = [];
{
if(alive _x and !(_x call hasOwner)) then {
if(alive _x) then {
_alive pushback _x;
if(_x distance _attackpos < 150) then {
_inrange pushback _x;
};
};
}foreach(_soldiers);
if(count _alive <= _lostat) then {
_townpop remoteExec ["influence",0,false];
_townpop remoteExec ["influenceSilent",0,false];
format["NATO has abandoned %1 (+%2 Influence)",_town,_townpop] remoteExec ["notify_good",0,false];
[_tskid, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;
_active = false;
}else{
Expand All @@ -202,7 +203,7 @@ while {_count < _numgroups} do {
};
};
};
sleep 10;
sleep 2;
};

};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,23 +161,22 @@ if((_ao select [0,1]) in ["A","E","I","O","a","e","i","o"]) then {_an = "An"};
_tskid = _this select 3;

private ["_size","_active","_alive"];
sleep 20;
_size = count _soldiers;
_lostat = round(_size * 0.2);
_lostat = round(_size * 0.4);
_active = true;


while {_active} do {
_alive = [];
_inrange = [];
{
if(alive _x and !(_x call hasOwner)) then {
if(alive _x) then {
_alive pushback _x;
if(_x distance _attackpos < 150) then {
_inrange pushback _x;
};
};
}foreach(_soldiers);

if(count _alive <= _lostat) then {
[_tskid, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;
_active = false;
Expand Down Expand Up @@ -212,7 +211,7 @@ if((_ao select [0,1]) in ["A","E","I","O","a","e","i","o"]) then {_an = "An"};
};
};
};
sleep 10;
sleep 2;
};

};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_group = _this;


_start = getpos ((units _group) select 0);
_start = server getvariable [((units _group) select 0) getvariable "garrison",getpos ((units _group) select 0)];

_wp = _group addWaypoint [getpos (nearestbuilding _start),5];
_wp setWaypointType "MOVE";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ _pm = "";
if(_rep > -1) then {_pm = "+"};

_ctrl ctrlSetStructuredText parseText format["
<t align='left' size='1.3'>%1</t><br/>
<t align='left' size='1'>%2</t><br/>
<t align='left' size='0.7'>Standing: %3%4 (Tanoa: %5%6)</t><br/>
<t align='left' size='0.7'>Influence: %9</t><br/>
<t align='left' size='0.7'>Weather: %7 (Forecast: %8)</t>
<t align='left' size='1.2'>%1</t><br/>
<t align='left' size='0.9'>%2</t><br/>
<t align='left' size='0.65'>Standing: %3%4 (Tanoa: %5%6)</t><br/>
<t align='left' size='0.65'>Influence: %9</t><br/>
<t align='left' size='0.65'>Weather: %7 (Forecast: %8)</t>
",name player,_town,_plusmin,_standing,_pm,_rep,_weather,server getVariable "forecast",player getVariable ["influence",0]];

sleep 0.1;
Expand Down Expand Up @@ -72,8 +72,8 @@ if(typename _b == "ARRAY") then {
ctrlEnable [1610,false];

_buildingTxt = format["
<t align='left' size='0.9'>Camp</t><br/>
<t align='left' size='0.7'>Owned by %1</t>
<t align='left' size='0.8'>Camp</t><br/>
<t align='left' size='0.65'>Owned by %1</t>
",_ownername];
};
if(typeof _building == OT_item_Flag) exitWith {
Expand All @@ -83,8 +83,8 @@ if(typename _b == "ARRAY") then {
ctrlEnable [1610,false];

_buildingTxt = format["
<t align='left' size='0.9'>%1</t><br/>
<t align='left' size='0.7'>Owned by %2</t>
<t align='left' size='0.8'>%1</t><br/>
<t align='left' size='0.65'>Owned by %2</t>
",_building getVariable "name",_ownername];
};
ctrlSetText [1608,format["Sell ($%1)",[_sell, 1, 0, true] call CBA_fnc_formatNumber]];
Expand All @@ -94,9 +94,9 @@ if(typename _b == "ARRAY") then {
ctrlEnable [1610,false];
};
_buildingTxt = format["
<t align='left' size='0.9'>%1</t><br/>
<t align='left' size='0.7'>Owned by %2</t><br/>
<t align='left' size='0.7'>Lease Value: $%3/hr</t>
<t align='left' size='0.8'>%1</t><br/>
<t align='left' size='0.65'>Owned by %2</t><br/>
<t align='left' size='0.65'>Lease Value: $%3/hr</t>
",_name,_ownername,[_lease, 1, 0, true] call CBA_fnc_formatNumber];

}else{
Expand All @@ -110,19 +110,18 @@ if(typename _b == "ARRAY") then {
_name = _building getVariable "name";
};
_buildingTxt = format["
<t align='left' size='1'>%1</t><br/>
<t align='left' size='0.7'>Owned by %2</t>
<t align='left' size='0.8'>%1</t><br/>
<t align='left' size='0.65'>Owned by %2</t>
",_name,_ownername];
};
}else{
ctrlSetText [1608,format["Buy ($%1)",[_price, 1, 0, true] call CBA_fnc_formatNumber]];
ctrlEnable [1609,false];
ctrlEnable [1610,false];
_buildingTxt = format["
<t align='left' size='0.9'>%1</t><br/>
<t align='left' size='0.7'>Capacity: %2</t><br/>
<t align='left' size='0.7'>Lease Value: $%3/hr</t>
",_name,_totaloccupants,[_lease, 1, 0, true] call CBA_fnc_formatNumber];
<t align='left' size='0.8'>%1</t><br/>
<t align='left' size='0.65'>Lease Value: $%2/hr</t>
",_name,[_lease, 1, 0, true] call CBA_fnc_formatNumber];
};
}else{
ctrlEnable [1608,false];
Expand All @@ -142,11 +141,14 @@ _civtxtctrl = (findDisplay 8001) displayCtrl 1101;
{
if !(_x call hasOwner or _x == player or side _x == west or side _x == east) then {
//"self" returns true ie for shopkeepers, so double check this civ has no owner
_owner = _x getVariable "owner";
if(isNil "_owner" and _x in allunits) then {
if(isPlayer _x) then {
_possible pushBack _x;
};

}else{
_owner = _x getVariable "owner";
if(isNil "_owner" and _x in allunits) then {
_possible pushBack _x;
};
};
};
}foreach(_civs);

Expand All @@ -169,8 +171,8 @@ if(count _possible > 0) then {
_type = "Player";
};
_civTxt = format["
<t align='left' size='0.9'>%1</t><br/>
<t align='left' size='0.8'>%2</t><br/>
<t align='left' size='0.8'>%1</t><br/>
<t align='left' size='0.7'>%2</t><br/>
",_name,_type];
}else{
ctrlEnable [1605,false];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ if (_TC <= 2) then
_mags = [];
_Unit = _x;
if (_Unit isKindOf "Man") then {_mags = magazines _Unit} else {_mags = magazineCargo _Unit};
if(isNil "_mags") then {_mags = []};
{if (_x isEqualTo _CM) exitwith {[_this,_Unit] spawn VCOMAI_RearmGo;};_Stop = true;} foreach _mags;
if (_Stop) exitwith {};
} foreach _FB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ _standing = (player getVariable format['rep%1',_town]) * -1;
_idx = lbCurSel 1500;
_cls = lbData [1500,_idx];

if(isNil "_cls" or _cls == "") exitWith {};

_price = [_town,_cls,_standing] call getSellPrice;
_done = false;
_mynum = 0;

if(isNil "_price") exitWith {};

{
_c = _x select 0;
if(_c == _cls) exitWith {_mynum = _x select 1};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sleep 5;
if(_cls in OT_allMagazines) exitWith {
_veh addMagazineCargoGlobal [_cls,1];
};
if(_cls in OT_allBackpacks) exitWith {
if(_cls in OT_allBackpacks or _cls in OT_allStaticBackpacks) exitWith {
_veh addBackpackCargoGlobal [_cls,1];
};
_veh addItemCargoGlobal [_cls,1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sleep 5;
if(_cls in OT_allMagazines) exitWith {
_target addMagazineCargoGlobal [_cls,1];
};
if(_cls in OT_allBackpacks) exitWith {
if(_cls in OT_allBackpacks or _cls in OT_allStaticBackpacks) exitWith {
_target addBackpackCargoGlobal [_cls,1];
};
_target addItemCargoGlobal [_cls,1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ overviewPicture = "\overthrow_main\campaign\missions\Overthrow.Tanoa\overthrow_t
author="ARMAzac";
briefingName = "Overthrow Tanoa";
OnLoadName = "Overthrow Tanoa";
OnLoadMission = "v0.5.1 (DEV)";
OnLoadMission = "v0.5.1";
loadScreen = "\overthrow_main\campaign\missions\Overthrow.Tanoa\pic.jpg";
onLoadMissionTime = 1;
allowSubordinatesTakeWeapons= 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class OT_dialog_buildbase
// GUI EDITOR OUTPUT END
////////////////////////////////////////////////////////


}
};

Expand Down Expand Up @@ -254,26 +253,26 @@ class OT_dialog_buildtown
class RscButton_1601: RscButton
{
idc = 1601;
action = "'Walls' call build";
action = "'Workshop' call build";

text = "Walls"; //--- ToDo: Localize;
text = "Workshop"; //--- ToDo: Localize;
x = 0.0204687 * safezoneW + safezoneX;
y = 0.588 * safezoneH + safezoneY;
w = 0.0876563 * safezoneW;
h = 0.077 * safezoneH;
tooltip = "Stop people (or tanks) from getting in"; //--- ToDo: Localize;
tooltip = "Repair, rearm and modify vehicles"; //--- ToDo: Localize;
};
class RscButton_1602: RscButton
{
idc = 1602;
action = "'Observation Post' call build";
action = "'House' call build";

text = "Observation Post"; //--- ToDo: Localize;
text = "House"; //--- ToDo: Localize;
x = 0.0204687 * safezoneW + safezoneX;
y = 0.412 * safezoneH + safezoneY;
w = 0.0876563 * safezoneW;
h = 0.077 * safezoneH;
tooltip = "Provides intel about the area"; //--- ToDo: Localize;
tooltip = "4 Walls, a roof, maybe a door that opens if you're lucky."; //--- ToDo: Localize;
};
class RscButton_1603: RscButton
{
Expand All @@ -290,18 +289,20 @@ class OT_dialog_buildtown
class RscButton_1604: RscButton
{
idc = 1604;
action = "'Helipad' call build";
action = "'Fuel Station' call build";

text = "Helipad"; //--- ToDo: Localize;
text = "Fuel Station"; //--- ToDo: Localize;
x = 0.0204687 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0876563 * safezoneW;
h = 0.077 * safezoneH;
tooltip = "Apparently helicopter pilots need to be told where they are allowed to land"; //--- ToDo: Localize;
tooltip = "Refuels stuff"; //--- ToDo: Localize;
};
////////////////////////////////////////////////////////
// GUI EDITOR OUTPUT END
////////////////////////////////////////////////////////




}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class RscTitles {
x = safezoneX + (0.8 * safezoneW);
y = safezoneY + (0.15 * safezoneH);
w = 0.19 * safezoneW;
h = 0.1 * safezoneH;
h = 0.2 * safezoneH;
size = 0.055;//0.020
colorBackground[] = {0,0,0,0.2};
colorText[] = {0.34,0.33,0.33,0};//{1,1,1,1}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
_vehicle = _this select 0;
waitUntil {sleep 1;!((getpos _vehicle) call inSpawnDistance)};
waitUntil {sleep 1;(resistance knowsabout _vehicle) < 1};
{
if !(_x call hasOwner) then {
deleteVehicle _x;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
private _pos = _this;
([OT_NATOobjectives + OT_NATOcomms,[],{(_x select 0) distance _pos},"ASCEND"] call BIS_fnc_SortBy) select 0
([(server getvariable ["NATOobjectives",[]]) + (server getvariable ["NATOcomms",[]]),[],{(_x select 0) distance _pos},"ASCEND"] call BIS_fnc_SortBy) select 0
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ unitSeenNATO = compileFinal preProcessFileLineNumbers "funcs\unitSeenNATO.sqf";
wantedSystem = compileFinal preProcessFileLineNumbers "wantedSystem.sqf";
NATOsearch = compileFinal preProcessFileLineNumbers "AI\NATOsearch.sqf";

//Perk System
//Other Systems
perkSystem = compileFinal preProcessFileLineNumbers "perkSystem.sqf";
statsSystem = compileFinal preProcessFileLineNumbers "stats.sqf";
intelSystem = compileFinal preProcessFileLineNumbers "intelSystem.sqf";

//Key handler
keyHandler = compileFinal preProcessFileLineNumbers "keyHandler.sqf";
Expand Down
Loading

0 comments on commit 6ac594e

Please sign in to comment.