Map digits to rod presets; use Shift+1-3 for turbine toggles

This commit is contained in:
Codex Agent
2025-11-25 18:07:37 +01:00
parent 0e2ff1a324
commit c2bbadcaf4

View File

@@ -91,7 +91,7 @@ class ReactorDashboard:
DashboardKey("r", "Reset & clear state"),
DashboardKey("a", "Toggle auto rod control"),
DashboardKey("+/-", "Withdraw/insert rods"),
DashboardKey("Numpad 1-9", "Set rods to 0.1 … 0.9 (manual)"),
DashboardKey("1-9 / Numpad", "Set rods to 0.1 … 0.9 (manual)"),
DashboardKey("[/]", "Adjust consumer demand /+50 MW"),
DashboardKey("s/d", "Setpoint /+250 MW"),
DashboardKey("p", "Maintain core (shutdown required)"),
@@ -119,7 +119,7 @@ class ReactorDashboard:
"Turbines / Grid",
[
DashboardKey("t", "Toggle turbine bank"),
DashboardKey("1/2/3", "Toggle turbine units 1-3"),
DashboardKey("Shift+1/2/3", "Toggle turbine units 1-3"),
DashboardKey("y/u/i", "Maintain turbine 1/2/3"),
DashboardKey("c", "Toggle consumer"),
],
@@ -217,7 +217,10 @@ class ReactorDashboard:
target = (keyname[-1] - ord("0")) / 10.0 # type: ignore[arg-type]
self._queue_command(ReactorCommand(rod_position=target, rod_manual=True))
elif ord("1") <= ch <= ord("9"):
idx = ch - ord("1")
target = (ch - ord("0")) / 10.0
self._queue_command(ReactorCommand(rod_position=target, rod_manual=True))
elif ch in (ord("!"), ord("@"), ord("#")):
idx = ch - ord("!")
self._toggle_turbine_unit(idx)
elif ch in _NUMPAD_ROD_KEYS:
self._queue_command(ReactorCommand(rod_position=_NUMPAD_ROD_KEYS[ch], rod_manual=True))