karaoke-dev/karaoke

Add the check to check if element id in the beatmap/stage should have the instance.

Opened this issue · 3 comments

Inspired from the #2058.
And note that we need to finish the #2056 first.

用中文好了
簡單來說,我們需要確保 beatmap 內在任何操作,都不應該讓 property 內的 element id 找不到參考對象(object)
通常是因為 object 被刪除
e.g. 刪除掉 singer 後,lyric 的 singer id 卻沒有被清掉。

哭阿,這個 issue 會無限繁殖

Duplicated to the #2058
I think should rename this issue and focus on provide the check to check the null reference.

  • CheckBeatmapElementId : Check element id should contains the reference in the beatmap.
  • CheckStageElementId: Check element id should contains the reference in the beatmap or stage.

另外需要想一下是不是要獨立寫這個 check ,因為可能會有機會 element id 並不是對應到想要的 instance (e.g. singer ids 裡面的 id 剛好是 lyric 的 id,應該要把這種可能檢查出來)