Upgrade templates: PP, AP as string.
This commit is contained in:
@@ -236,4 +236,17 @@ export class M5Item extends Item {
|
||||
return (this as any).getEmbeddedDocument("Item", itemId)
|
||||
}
|
||||
|
||||
override migrateSystemData(): any {
|
||||
const item = (this as any)
|
||||
const data = item.system
|
||||
|
||||
if (item.type === "spell") {
|
||||
if (typeof data.ap !== "string") {
|
||||
data.ap = Number.isFinite(data.ap) ? "" + data.ap : ""
|
||||
}
|
||||
}
|
||||
|
||||
return super.migrateSystemData()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user