diff --git a/addons/db/functions/fnc_loadGameState.sqf b/addons/db/functions/fnc_loadGameState.sqf index ddbf75b..50b7f77 100644 --- a/addons/db/functions/fnc_loadGameState.sqf +++ b/addons/db/functions/fnc_loadGameState.sqf @@ -27,8 +27,7 @@ if (_nameSpace == "mission") then { if (!isNil "_companyState") then { companyFunds = _companyState getOrDefault ["funds", 0]; companyRating = _companyState getOrDefault ["rating", 0]; - companyGenerals = _companyState getOrDefault ["operations", []]; - companyGarageUnlocks = _companyState getOrDefault ["garage_unlocks", []]; + companyShareholders = _companyState getOrDefault ["operations", []]; }; true \ No newline at end of file diff --git a/addons/db/functions/fnc_saveGameState.sqf b/addons/db/functions/fnc_saveGameState.sqf index 966e885..eec1dda 100644 --- a/addons/db/functions/fnc_saveGameState.sqf +++ b/addons/db/functions/fnc_saveGameState.sqf @@ -18,18 +18,14 @@ params [["_nameSpace", "mission", [""]]]; if (isNil "companyFunds") then { companyFunds = 0 }; if (isNil "companyRating") then { companyRating = 0 }; -if (isNil "companyGenerals") then { companyGenerals = [] }; +if (isNil "companyShareholders") then { companyShareholders = [] }; if (isNil "companyGarageUnlocks") then { companyGarageUnlocks = [] }; -private _default_armory_unlocks = [[],[],[],[]]; -private _default_garage_unlocks = [[],[],[],[],[],[]]; - private _companyState = createHashMapFromArray [ ["key", "CompanyState"], ["funds", companyFunds], ["rating", companyRating], - ["operations", companyGenerals], - ["garage_unlocks", companyGarageUnlocks] + ["operations", companyShareholders] ]; if (_nameSpace == "mission") then { diff --git a/addons/init/functions/fnc_handleServerState.sqf b/addons/init/functions/fnc_handleServerState.sqf index 8c5eb00..77001ef 100644 --- a/addons/init/functions/fnc_handleServerState.sqf +++ b/addons/init/functions/fnc_handleServerState.sqf @@ -8,7 +8,7 @@ switch (_condition) do { "CompanyState", "funds", [companyFunds], "rating", [companyRating], - "operations", [companyGenerals], + "operations", [companyShareholders], "garage_unlocks", [companyGarageUnlocks] ]; diff --git a/addons/init/functions/fnc_handleServerStateLoad.sqf b/addons/init/functions/fnc_handleServerStateLoad.sqf index baeab43..f309997 100644 --- a/addons/init/functions/fnc_handleServerStateLoad.sqf +++ b/addons/init/functions/fnc_handleServerStateLoad.sqf @@ -3,8 +3,8 @@ _data = _this; if (_data isEqualTo [""]) then { - companyGenerals = (configFile >> "CfgPatches" >> "forge_server_main" >> "companyGenerals") call BFUNC(getCfgData); - publicVariable "companyGenerals"; + companyShareholders = (configFile >> "CfgPatches" >> "forge_server_main" >> "companyShareholders") call BFUNC(getCfgData); + publicVariable "companyShareholders"; companyFunds = "OP_BUDGET" call BFUNC(getParamValue); publicVariable "companyFunds"; @@ -12,9 +12,6 @@ if (_data isEqualTo [""]) then { companyRating = "OP_RATING" call BFUNC(getParamValue); publicVariable "companyRating"; - companyGarageUnlocks = [[],[],[],[],[],[]]; - publicVariable "companyGarageUnlocks"; - diag_log "No Server Entry Found!"; ["save"] call FUNC(handleServerState); @@ -32,8 +29,7 @@ if (_data isEqualTo [""]) then { switch (_key) do { case "funds": { companyFunds = _value; publicVariable "companyFunds" }; case "rating": { companyRating = _value; publicVariable "companyRating" }; - case "operations": { companyGenerals = _value; publicVariable "companyGenerals" }; - case "garage_unlocks": { companyGarageUnlocks = _value; publicVariable "companyGarageUnlocks" }; + case "operations": { companyShareholders = _value; publicVariable "companyShareholders" }; }; }; diff --git a/addons/main/config.cpp b/addons/main/config.cpp index 86128d2..badaf60 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -13,7 +13,7 @@ class CfgPatches { serverSaveLoop = 0; serverSaveLoopTime = 30; - companyGenerals[] = {"76561198027566824"}; + companyShareholders[] = {"76561198027566824"}; AISkill = 0.8; }; };