diff --git a/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts b/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts index 355f5a6d4..ab66a9aca 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts @@ -100,8 +100,20 @@ export class SleeveBladeburnerWork extends SleeveWorkClass { /** Initializes a BladeburnerWork object from a JSON save state. */ static fromJSON(value: IReviverValue): SleeveBladeburnerWork { objectAssert(value.data); - const actionId = loadActionIdentifier(value.data?.actionId); - if (!actionId) return invalidWork(); + let actionId = loadActionIdentifier(value.data?.actionId); + if (!actionId) { + /** + * In pre-v2.6.1 versions, "name" and "type" of actionId are saved directly in "actionName" and "actionType", not + * in the actionId object. + */ + if (!value.data["actionName"]) { + return invalidWork(); + } + actionId = loadActionIdentifier({ name: value.data["actionName"], type: value.data["actionType"] }); + if (!actionId) { + return invalidWork(); + } + } value.data.actionId = actionId; return Generic_fromJSON(SleeveBladeburnerWork, value.data, SleeveBladeburnerWork.savedKeys); }