Compare commits

..

No commits in common. "ca8fad855a0d218035f60099f7d505c61f8f9f9f" and "8f33123e1d0e7babfb791b1749588205dcf1d39d" have entirely different histories.

5 changed files with 17 additions and 8 deletions

View File

@ -27,7 +27,8 @@ if (_nameSpace == "mission") then {
if (!isNil "_companyState") then { if (!isNil "_companyState") then {
companyFunds = _companyState getOrDefault ["funds", 0]; companyFunds = _companyState getOrDefault ["funds", 0];
companyRating = _companyState getOrDefault ["rating", 0]; companyRating = _companyState getOrDefault ["rating", 0];
companyShareholders = _companyState getOrDefault ["operations", []]; companyGenerals = _companyState getOrDefault ["operations", []];
companyGarageUnlocks = _companyState getOrDefault ["garage_unlocks", []];
}; };
true true

View File

@ -18,14 +18,18 @@ params [["_nameSpace", "mission", [""]]];
if (isNil "companyFunds") then { companyFunds = 0 }; if (isNil "companyFunds") then { companyFunds = 0 };
if (isNil "companyRating") then { companyRating = 0 }; if (isNil "companyRating") then { companyRating = 0 };
if (isNil "companyShareholders") then { companyShareholders = [] }; if (isNil "companyGenerals") then { companyGenerals = [] };
if (isNil "companyGarageUnlocks") then { companyGarageUnlocks = [] }; if (isNil "companyGarageUnlocks") then { companyGarageUnlocks = [] };
private _default_armory_unlocks = [[],[],[],[]];
private _default_garage_unlocks = [[],[],[],[],[],[]];
private _companyState = createHashMapFromArray [ private _companyState = createHashMapFromArray [
["key", "CompanyState"], ["key", "CompanyState"],
["funds", companyFunds], ["funds", companyFunds],
["rating", companyRating], ["rating", companyRating],
["operations", companyShareholders] ["operations", companyGenerals],
["garage_unlocks", companyGarageUnlocks]
]; ];
if (_nameSpace == "mission") then { if (_nameSpace == "mission") then {

View File

@ -8,7 +8,7 @@ switch (_condition) do {
"CompanyState", "CompanyState",
"funds", [companyFunds], "funds", [companyFunds],
"rating", [companyRating], "rating", [companyRating],
"operations", [companyShareholders], "operations", [companyGenerals],
"garage_unlocks", [companyGarageUnlocks] "garage_unlocks", [companyGarageUnlocks]
]; ];

View File

@ -3,8 +3,8 @@
_data = _this; _data = _this;
if (_data isEqualTo [""]) then { if (_data isEqualTo [""]) then {
companyShareholders = (configFile >> "CfgPatches" >> "forge_server_main" >> "companyShareholders") call BFUNC(getCfgData); companyGenerals = (configFile >> "CfgPatches" >> "forge_server_main" >> "companyGenerals") call BFUNC(getCfgData);
publicVariable "companyShareholders"; publicVariable "companyGenerals";
companyFunds = "OP_BUDGET" call BFUNC(getParamValue); companyFunds = "OP_BUDGET" call BFUNC(getParamValue);
publicVariable "companyFunds"; publicVariable "companyFunds";
@ -12,6 +12,9 @@ if (_data isEqualTo [""]) then {
companyRating = "OP_RATING" call BFUNC(getParamValue); companyRating = "OP_RATING" call BFUNC(getParamValue);
publicVariable "companyRating"; publicVariable "companyRating";
companyGarageUnlocks = [[],[],[],[],[],[]];
publicVariable "companyGarageUnlocks";
diag_log "No Server Entry Found!"; diag_log "No Server Entry Found!";
["save"] call FUNC(handleServerState); ["save"] call FUNC(handleServerState);
@ -29,7 +32,8 @@ if (_data isEqualTo [""]) then {
switch (_key) do { switch (_key) do {
case "funds": { companyFunds = _value; publicVariable "companyFunds" }; case "funds": { companyFunds = _value; publicVariable "companyFunds" };
case "rating": { companyRating = _value; publicVariable "companyRating" }; case "rating": { companyRating = _value; publicVariable "companyRating" };
case "operations": { companyShareholders = _value; publicVariable "companyShareholders" }; case "operations": { companyGenerals = _value; publicVariable "companyGenerals" };
case "garage_unlocks": { companyGarageUnlocks = _value; publicVariable "companyGarageUnlocks" };
}; };
}; };

View File

@ -13,7 +13,7 @@ class CfgPatches {
serverSaveLoop = 0; serverSaveLoop = 0;
serverSaveLoopTime = 30; serverSaveLoopTime = 30;
companyShareholders[] = {"76561198027566824"}; companyGenerals[] = {"76561198027566824"};
AISkill = 0.8; AISkill = 0.8;
}; };
}; };