Restore number-row turbine toggles; keep numpad for rod presets

This commit is contained in:
Codex Agent
2025-11-25 18:50:12 +01:00
parent bb2f03d8b2
commit cfe2545b32

View File

@@ -91,7 +91,7 @@ class ReactorDashboard:
DashboardKey("r", "Reset & clear state"),
DashboardKey("a", "Toggle auto rod control"),
DashboardKey("+/-", "Withdraw/insert rods"),
DashboardKey("1-9 / Numpad", "Set rods to 0.1 … 0.9 (manual)"),
DashboardKey("Numpad 1-9", "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("Shift+1/2/3", "Toggle turbine units 1-3"),
DashboardKey("1/2/3", "Toggle turbine units 1-3"),
DashboardKey("y/u/i", "Maintain turbine 1/2/3"),
DashboardKey("c", "Toggle consumer"),
],
@@ -216,11 +216,8 @@ class ReactorDashboard:
elif keyname and keyname.startswith(b"KP_") and keyname[-1:] in b"123456789":
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"):
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("!")
elif ord("1") <= ch <= ord("3"):
idx = ch - ord("1")
self._toggle_turbine_unit(idx)
elif ch in _NUMPAD_ROD_KEYS:
self._queue_command(ReactorCommand(rod_position=_NUMPAD_ROD_KEYS[ch], rod_manual=True))