You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 9 |[Triggers + Variables](#9-triggers--variables) — depends on areas, teams |wip (not in stable) |
42
42
43
43
Notes from review:
44
44
-**Map settings** (sun/lighting/atmosphere/water/map-rendering) are general map
@@ -80,33 +80,20 @@ via an `inventory` `ModelFactory` and `Context` reaches them type-erased through
80
80
81
81
The bridge sends every command to Rust via `Spring.InvokeNativeModule(json.encode(msg:serialize()))`. Lua execution **also** runs (parallel) unless the class name appears in `nativeCommandsOnly`. Slice 0 leaves that allowlist empty — feature slices populate it as they land.
82
82
83
-
**Still open — required for full 1:1 once Rust is the *only* executor of undo/redo:**
84
-
85
-
These exist on the Lua side and are needed once Rust owns the undo stack. They
86
-
are **not** yet ported. Slice 1 did not need them: flipping a command via
87
-
`nativeCommandsOnly` only suppresses Lua's `cmd:execute()`
88
-
([command_manager.lua](../../scen_edit/command/command_manager.lua) line ~129) —
89
-
the `undoListAdd` / `notify` path (line ~133) is **not** gated, so during the
90
-
parallel period Lua still owns undo/redo bookkeeping and the widget notify. These
91
-
land with the slice that first moves the undo stack itself to Rust.
92
-
93
-
-`__cmd_id` allocation on every executed command (Rust counterpart to Lua's `idCount`).
94
-
- Widget notify after `execute` / `undo` / `redo` / `clear_*` / `undo_list_add` (when it pops oldest) — Lua dispatches `WidgetCommandExecuted` / `WidgetCommandUndo` / `WidgetCommandRedo` / `WidgetCommandClearUndoStack` / `WidgetCommandClearRedoStack` / `WidgetCommandRemoveFirstUndo` to the widget. Rust needs the equivalent via `send_lua_uimsg` (a `lua_bridge` module — exists in wip, not yet in stable), matching `scen_edit/message/message_manager.lua`'s prefix-framed wire format.
95
-
-`display()` method on commands (Lua returns `self.className`; `CompoundCommand` returns the first sub-command's display). Required for the `display` field of `WidgetCommandExecuted`.
96
-
97
-
**Out of scope for slice 0** (handled by their feature slices):
98
-
-[merge_command.lua](../../scen_edit/command/merge_command.lua) — depends on `SetWaterParams` / `SetAtmosphere` / `SetSunParameters` inner commands; lands with slice 3 (map settings).
99
-
-[resend_command.lua](../../scen_edit/command/resend_command.lua) — depends on s11n libs; lands with slice 8 (project lifecycle).
83
+
During the parallel period Lua still owns undo/redo bookkeeping + widget notify
84
+
(`nativeCommandsOnly` only suppresses Lua's `cmd:execute()`). Moving the undo
85
+
stack itself to Rust — `__cmd_id`, widget-notify via `lua_bridge`, command
86
+
`display()` — lands with the first slice that needs Rust-owned undo.
100
87
101
88
---
102
89
103
90
## 1. Terrain
104
91
105
92
Brush-based heightmap and metal-map editing. Engine-side via `Spring.SetHeightMap` / `Spring.SetMetalAmount` / `Spring.AddHeightMap`, all bound natively.
106
93
107
-
**Status:**in stable, awaiting review — four brush commands + brush-settings,
108
-
flipped to Rust-only. Also lands shared infra: the IO-worker shell (no job types
109
-
yet), the in-engine test harness, and the Lua `poll_io` driver.
94
+
**Status:**done (stable) — four brush commands + brush-settings, flipped to
95
+
Rust-only. Also landed shared infra: the IO-worker shell, the in-engine test
96
+
harness, and the Lua `poll_io` driver.
110
97
111
98
The three heightmap brushes wrap their writes in `TerrainControl::set_height_map_func`
112
99
so the engine recalcs (without it, heights change in data but the terrain doesn't
@@ -129,29 +116,20 @@ move) — see `SBC_PORT_MISSING_BINDINGS.md`. Metal needs no recalc.
129
116
130
117
## 2. Heightmap
131
118
132
-
Whole-map heightmap load + image import/export. **Not GL-blocked** — see
-[import_heightmap_command.lua](../../scen_edit/command/import_heightmap_command.lua) — async (image decode in Rust; was launcher `ImportSBHeightmap`)
154
-
-[export_heightmap_command.lua](../../scen_edit/command/textures/export_heightmap_command.lua) — async (read heights via `get_ground_height`, encode image in Rust; was launcher `ConvertSBHeightmap`)
129
+
**Commands** (all → Rust-only):
130
+
-[load_map_command.lua](../../scen_edit/command/load_map_command.lua) — passes the heightmap file path; Rust reads the LE-`f32``.data` and applies. (Driven by project load — [load_project_command_widget.lua](../../scen_edit/command/project/load_project_command_widget.lua) now passes the path.)
131
+
-[import_heightmap_command.lua](../../scen_edit/command/import_heightmap_command.lua) — image decode in Rust; was launcher `ImportSBHeightmap`
132
+
-[export_heightmap_command.lua](../../scen_edit/command/textures/export_heightmap_command.lua) — read live heights via `get_ground_height`, encode 16-bit PNG; was launcher `ConvertSBHeightmap`
155
133
156
134
---
157
135
@@ -161,16 +139,11 @@ General map rendering config: sun lighting, atmosphere, water, map-rendering
161
139
params. These are **map-wide config**, distinct from scenario *info* (project
162
140
metadata, which is in slice 8). Should land early.
163
141
164
-
**Status / blocker:** mostly engine-blocked. The setters are bound but their
0 commit comments