Skip to content

Add scene editor persist commands (place/remove/flush + JS5) - #1238

Open
MaatheusGois wants to merge 2 commits into
GregHib:mainfrom
MaatheusGois:scene-editor-persist
Open

Add scene editor persist commands (place/remove/flush + JS5)#1238
MaatheusGois wants to merge 2 commits into
GregHib:mainfrom
MaatheusGois:scene-editor-persist

Conversation

@MaatheusGois

Copy link
Copy Markdown

Summary

  • Add admin console commands scene_place, scene_remove, and scene_flush for the void-client scene editor.
  • Live updates clear/add GameObjects collision immediately; flush writes editor.obj-spawns.toml and rewrites JS5 lX_Y via a writable CacheDelegate (runtime FileCache is read-only).
  • Register Cache in Koin and add the :buffer dependency needed by the encoder path; default development admin name is admin.

Test plan

  • Run server (./gradlew run), login as admin
  • From void-client scene editor: place trees, ed save demo → console shows place + flush success (no Koin / Read only cache errors)
  • Remove stock scenery, ed save → tile is walkable with Editor OFF
  • Confirm data/area/scene/editor.obj-spawns.toml updates and JS5 map archives change on disk
  • Restart server and confirm placements/removals persist

Made with Cursor

MaatheusGois and others added 2 commits August 30, 2026 20:01
Support scene_place/scene_remove/scene_flush so client editor saves update GameObjects collision, obj-spawns.toml, and map archives via a writable CacheDelegate.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@GregHib

GregHib commented Aug 31, 2026

Copy link
Copy Markdown
Owner

A bit of separation of concerns would be good here, a command which updates an .obj-spawns.toml and auto refreshes seems reasonable and the cache updating which takes a toml and writes it to maps in the cache would be better suited as a script in /tools.

Reasoning for this is the cache is removed after startup to reduce unnecessary memory overhead as so is intentionally left out of koin to avoid runtime dependencies, adding it and the ~100MB+ of ram usage back in for what is a dev convenience isn't worth it imo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants