mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
Fixed bugs with refactored Company/job code. Added 'expr' Terminal command
This commit is contained in:
+11
-1
@@ -118,7 +118,7 @@ function evaluateVersionCompatibility(ver) {
|
||||
// Player's company position is now a string
|
||||
if (Player.companyPosition != null && typeof Player.companyPosition !== "string") {
|
||||
console.log("Changed Player.companyPosition value to be compatible with v0.41.2");
|
||||
Player.companyPosition = Player.companyPosition.positionName;
|
||||
Player.companyPosition = Player.companyPosition.data.positionName;
|
||||
if (Player.companyPosition == null) {
|
||||
Player.companyPosition = "";
|
||||
}
|
||||
@@ -131,6 +131,16 @@ function evaluateVersionCompatibility(ver) {
|
||||
console.log("Changed company name property to be compatible with v0.41.2");
|
||||
company.name = company.companyName;
|
||||
}
|
||||
|
||||
if (company.companyPositions instanceof Array) {
|
||||
console.log("Changed company companyPositions property to be compatible with v0.41.2");
|
||||
const pos = {};
|
||||
|
||||
for (let i = 0; i < company.companyPositions.length; ++i) {
|
||||
pos[company.companyPositions[i]] = true;
|
||||
}
|
||||
company.companyPositions = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user