mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-19 15:54:09 +02:00
Various fixes to our upgrade logic (#536)
Stuff broke over time, especially with the major changes we made leading up to 2.3. We should test with older saves if/when we make large changes in the future. Fixes #532
This commit is contained in:
@@ -34,6 +34,9 @@ export function Reviver(_key: string, value: unknown): any {
|
||||
case "Industry":
|
||||
console.warn("Converting a corp from pre-2.3");
|
||||
return value.data; // Will immediately be overwritten by v2.3 save migration code
|
||||
case "Employee":
|
||||
console.warn("Converting a corp from pre-2.2");
|
||||
return value.data; // Will immediately be overwritten by v2.3 save migration code
|
||||
}
|
||||
// Missing constructor with no special handling. Throw error.
|
||||
throw new Error(`Could not locate constructor named ${value.ctor}. If the save data is valid, this is a bug.`);
|
||||
|
||||
Reference in New Issue
Block a user