Make the Caves view a viewer only

The Caves view no longer edits cave files. It shows each cave at the
chosen size and variant, and redraws when a file is saved. The form,
creating caves from the studio and EditableSceneView.showsNodes() are
gone.
This commit is contained in:
piexel committed 2026-11-13 09:53:30 +01:00
1 parent 263f5baa3c
commit 22d69f362f
9 files changed
+14 -151

No files matched your search

+1 -2
View File
@@ -550,8 +550,7 @@ final class RuinScenes implements SceneView {
settings (`NodeSettings`, shown as the pack's schema describes their type), the nodes it holds and the `Edits` the
studio may make (a child list to move nodes into, whether it moves, the `Addition`s it offers). Places in the file
are `JsonPath`s of `Key` and `Index` steps. The studio writes the file itself, rewriting only what changes; the
view never writes. A view whose file reads as one node of settings returns false from `showsNodes()`, and the
studio shows that node's settings beside the scene instead of a graph. A view whose entries the studio may create and delete returns a `SceneCreation` from
view never writes. A view whose entries the studio may create and delete returns a `SceneCreation` from
`creation()`: the resource kind of its files, the starter JSON of a new entry and the text other files name an
entry by; the studio does the writing, listing of uses and trashing.
- Absent values are empty, never blank or `-1`: an entry without a group, a node that draws no part of the scene
@@ -21,14 +21,6 @@ public interface EditableSceneView extends SceneView {
*/
NodeGraph graph(PackWorld world, String key, JsonText text);
/**
* Whether the studio shows the file's graph as nodes under the scene, which is the default. A view whose file reads
* as one node of settings says no, and the studio shows those settings beside the scene instead.
*/
default boolean showsNodes() {
return true;
}
/** How the studio creates and removes entries of this view; empty when it may not, which is the default. */
default Optional<SceneCreation> creation() {
return Optional.empty();