BUGFIX: Missing migration code for v0.56.0 (#1790)

This commit is contained in:
catloversg 2024-11-22 13:57:36 +07:00 committed by GitHub
parent 8c4fcfe045
commit 596a621c62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -13,6 +13,7 @@ import {
createUniqueRandomIp,
AddToAllServers,
GetServer,
renameServer,
} from "./Server/AllServers";
import { Settings } from "./Settings/Settings";
import { loadStockMarket, StockMarket } from "./StockMarket/StockMarket";
@ -313,6 +314,10 @@ function evaluateVersionCompatibility(ver: string | number): void {
delete anyPlayer.companyPosition;
}
if (ver < "0.56.0") {
// In older versions, keys of AllServers are IP addresses instead of hostnames.
for (const server of GetAllServers()) {
renameServer(server.ip, server.hostname);
}
for (const q of anyPlayer.queuedAugmentations) {
if (q.name === "Graphene BranchiBlades Upgrade") {
q.name = "Graphene BrachiBlades Upgrade";