diff --git a/addons/overthrow_main/CfgGlasses.hpp b/addons/overthrow_main/CfgGlasses.hpp
new file mode 100644
index 00000000..f7455f3a
--- /dev/null
+++ b/addons/overthrow_main/CfgGlasses.hpp
@@ -0,0 +1,41 @@
+class CfgGlasses {
+ class None;
+
+ class murshun_cigs_cig0: None {
+ author = "Rebel / Facel";
+ mass = 0.02;
+ displayName = "Spliff";
+ model = "\ot\models\cig0.p3d";
+ picture = "\ot\ui\icons\gear_cig0_x_ca";
+ identityTypes[]={};
+ ot_shopignore = 1;
+ };
+
+ class murshun_cigs_cig1: murshun_cigs_cig0 {
+ author = "Rebel / Facel";
+ displayName = "Spliff (Stage 1)";
+ model = "\ot\models\cig1.p3d";
+ picture = "\ot\ui\icons\gear_cig1_x_ca";
+ };
+
+ class murshun_cigs_cig2: murshun_cigs_cig0 {
+ author = "Rebel / Facel";
+ displayName = "Spliff (Stage 2)";
+ model = "\ot\models\cig2.p3d";
+ picture = "\ot\ui\icons\gear_cig2_x_ca";
+ };
+
+ class murshun_cigs_cig3: murshun_cigs_cig0 {
+ author = "Rebel / Facel";
+ displayName = "Spliff (Stage 3)";
+ model = "\ot\models\cig3.p3d";
+ picture = "\ot\ui\icons\gear_cig3_x_ca";
+ };
+
+ class murshun_cigs_cig4: murshun_cigs_cig0 {
+ author = "Rebel / Facel";
+ displayName = "Spliff (Stage 4)";
+ model = "\ot\models\cig4.p3d";
+ picture = "\ot\ui\icons\gear_cig4_x_ca";
+ };
+};
diff --git a/addons/overthrow_main/CfgMarkers.hpp b/addons/overthrow_main/CfgMarkers.hpp
new file mode 100644
index 00000000..79cd228d
--- /dev/null
+++ b/addons/overthrow_main/CfgMarkers.hpp
@@ -0,0 +1,75 @@
+class CfgMarkers
+{
+ class ot_Camp
+ {
+ name = "Camp";
+ icon = "ot\ui\markers\camp.paa";
+ color[] = {1, 0, 0, 1};
+ size = 32;
+ shadow = true;
+ scope = 1;
+ };
+ class ot_Shop
+ {
+ name = "Shop";
+ icon = "ot\ui\markers\shop.paa";
+ color[] = {1, 0, 0, 1};
+ size = 32;
+ shadow = true;
+ scope = 1;
+ };
+ class ot_Police
+ {
+ name = "Police";
+ icon = "ot\ui\markers\police.paa";
+ color[] = {1, 0, 0, 1};
+ size = 32;
+ shadow = true;
+ scope = 1;
+ };
+ class ot_Anarchy
+ {
+ name = "Anarchy";
+ icon = "ot\ui\markers\anarchy.paa";
+ color[] = {1, 0, 0, 1};
+ size = 32;
+ shadow = true;
+ scope = 1;
+ };
+ class ot_Warehouse
+ {
+ name = "Warehouse";
+ icon = "ot\ui\markers\warehouse.paa";
+ color[] = {1, 0, 0, 1};
+ size = 32;
+ shadow = true;
+ scope = 1;
+ };
+ class ot_Business
+ {
+ name = "Business";
+ icon = "ot\ui\markers\business.paa";
+ color[] = {1, 0, 0, 1};
+ size = 32;
+ shadow = true;
+ scope = 1;
+ };
+ class ot_Factory
+ {
+ name = "Factory";
+ icon = "ot\ui\markers\factory.paa";
+ color[] = {1, 0, 0, 1};
+ size = 32;
+ shadow = true;
+ scope = 1;
+ };
+ class flag_Malden
+ {
+ name = "Malden";
+ icon = "ot\flags\flag_malden.paa";
+ color[] = {1, 1, 1, 1};
+ size = 32;
+ shadow = true;
+ scope = 1;
+ };
+};
diff --git a/addons/overthrow_main/CfgSounds.hpp b/addons/overthrow_main/CfgSounds.hpp
new file mode 100644
index 00000000..dbac603f
--- /dev/null
+++ b/addons/overthrow_main/CfgSounds.hpp
@@ -0,0 +1,20 @@
+class CfgSounds
+{
+ sounds[] = {};
+
+ class ot_unwrap
+ {
+ sound[] = {"\ot\sounds\murshun_cigs_unwrap.ogg", 2, 1, 15};
+ titles[] = {};
+ };
+ class murshun_cigs_matches_01
+ {
+ sound[] = {"\ot\sounds\murshun_cigs_matches_01.ogg", 2, 1, 15};
+ titles[] = {};
+ };
+ class murshun_cigs_lighter_01
+ {
+ sound[] = {"\ot\sounds\murshun_cigs_lighter_01.ogg", 2, 1, 15};
+ titles[] = {};
+ };
+};
diff --git a/addons/overthrow_main/CfgVehicles.hpp b/addons/overthrow_main/CfgVehicles.hpp
index 1fa2d3e0..472086bd 100644
--- a/addons/overthrow_main/CfgVehicles.hpp
+++ b/addons/overthrow_main/CfgVehicles.hpp
@@ -1,6 +1,11 @@
#define MACRO_SALVAGEWRECK \
class ACE_Actions { \
class ACE_MainActions { \
+ class OT_Remove { \
+ condition = "!([player] call ace_repair_fnc_isInRepairFacility) and (_target call OT_fnc_hasOwner) and ((call OT_fnc_playerIsGeneral) or (_target call OT_fnc_playerIsOwner))"; \
+ displayName = "Remove"; \
+ statement = "deleteVehicle _target"; \
+ } \
class OT_Salvage { \
condition = "((damage _target) > 0.99 and ""ToolKit"" in (items player)) or [player] call ace_repair_fnc_isInRepairFacility"; \
displayName = "Salvage"; \
@@ -60,7 +65,7 @@ class CfgVehicles {
class CAManBase: Man {
class ACE_Actions {
class OT_HeadActions {
- condition = "(!isplayer _target) and !(side _target == west)";
+ condition = "(alive _target) and (!isplayer _target) and !(side _target == west)";
selection = "pilot";
distance = 20;
displayName = "Talk";
@@ -207,6 +212,10 @@ class CfgVehicles {
};
//Shops (Malden)
+ class i_Shop_02_b_base_f : House_F {
+ ot_isShop = 1;
+ ot_template = '[]';
+ };
class Land_i_Shop_02_V3_F: House_F {
ot_isShop = 1;
ot_template = '[]';
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Malden/initVar.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Malden/initVar.sqf
index c3c0148d..67d7355e 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Malden/initVar.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Malden/initVar.sqf
@@ -9,7 +9,7 @@ OT_startCameraPos = [2717.66,7298.14,15];
OT_startCameraTarget = [3016.03,7171.53,0];
//Used to control updates and persistent save compatability. When these numbers go up, that section will be reinitialized on load if required. (ie leave them alone)
-OT_economyVersion = 1;
+OT_economyVersion = 2;
OT_NATOversion = 1;
OT_CRIMversion = 1;
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Malden/mission.sqm b/addons/overthrow_main/campaign/missions/Overthrow.Malden/mission.sqm
index 6523eab7..2bc91990 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Malden/mission.sqm
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Malden/mission.sqm
@@ -16,7 +16,7 @@ class EditorData
};
class LayerIndexProvider
{
- nextID=459;
+ nextID=464;
};
class Camera
{
@@ -507,7 +507,7 @@ class Mission
{
class Intel
{
- briefingName="Overthrow.Altis";
+ briefingName="Overthrow.Malden";
resistanceWest=0;
startWeather=0.29173625;
startWind=0;
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/data/objectives.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/data/objectives.sqf
index 7c511ffa..5e04b4b5 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/data/objectives.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/data/objectives.sqf
@@ -6,8 +6,7 @@ OT_objectiveData = [
[[3870.23,13412.4,0],"The Vehicle Range",300],
[[3939.27,13915,0],"The Camp Remnants",250],
[[3166.18,11038.8,0],"Belfort Naval Base",500],
- [[5216.9,3656.3,0],"Chemical Plant",600],
- [[7689.13,4191.38,0],"Le Port Base",300]
+ [[5216.9,3656.3,0],"Chemical Plant",600]
];
OT_NATO_HQ = "Tuvanaka Airbase";
OT_NATO_priority = ["Tuvanaka Airbase","Comms Alpha","96FM Georgetown","Comms Whiskey","Lijnhaven","Blue Pearl industrial port","Nani","Belfort","Tuvanaka"];
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initVar.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initVar.sqf
index 970dc806..b5b9718b 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initVar.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initVar.sqf
@@ -10,7 +10,7 @@ OT_startCameraTarget = [1420,535,5.8];
//Used to control updates and persistent save compatability. When these numbers go up, that section will be reinitialized on load if required. (ie leave them alone)
OT_economyVersion = 13;
-OT_NATOversion = 8;
+OT_NATOversion = 9;
OT_CRIMversion = 1;
OT_faction_NATO = "BLU_T_F";
diff --git a/addons/overthrow_main/config.cpp b/addons/overthrow_main/config.cpp
index b32b054d..40e6238d 100644
--- a/addons/overthrow_main/config.cpp
+++ b/addons/overthrow_main/config.cpp
@@ -27,7 +27,7 @@ class CfgPatches
};
requiredVersion=REQUIRED_VERSION;
VERSION_CONFIG;
- units[] = {"OT_GanjaItem","OT_BlowItem","OT_SpliffItem"};
+ units[] = {"OT_GanjaItem","OT_BlowItem"};
weapons[] = {"OT_Ganja","OT_Blow"};
};
};
@@ -122,82 +122,6 @@ class CfgMissions
};
};
-class CfgMarkers
-{
- class ot_Camp
- {
- name = "Camp";
- icon = "ot\ui\markers\camp.paa";
- color[] = {1, 0, 0, 1};
- size = 32;
- shadow = true;
- scope = 1;
- };
- class ot_Shop
- {
- name = "Shop";
- icon = "ot\ui\markers\shop.paa";
- color[] = {1, 0, 0, 1};
- size = 32;
- shadow = true;
- scope = 1;
- };
- class ot_Police
- {
- name = "Police";
- icon = "ot\ui\markers\police.paa";
- color[] = {1, 0, 0, 1};
- size = 32;
- shadow = true;
- scope = 1;
- };
- class ot_Anarchy
- {
- name = "Anarchy";
- icon = "ot\ui\markers\anarchy.paa";
- color[] = {1, 0, 0, 1};
- size = 32;
- shadow = true;
- scope = 1;
- };
- class ot_Warehouse
- {
- name = "Warehouse";
- icon = "ot\ui\markers\warehouse.paa";
- color[] = {1, 0, 0, 1};
- size = 32;
- shadow = true;
- scope = 1;
- };
- class ot_Business
- {
- name = "Business";
- icon = "ot\ui\markers\business.paa";
- color[] = {1, 0, 0, 1};
- size = 32;
- shadow = true;
- scope = 1;
- };
- class ot_Factory
- {
- name = "Factory";
- icon = "ot\ui\markers\factory.paa";
- color[] = {1, 0, 0, 1};
- size = 32;
- shadow = true;
- scope = 1;
- };
- class flag_Malden
- {
- name = "Malden";
- icon = "ot\flags\flag_malden.paa";
- color[] = {1, 1, 1, 1};
- size = 32;
- shadow = true;
- scope = 1;
- };
-};
-
class CfgWorlds
{
class Tanoa
@@ -210,68 +134,9 @@ class CfgWorlds
};
};
-class CfgGlasses {
- class None;
-
- class murshun_cigs_cig0: None {
- author = "Rebel / Facel";
- mass = 0.02;
- displayName = "Spliff";
- model = "\ot\models\cig0.p3d";
- picture = "\ot\ui\icons\gear_cig0_x_ca";
- identityTypes[]={};
- };
-
- class murshun_cigs_cig1: murshun_cigs_cig0 {
- author = "Rebel / Facel";
- displayName = "Spliff (Stage 1)";
- model = "\ot\models\cig1.p3d";
- picture = "\ot\ui\icons\gear_cig1_x_ca";
- };
-
- class murshun_cigs_cig2: murshun_cigs_cig0 {
- author = "Rebel / Facel";
- displayName = "Spliff (Stage 2)";
- model = "\ot\models\cig2.p3d";
- picture = "\ot\ui\icons\gear_cig2_x_ca";
- };
-
- class murshun_cigs_cig3: murshun_cigs_cig0 {
- author = "Rebel / Facel";
- displayName = "Spliff (Stage 3)";
- model = "\ot\models\cig3.p3d";
- picture = "\ot\ui\icons\gear_cig3_x_ca";
- };
-
- class murshun_cigs_cig4: murshun_cigs_cig0 {
- author = "Rebel / Facel";
- displayName = "Spliff (Stage 4)";
- model = "\ot\models\cig4.p3d";
- picture = "\ot\ui\icons\gear_cig4_x_ca";
- };
-};
-
-class CfgSounds
-{
- sounds[] = {};
-
- class ot_unwrap
- {
- sound[] = {"\ot\sounds\murshun_cigs_unwrap.ogg", 2, 1, 15};
- titles[] = {};
- };
- class murshun_cigs_matches_01
- {
- sound[] = {"\ot\sounds\murshun_cigs_matches_01.ogg", 2, 1, 15};
- titles[] = {};
- };
- class murshun_cigs_lighter_01
- {
- sound[] = {"\ot\sounds\murshun_cigs_lighter_01.ogg", 2, 1, 15};
- titles[] = {};
- };
-};
-
+#include "CfgMarkers.hpp"
+#include "CfgGlasses.hpp"
+#include "CfgSounds.hpp"
#include "CfgSettings.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
diff --git a/addons/overthrow_main/functions/actions/self/fn_startSpliff.sqf b/addons/overthrow_main/functions/actions/self/fn_startSpliff.sqf
index 4715b09e..773408f0 100644
--- a/addons/overthrow_main/functions/actions/self/fn_startSpliff.sqf
+++ b/addons/overthrow_main/functions/actions/self/fn_startSpliff.sqf
@@ -40,12 +40,12 @@ _unit setVariable ["ot_lastSmoke",time,false];
[_unit] spawn ot_fnc_smokeAnimation;
-player enablesimulation false;
+
sleep (3.5 + random 2);
[_unit] remoteExec ["ot_fnc_smokePuffs"];
sleep (1 + random 1);
[_unit] remoteExec ["ot_fnc_smokePuffs"];
-player enablesimulation true;
+
while ({alive _unit && _gogglesCurrent in OT_cigsArray && (_unit getVariable ["ot_isSmoking", false]) && _cigTime <= 330}) do {
_gogglesCurrent = goggles _unit;
@@ -86,4 +86,4 @@ while ({alive _unit && _gogglesCurrent in OT_cigsArray && (_unit getVariable ["o
_unit setVariable ["ot_isSmoking", false, true];
if (_cigTime >= 330) then {
removeGoggles _unit;
-};
\ No newline at end of file
+};
diff --git a/addons/overthrow_main/functions/economy/fn_initEconomyLoad.sqf b/addons/overthrow_main/functions/economy/fn_initEconomyLoad.sqf
index 8091c296..87b967cd 100644
--- a/addons/overthrow_main/functions/economy/fn_initEconomyLoad.sqf
+++ b/addons/overthrow_main/functions/economy/fn_initEconomyLoad.sqf
@@ -93,6 +93,15 @@ if(_version < OT_economyVersion) then {
diag_log "Overthrow: Economy Load Complete";
};
+//Save upgrade for existing factions > 0.7.5.1
+{
+ _x params ["_cls","_name","_side"];
+ _n = server getVariable [format["factionname%1",_cls],""];
+ if(_n == "") then {
+ server setVariable [format["factionname%1",_cls],_name,true];
+ };
+}foreach(OT_allFactions);
+
//Stability markers
{
_stability = server getVariable format["stability%1",_x];
diff --git a/addons/overthrow_main/functions/economy/fn_setupTownEconomy.sqf b/addons/overthrow_main/functions/economy/fn_setupTownEconomy.sqf
index 030c21fd..ea8ee458 100644
--- a/addons/overthrow_main/functions/economy/fn_setupTownEconomy.sqf
+++ b/addons/overthrow_main/functions/economy/fn_setupTownEconomy.sqf
@@ -27,28 +27,45 @@ server setVariable [format["activehardwarein%1",_town],_activeHardware,true];
private _chance = 100; //Chance that a shop will be a shop
private _shops = nearestObjects [_posTown, OT_shops, _dist,false];
-if(count _shops > 15) then {_chance = 50};
-if(count _shops > 30) then {_chance = 30};
-if(count _shops > 50) then {_chance = 20};
-if(count _shops > 100) then {_chance = 10};
-
-//Find shop buildings and distribute categories to them
-{
- private _pos = getpos _x;
- //Ensure shops are not found twice (overlapping town search radius)
- if (!(_pos in OT_allShops) and (random 100 < _chance)) then {
- _category = "General";
- _rnd = random 100;
- call {
- if(_rnd > 90) exitWith {_category = "Surplus"};
- if(_rnd > 80) exitWith {_category = "Electronics"};
- if(_rnd > 60) exitWith {_category = "Pharmacy"};
- if(_rnd > 40) exitWith {_category = "Clothing"};
+if(count _shops > (count OT_itemCategoryDefinitions)-1) then {
+ //More shops than there are definitions in this town, so make sure one of each is spawned
+ {
+ _category = _x select 0;
+ if(_category != "Hardware") then {
+ _x = objNull;
+ _c = 0;
+ _pos = [];
+ while {_c < 10} do{
+ _x = selectRandom _shops;
+ _pos = getpos _x;
+ if !(_pos in OT_allShops) exitWith {};
+ _c = _c + 1;
+ };
+ if(_c < 10) then {
+ _activeShops pushback [_pos,_category];
+ OT_allShops pushback _pos;
+ };
};
- _activeShops pushback [_pos,_category];
- OT_allShops pushback _pos;
- };
-}foreach(_shops);
+ }foreach(OT_itemCategoryDefinitions);
+}else{
+ //Find shop buildings and distribute categories to them
+ {
+ private _pos = getpos _x;
+ //Ensure shops are not found twice (overlapping town search radius)
+ if (!(_pos in OT_allShops) and (random 100 < _chance)) then {
+ _category = "General";
+ _rnd = random 100;
+ call {
+ if(_rnd > 90) exitWith {_category = "Surplus"};
+ if(_rnd > 80) exitWith {_category = "Electronics"};
+ if(_rnd > 60) exitWith {_category = "Pharmacy"};
+ if(_rnd > 40) exitWith {_category = "Clothing"};
+ };
+ _activeShops pushback [_pos,_category];
+ OT_allShops pushback _pos;
+ };
+ }foreach(_shops);
+};
server setVariable [format["activeshopsin%1",_town],_activeShops,true];
diff --git a/addons/overthrow_main/functions/fn_getOwner.sqf b/addons/overthrow_main/functions/fn_getOwner.sqf
index 6533f4f4..dd79dbb9 100644
--- a/addons/overthrow_main/functions/fn_getOwner.sqf
+++ b/addons/overthrow_main/functions/fn_getOwner.sqf
@@ -1,8 +1,11 @@
if(typename _this == "SCALAR") exitWith {
owners getVariable [str _this,nil];
};
+if(typename _this == "STRING") exitWith {
+ owners getVariable [_this,nil];
+};
if((getObjectType _this) != 8 and (_this isKindOf "Building")) exitWith {
_id = [_this] call OT_fnc_getBuildID;
- owners getVariable [str _id,nil];
+ owners getVariable [_id,nil];
};
_this getVariable ["owner",nil];
diff --git a/addons/overthrow_main/functions/fn_initVar.sqf b/addons/overthrow_main/functions/fn_initVar.sqf
index bd16cb62..043b63b8 100644
--- a/addons/overthrow_main/functions/fn_initVar.sqf
+++ b/addons/overthrow_main/functions/fn_initVar.sqf
@@ -4,6 +4,8 @@
[] execVM "\ot\functions\geography\SHK_pos\shk_pos_init.sqf";
+OT_ACEremoveAction = ["OT_Remove","Remove","",{deleteVehicle _target;},{(call OT_fnc_playerIsGeneral) or (_target call OT_fnc_playerIsOwner)},{},[], [0,0,0], 10] call ace_interact_menu_fnc_createAction;
+
//Find markers
OT_ferryDestinations = [];
OT_NATO_control = [];
@@ -426,28 +428,31 @@ OT_allGoggles = [];
_name = configName _x;
_title = getText (_x >> "displayname");
_m = getNumber(_x >> "mass");
- if((_name find "Balaclava_TI_") > -1) then {
- _m = _m * 2;
- };
+ _ignore = getNumber(_x >> "ot_shopignore");
+ if(_ignore != 1) then {
+ if((_name find "Balaclava_TI_") > -1) then {
+ _m = _m * 2;
+ };
- _protection = getNumber(_x >> "ACE_Protection");
- if(_protection > 0) then {
- _m = round(_m * 1.5);
- };
+ _protection = getNumber(_x >> "ACE_Protection");
+ if(_protection > 0) then {
+ _m = round(_m * 1.5);
+ };
- call {
- if(_name == "None") exitWith {};
- if(_name == "G_Goggles_VR") exitWith {};
- if((_title find "Tactical") > -1 or (_title find "Diving") > -1 or (_title find "Goggles") > -1) exitWith {
- OT_allGoggles pushback _name;
+ call {
+ if(_name == "None") exitWith {};
+ if(_name == "G_Goggles_VR") exitWith {};
+ if((_title find "Tactical") > -1 or (_title find "Diving") > -1 or (_title find "Goggles") > -1) exitWith {
+ OT_allGoggles pushback _name;
+ };
+ if((_title find "Balaclava") > -1 or (_title find "Bandana") > -1) exitWith {
+ OT_allFacewear pushback _name;
+ };
+ OT_allGlasses pushback _name;
};
- if((_title find "Balaclava") > -1 or (_title find "Bandana") > -1) exitWith {
- OT_allFacewear pushback _name;
+ if(isServer and _name != "None") then {
+ cost setVariable [_name,[_m*3,0,0,ceil(_m*0.5)],true];
};
- OT_allGlasses pushback _name;
- };
- if(isServer and _name != "None") then {
- cost setVariable [_name,[_m*3,0,0,ceil(_m*0.5)],true];
};
}foreach(_allGlasses);
diff --git a/addons/overthrow_main/functions/fn_setOwner.sqf b/addons/overthrow_main/functions/fn_setOwner.sqf
index f7ff88ba..5efcbca7 100644
--- a/addons/overthrow_main/functions/fn_setOwner.sqf
+++ b/addons/overthrow_main/functions/fn_setOwner.sqf
@@ -2,6 +2,9 @@ params ["_obj","_owner"];
if(typename _obj == "SCALAR") exitWith {
owners setVariable [str _obj,_owner,true];
};
+if(typename _obj == "STRING") exitWith {
+ owners setVariable [_obj,_owner,true];
+};
if(typename _obj != "OBJECT") exitWith {};
if((getObjectType _obj) != 8 and (_obj isKindOf "Building")) exitWith {
_id = [_obj] call OT_fnc_getBuildID;
diff --git a/addons/overthrow_main/functions/integration/fn_detectItems.sqf b/addons/overthrow_main/functions/integration/fn_detectItems.sqf
index c75c975c..be8ec3cf 100644
--- a/addons/overthrow_main/functions/integration/fn_detectItems.sqf
+++ b/addons/overthrow_main/functions/integration/fn_detectItems.sqf
@@ -1,5 +1,5 @@
OT_itemCategoryDefinitions = [
- ["General",["Bandage (Basic)","Banana","Map","Toolkit","Compass","Earplugs"]],
+ ["General",["Bandage (Basic)","Banana","Map","Toolkit","Compass","Earplugs","Watch","Radio","Compass"]],
["Pharmacy",["Bandage","autoinjector","IV","Bodybag","Dressing","Earplugs"]],
["Electronics",["Rangefinder","Cellphone","Radio","Watch","GPS","monitor","DAGR","Battery"]],
["Hardware",["Tool","Cable Tie","paint","Wirecutter"]],
diff --git a/addons/overthrow_main/functions/interaction/fn_initObjectLocal.sqf b/addons/overthrow_main/functions/interaction/fn_initObjectLocal.sqf
index 4e78d231..919c78c9 100644
--- a/addons/overthrow_main/functions/interaction/fn_initObjectLocal.sqf
+++ b/addons/overthrow_main/functions/interaction/fn_initObjectLocal.sqf
@@ -61,4 +61,6 @@ if(OT_hasACE) then {
_dir = 90;
};
[_this, true, [0, 2, 0.4],_dir] call ace_dragging_fnc_setCarryable;
+
+ [_this, 0, ["ACE_MainActions"], OT_ACEremoveAction] call ace_interact_menu_fnc_addActionToObject;
};
diff --git a/addons/overthrow_main/functions/player/fn_playerIsOwner.sqf b/addons/overthrow_main/functions/player/fn_playerIsOwner.sqf
index fe6c28f1..39014e87 100644
--- a/addons/overthrow_main/functions/player/fn_playerIsOwner.sqf
+++ b/addons/overthrow_main/functions/player/fn_playerIsOwner.sqf
@@ -1 +1,3 @@
-(_this call OT_fnc_getOwner) == (getplayeruid player)
+private _owner = (_this call OT_fnc_getOwner);
+if(isNil "_owner") exitWith {false};
+_owner == (getplayeruid player)
diff --git a/addons/overthrow_main/functions/save/fn_loadGame.sqf b/addons/overthrow_main/functions/save/fn_loadGame.sqf
index 6f4760de..06526dc9 100644
--- a/addons/overthrow_main/functions/save/fn_loadGame.sqf
+++ b/addons/overthrow_main/functions/save/fn_loadGame.sqf
@@ -294,24 +294,21 @@ private _built = (allMissionObjects "Static");
[_bdg,_uid] call OT_fnc_setOwner;
};
}else{
- //new save with IDs
- if (typename _x == "SCALAR") then {
- [_x,_uid] call OT_fnc_setOwner;
+ [_x,_uid] call OT_fnc_setOwner;
- _pos = buildingpositions getVariable [str _x,[]];
- _bdg = objNull;
- if(count _pos == 0) then {
- _bdg = OT_centerPos nearestObject parseNumber _x;
- buildingpositions setVariable [_x,position _bdg,true];
- }else{
- _bdg = _pos nearestObject _x;
- };
- if !(_bdg in _built) then {
- _bdg addEventHandler ["Dammaged",OT_fnc_buildingDamagedHandler];
- };
- if(_x in _leased) then {
- _leasedata pushback [_x,typeof _bdg,_pos,_pos call OT_fnc_nearestTown];
- };
+ _pos = buildingpositions getVariable [_x,[]];
+ _bdg = objNull;
+ if(count _pos == 0) then {
+ _bdg = OT_centerPos nearestObject parseNumber _x;
+ buildingpositions setVariable [_x,position _bdg,true];
+ }else{
+ _bdg = _pos nearestObject _x;
+ };
+ if !(_bdg in _built) then {
+ _bdg addEventHandler ["Dammaged",OT_fnc_buildingDamagedHandler];
+ };
+ if(_x in _leased) then {
+ _leasedata pushback [_x,typeof _bdg,_pos,_pos call OT_fnc_nearestTown];
};
};
}foreach(_val);
diff --git a/addons/overthrow_main/functions/save/fn_saveGame.sqf b/addons/overthrow_main/functions/save/fn_saveGame.sqf
index 312aee0a..cd0c3007 100644
--- a/addons/overthrow_main/functions/save/fn_saveGame.sqf
+++ b/addons/overthrow_main/functions/save/fn_saveGame.sqf
@@ -3,13 +3,13 @@ if(count _this > 0) then {_quiet = _this select 0};
if(OT_saving) exitWith {
if !(_quiet) then {
- "Please wait, save still in progress" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Please wait, save still in progress" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
};
if((count alldeadmen) > 300) exitWith {
if !(_quiet) then {
- "Too many dead bodies, please clean first" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Too many dead bodies, please clean first" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
};
@@ -17,12 +17,12 @@ OT_saving = true;
publicVariable "OT_saving";
if !(_quiet) then {
- "Persistent Saving..." remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Persistent Saving..." remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
sleep 0.2;
waitUntil {!isNil "OT_NATOInitDone"};
if !(_quiet) then {
- "Step 1/10 - Saving game state" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 1/11 - Saving game state" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
private _data = [];
//get all server data
@@ -46,7 +46,7 @@ private _data = [];
};
}foreach(allVariables server);
if !(_quiet) then {
- "Step 2/10 - Saving buildings" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 2/11 - Saving buildings" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
_poses = [];
{
@@ -54,7 +54,7 @@ _poses = [];
}foreach(allVariables buildingpositions);
_data pushback ["buildingpositions",_poses];
if !(_quiet) then {
- "Step 3/10 - Saving civilians" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 3/11 - Saving civilians" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
_civs = [];
{
@@ -63,7 +63,7 @@ _civs = [];
_data pushback ["civilians",_civs];
if !(_quiet) then {
- "Step 4/10 - Saving player data" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 4/11 - Saving player data" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
//get all online player data
{
@@ -89,7 +89,7 @@ if !(_quiet) then {
private _tocheck = (allMissionObjects "Static") + vehicles;
private _tosave = count _tocheck;
if !(_quiet) then {
- format["Step 5/10 - Saving vehicles (%1 to save)",_tosave] remoteExec ["OT_fnc_notifyAndLog",0,false];
+ format["Step 5/11 - Saving vehicles (%1 to save)",_tosave] remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
private _vehicles = [];
@@ -135,7 +135,7 @@ private _saved = 0;
};
if(_count > 200) then {
if !(_quiet) then {
- format["Step 5/10 - Saving vehicles (%1 to save)",_tosave - _saved] remoteExec ["OT_fnc_notifyAndLog",0,false];
+ format["Step 5/11 - Saving vehicles (%1 to save)",_tosave - _saved] remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
_count = 0;
sleep 0.2;
@@ -148,7 +148,7 @@ sleep 0.2;
_data pushback ["vehicles",_vehicles];
if !(_quiet) then {
- "Step 6/10 - Saving warehouse" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 6/11 - Saving warehouse" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
private _warehouse = [];
{
@@ -159,7 +159,7 @@ private _warehouse = [];
}foreach(allvariables warehouse);
_data pushback ["warehouse",_warehouse];
if !(_quiet) then {
- "Step 7/10 - Saving recruits" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 7/11 - Saving recruits" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
private _recruits = [];
{
@@ -188,7 +188,7 @@ private _recruits = [];
_data pushback ["recruits",_recruits];
if !(_quiet) then {
- "Step 7/10 - Saving squads" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 8/11 - Saving squads" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
private _squads = [];
{
@@ -211,7 +211,7 @@ private _squads = [];
_data pushback ["squads",_squads];
if !(_quiet) then {
- "Step 8/10 - Saving bases" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 9/11 - Saving bases" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
{
_pos = _x select 0;
@@ -240,7 +240,7 @@ if !(_quiet) then {
};
}foreach(server getVariable ["bases",[]]);
if !(_quiet) then {
- "Step 9/10 - Saving garrisons" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 10/11 - Saving garrisons" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
{
_pos = server getvariable _x;
@@ -271,7 +271,7 @@ if !(_quiet) then {
_data pushback ["timedate",date];
if !(_quiet) then {
- "Step 10/10 - Saving loadouts" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Step 11/11 - Saving loadouts" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
{
_data pushback [format["loadout%1",getplayeruid _x],getUnitLoadout _x];
@@ -280,14 +280,14 @@ if !(_quiet) then {
profileNameSpace setVariable [OT_saveName,_data];
if (isDedicated) then {
if !(_quiet) then {
- "Saving to dedicated server.. not long now" remoteExec ["OT_fnc_notifyAndLog",0,false];;
+ "Saving to dedicated server.. not long now" remoteExecCall ["OT_fnc_notifyAndLog",0,false];;
};
sleep 0.01;
saveProfileNamespace
};
if !(_quiet) then {
- "Persistent Save Completed" remoteExec ["OT_fnc_notifyAndLog",0,false];
+ "Persistent Save Completed" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
OT_saving = false;
diff --git a/addons/overthrow_main/missions/factionweapons.sqf b/addons/overthrow_main/missions/factionweapons.sqf
index bdd57c82..197de4b5 100644
--- a/addons/overthrow_main/missions/factionweapons.sqf
+++ b/addons/overthrow_main/missions/factionweapons.sqf
@@ -25,7 +25,7 @@ private _markerPos = _destination;
private _factionName = server getvariable format["factionname%1",_faction];
//Build a mission description and title
-_description = format["%1 requests %2 x %3. Deliver them to the marked location using any vehicle, just pull up with the weapons in the inventory and you will be paid for them.
Reward: +1 (%1), export value of weapons",_factionName,_numitems,_itemName];
+_description = format["%1 requests %2 x %3. Deliver them to the marked location using any vehicle, just pull up with the weapons in the inventory and you will be paid for them, including any extras of the same type.
Reward: +1 (%1), export value of weapons",_factionName,_numitems,_itemName];
_title = format["%1 requests %2 x %3",_factionName,_numitems,_itemName];
//The data below is what is returned to the gun dealer/faction rep, _markerPos is where to put the mission marker, the code in {} brackets is the actual mission code, only run if the player accepts
@@ -45,6 +45,7 @@ _title = format["%1 requests %2 x %3",_factionName,_numitems,_itemName];
if((_x call OT_fnc_hasOwner) and (speed _x) < 0.1) exitWith {
{
_x params ["_cls","_amt"];
+ _cls = _cls call BIS_fnc_baseWeapon;
if(_cls == _itemcls) then {
_numavailable = _numavailable + _amt;
_driver = driver _c;
@@ -67,16 +68,18 @@ _title = format["%1 requests %2 x %3",_factionName,_numitems,_itemName];
if((_x call OT_fnc_hasOwner) and (speed _x) < 0.1) then {
{
_x params ["_cls","_amt"];
- if(_cls == _itemcls) then {
+ _basecls = _cls call BIS_fnc_baseWeapon;
+ if(_basecls == _itemcls) then {
_driver = driver _c;
- [_c, _cls, _numitems] call CBA_fnc_removeWeaponCargo;
+ [_c, _cls, _amt] call CBA_fnc_removeWeaponCargo;
+ _numavailable = _numavailable + _amt;
};
}foreach(_c call OT_fnc_unitStock);
};
}foreach(_destination nearObjects ["AllVehicles", 30]);
//apply standing and pay money
- _topay = ([OT_nation,_itemcls,0] call OT_fnc_getSellPrice) * _numitems;
+ _topay = ([OT_nation,_itemcls,0] call OT_fnc_getSellPrice) * _numavailable;
[_topay,format["Delivered %1 x %2 (+1 %3)",_numitems,_itemcls call OT_fnc_weaponGetName,server getvariable format["factionname%1",_faction]]] remoteExec ["OT_fnc_money",_driver,false];
server setVariable [format["standing%1",_faction],(server getVariable [format["standing%1",_faction],0]) + 1,true];
};
diff --git a/addons/overthrow_main/script_version.hpp b/addons/overthrow_main/script_version.hpp
index 8da15e40..bc15ed06 100644
--- a/addons/overthrow_main/script_version.hpp
+++ b/addons/overthrow_main/script_version.hpp
@@ -19,4 +19,4 @@
#define MAJOR 0
#define MINOR 7
#define PATCHLVL 5
-#define BUILD 0
+#define BUILD 1
diff --git a/mod.cpp b/mod.cpp
index ffecdf47..6c09815f 100644
--- a/mod.cpp
+++ b/mod.cpp
@@ -1,10 +1,10 @@
-name = "Overthrow 0.7.5.0"; //This name will be displayed only in game , specifically the expansion menu
+name = "Overthrow 0.7.5.1"; //This name will be displayed only in game , specifically the expansion menu
picture = "logo_overthrow.paa"; //Location of your addon's icon
logo = "logo_overthrow.paa";
logoOver = "logo_overthrow.paa";
actionName = "Website"; //The name of the action
action = "http://armaoverthrow.com/"; //The action , "Authors Website Link"
-description = "Overthrow - Version 0.7.5.0"; // Addon Description
+description = "Overthrow - Version 0.7.5.1"; // Addon Description
overview = "A Revolution Simulator for Arma 3";
author = "ARMAzac";
overviewPicture = "logo_overthrow.paa";