InventiveRhythm / fluXis

A community-driven rhythm game with a focus on creativity and expression.
https://fluxis.flux.moe
MIT License
67 stars 13 forks source link

Improve editor actions struct #63

Closed andy840119 closed 6 months ago

andy840119 commented 7 months ago

Guess it's OK to make the contribution, so I made one.

I speculate EditorMap is the area (or sendbox?) for deal with edit the property in the beatmap. All edit action should make the EditorAction and push into the EditorActionStack, EditorActionStack will handle the run(redo)/undo action. If that so, only EditorActionStack need to know the EditorMap. Technically it will be the only way call the undo/redo method in the editor action.

Also, seems it's a little bit like memento pattern, and that's what lazer does not have in the Editor now. Is it OK to use this project as PoC to describe how do deal with undo/redo with better way?

flustix commented 6 months ago

Looks fine to me.

And I guess you can use it as a proof of concept. I don't really mind as long as you credit it of course.