Compare commits
No commits in common. "ca8fad855a0d218035f60099f7d505c61f8f9f9f" and "8f33123e1d0e7babfb791b1749588205dcf1d39d" have entirely different histories.
ca8fad855a
...
8f33123e1d
@ -27,7 +27,8 @@ if (_nameSpace == "mission") then {
|
||||
if (!isNil "_companyState") then {
|
||||
companyFunds = _companyState getOrDefault ["funds", 0];
|
||||
companyRating = _companyState getOrDefault ["rating", 0];
|
||||
companyShareholders = _companyState getOrDefault ["operations", []];
|
||||
companyGenerals = _companyState getOrDefault ["operations", []];
|
||||
companyGarageUnlocks = _companyState getOrDefault ["garage_unlocks", []];
|
||||
};
|
||||
|
||||
true
|
@ -18,14 +18,18 @@ params [["_nameSpace", "mission", [""]]];
|
||||
|
||||
if (isNil "companyFunds") then { companyFunds = 0 };
|
||||
if (isNil "companyRating") then { companyRating = 0 };
|
||||
if (isNil "companyShareholders") then { companyShareholders = [] };
|
||||
if (isNil "companyGenerals") then { companyGenerals = [] };
|
||||
if (isNil "companyGarageUnlocks") then { companyGarageUnlocks = [] };
|
||||
|
||||
private _default_armory_unlocks = [[],[],[],[]];
|
||||
private _default_garage_unlocks = [[],[],[],[],[],[]];
|
||||
|
||||
private _companyState = createHashMapFromArray [
|
||||
["key", "CompanyState"],
|
||||
["funds", companyFunds],
|
||||
["rating", companyRating],
|
||||
["operations", companyShareholders]
|
||||
["operations", companyGenerals],
|
||||
["garage_unlocks", companyGarageUnlocks]
|
||||
];
|
||||
|
||||
if (_nameSpace == "mission") then {
|
||||
|
@ -8,7 +8,7 @@ switch (_condition) do {
|
||||
"CompanyState",
|
||||
"funds", [companyFunds],
|
||||
"rating", [companyRating],
|
||||
"operations", [companyShareholders],
|
||||
"operations", [companyGenerals],
|
||||
"garage_unlocks", [companyGarageUnlocks]
|
||||
];
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
_data = _this;
|
||||
|
||||
if (_data isEqualTo [""]) then {
|
||||
companyShareholders = (configFile >> "CfgPatches" >> "forge_server_main" >> "companyShareholders") call BFUNC(getCfgData);
|
||||
publicVariable "companyShareholders";
|
||||
companyGenerals = (configFile >> "CfgPatches" >> "forge_server_main" >> "companyGenerals") call BFUNC(getCfgData);
|
||||
publicVariable "companyGenerals";
|
||||
|
||||
companyFunds = "OP_BUDGET" call BFUNC(getParamValue);
|
||||
publicVariable "companyFunds";
|
||||
@ -12,6 +12,9 @@ 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);
|
||||
|
||||
@ -29,7 +32,8 @@ if (_data isEqualTo [""]) then {
|
||||
switch (_key) do {
|
||||
case "funds": { companyFunds = _value; publicVariable "companyFunds" };
|
||||
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" };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -13,7 +13,7 @@ class CfgPatches {
|
||||
|
||||
serverSaveLoop = 0;
|
||||
serverSaveLoopTime = 30;
|
||||
companyShareholders[] = {"76561198027566824"};
|
||||
companyGenerals[] = {"76561198027566824"};
|
||||
AISkill = 0.8;
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user