Add scene editor persist commands (place/remove/flush + JS5) - #1238
Add scene editor persist commands (place/remove/flush + JS5)#1238MaatheusGois wants to merge 11 commits into
Conversation
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>
|
A bit of separation of concerns would be good here, a command which updates an 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. |
|
@GregHib done! |
|
Thanks, this is quite a different beast of a PR now. Void's aim is to accurately emulate rs both in terms of content and behaviour but also in-a-sense code as well, trying to keep to the core minimal systems and while there is some give for functionality that makes life easier (moderation, analytics etc..) a custom editor and systems to support it, while very cool, steps over that line too much, I'm all for people using and customising it to their liking but that's what forks are for |
Server-backed scene editor persistence and tooling
Summary
This PR provides the server-side persistence and command hooks used by the void-client scene editor.
scene_place <object-id> <x> <y> <plane> [rotation] [shape]scene_remove <object-id> <x> <y> <plane> [rotation] [shape]scene_flushscene_statusdata/area/scene/editor.obj-spawns.toml.GameObjects, including removals of stock map objects, and preserves the actual object shape/rotation in removal tombstones.scene_npc_spawn <npc-id> <x> <y> <plane>scene_npc_remove <npc-id> <x> <y> <plane>data/area/scene/editor.npc-spawns.tomland use the normal authoritative NPC update, interaction, animation, and combat systems.scene_item_drop <item-id> <x> <y> <plane> [amount]scene_item_bag <item-id> [amount]/data/area/scene/ignored.CacheDelegate, Koin cache registration, and runtime JS5 writes are not required by scene-editor commands.tools:updateObjectSpawnsworkflow for intentionally converting persisted object-spawn data into cache map updates.Persistence behavior
scene_flushreloads persisted scene-editor object changes for clients that need an explicit refresh.Verification
./gradlew :game:compileKotlin./gradlew :game:shadowJar./gradlew :game:testThe generated files under
data/area/scene/are intentionally not included in this PR.