When I open the save menu, it shows a TypeError. Here is the information:
slots.vue:10 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'height')
at slots.vue:10:109
at renderFnWithContext (runtime-core.esm-bundler.js:766:13)
at renderSlot (runtime-core.esm-bundler.js:2824:53)
at choice.vue:10:17
at renderList (runtime-core.esm-bundler.js:2755:16)
at Proxy._sfc_render (choice.vue:13:18)
at renderComponentRoot (runtime-core.esm-bundler.js:816:16)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5701:46)
at ReactiveEffect.run (reactivity.esm-bundler.js:178:19)
at instance.update (runtime-core.esm-bundler.js:5814:51)
When I check the source code, I found such code in the slots.vue in the gui:
<div class="sprite"
:style="{
height:
${choice.sprite.height / choice.sprite.framesHeight}px,
width:
${choice.sprite.width / choice.sprite.framesWidth}px,
'background-image':
url(${choice.sprite.images[choice.slot.graphic]})`
}"
`
It seems like that the choice.sprite doesn't have the height prop.
Then I check the slots.
const sprite = this.rpgResource.spritesheets.get(slot.graphic)
The problem is on the slot.graphic. I didn't find the graphic in the saved data. I tried to call the player.setGraphic() method. It didn't work either.
When I check the document, It says that since 3.0.0, the player can have more than one graphic, so the graphic was converted to a graphic list:
setGraphic(graphic: string | number | (string | number)[]) {
const components = (Utils.isArray(graphic) ? graphic : [graphic]) as string[]
const col = [...components.map(value => ({ id: Utils.isString(value) ? 'graphic' : 'tile', value }))]
this.removeComponentById('center', 'graphic')
this.mergeComponent('center', col)
}
So I think it's bug of save plugin.
Did I miss something? Need help, thank you.