Compare commits
2 Commits
8f33123e1d
...
ca8fad855a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ca8fad855a | ||
![]() |
257a62acc0 |
@ -27,8 +27,7 @@ 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];
|
||||||
companyGenerals = _companyState getOrDefault ["operations", []];
|
companyShareholders = _companyState getOrDefault ["operations", []];
|
||||||
companyGarageUnlocks = _companyState getOrDefault ["garage_unlocks", []];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
true
|
true
|
@ -18,18 +18,14 @@ 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 "companyGenerals") then { companyGenerals = [] };
|
if (isNil "companyShareholders") then { companyShareholders = [] };
|
||||||
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", companyGenerals],
|
["operations", companyShareholders]
|
||||||
["garage_unlocks", companyGarageUnlocks]
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if (_nameSpace == "mission") then {
|
if (_nameSpace == "mission") then {
|
||||||
|
@ -8,7 +8,7 @@ switch (_condition) do {
|
|||||||
"CompanyState",
|
"CompanyState",
|
||||||
"funds", [companyFunds],
|
"funds", [companyFunds],
|
||||||
"rating", [companyRating],
|
"rating", [companyRating],
|
||||||
"operations", [companyGenerals],
|
"operations", [companyShareholders],
|
||||||
"garage_unlocks", [companyGarageUnlocks]
|
"garage_unlocks", [companyGarageUnlocks]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
_data = _this;
|
_data = _this;
|
||||||
|
|
||||||
if (_data isEqualTo [""]) then {
|
if (_data isEqualTo [""]) then {
|
||||||
companyGenerals = (configFile >> "CfgPatches" >> "forge_server_main" >> "companyGenerals") call BFUNC(getCfgData);
|
companyShareholders = (configFile >> "CfgPatches" >> "forge_server_main" >> "companyShareholders") call BFUNC(getCfgData);
|
||||||
publicVariable "companyGenerals";
|
publicVariable "companyShareholders";
|
||||||
|
|
||||||
companyFunds = "OP_BUDGET" call BFUNC(getParamValue);
|
companyFunds = "OP_BUDGET" call BFUNC(getParamValue);
|
||||||
publicVariable "companyFunds";
|
publicVariable "companyFunds";
|
||||||
@ -12,9 +12,6 @@ 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);
|
||||||
|
|
||||||
@ -32,8 +29,7 @@ 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": { companyGenerals = _value; publicVariable "companyGenerals" };
|
case "operations": { companyShareholders = _value; publicVariable "companyShareholders" };
|
||||||
case "garage_unlocks": { companyGarageUnlocks = _value; publicVariable "companyGarageUnlocks" };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class CfgPatches {
|
|||||||
|
|
||||||
serverSaveLoop = 0;
|
serverSaveLoop = 0;
|
||||||
serverSaveLoopTime = 30;
|
serverSaveLoopTime = 30;
|
||||||
companyGenerals[] = {"76561198027566824"};
|
companyShareholders[] = {"76561198027566824"};
|
||||||
AISkill = 0.8;
|
AISkill = 0.8;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user