mirror of
https://github.com/db9979/uconsole_asw_game.git
synced 2026-12-06 21:04:18 +01:00
Crewed submarine: load tubes one by one, flood before firing (1.3.31)
The crew loads each empty tube from the racks (M / browser Load) and floods a loaded tube before it fires (Shift+M / browser Flood, 20 s, audible for 4 s). Submarines now carry as many reloads again as tubes with 2-4 min reloads; AI submarines keep reloading by themselves. Save format v26 adds crew.orders.tubes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019eZphdvoJiBgWqq2zSH4aJ
This commit is contained in:
42 files changed
+623
-118
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
## Authority and scope
|
||||
|
||||
- This is U-Jagd 1.3.30 (`src/core/version.py`); current saves are v25-only. Treat these as compatibility contracts, not changelog entries.
|
||||
- This is U-Jagd 1.3.31 (`src/core/version.py`); current saves are v26-only. Treat these as compatibility contracts, not changelog entries.
|
||||
- Resolve conflicts in this order: executable code and focused tests; packaged JSON/runtime resources; `pyproject.toml` and provenance/license notices; `README.md`; design/history documents under `docs/`. A plan or old comment is not an implementation contract.
|
||||
- Preserve explicit compatibility tests and user data unless a task intentionally changes the contract. Add a regression test for behavior changes.
|
||||
- Older phase/milestone labels under `docs/GDD.md`, `docs/implementation-plan.md`, `docs/plan-0.1.6.md`, and `docs/plan-0.1.7.md` are historical. Current resumable work is tracked in `docs/plan-1.3.md` and `docs/resume.md`.
|
||||
@@ -63,8 +63,8 @@
|
||||
## Persistence and user content
|
||||
|
||||
- Runtime root is `~/.u-jagd/`: `settings.json`; `slot1.json` through `slot5.json`; editor files in `missions/` and `units/`. Tests replace save paths with temporary directories; never write real user paths from tests. `.u-jagd/`, build products, caches, and egg metadata stay untracked.
|
||||
- Preferences persist language/fullscreen/audio/large text/tooltips in `settings.json`; v25 saves also retain the mission's tooltip state and the uConsole's local side. CLI `--windowed` and `--no-audio` override saved values for one launch; no inverse fullscreen or CLI-language switch exists.
|
||||
- Write and load save v25 only. Require the exact `u-jagd-save-v25` schema (exact key sets live in `src/core/save_schema.py`) and the complete current catalog, platform, ESM, ASW, AIS, RNG and crewed-boat crew state (`crew` block: orders with the attack computer's stadimeter marks `tdc`, wires, plot, ESM picture, radio room, feed, sonar station; a loaded boat keeps its binding for `UBOOT_RESTORE_HOLD_S` until its crew returns), plus foreign active pings still travelling to the frigate (`ping_intercepts`) and each conventional boat's diesel, charge rate and air stores (endurance state version 2) and every submarine's ballast, trim and high-pressure air (`ballast`) and its compartments, leaks, fires, gas and damage-control teams (`damage_control`), plus the HQ task board (`tasking`), the frigate's watch bill (`watch`; the boat's is `crew.watch`), the patrol aircraft (`mpa`) and each buoy's `owner`, plus the frigate's variable-depth sonar (`vds_state`, payout, depth and target), plus the frigate's radar mast blips and the OPZ's marks the AI hunters act on (`radar_marks`). Reject malformed, non-integer, older, newer, incomplete, or unknown schemas without migration.
|
||||
- Preferences persist language/fullscreen/audio/large text/tooltips in `settings.json`; v26 saves also retain the mission's tooltip state and the uConsole's local side. CLI `--windowed` and `--no-audio` override saved values for one launch; no inverse fullscreen or CLI-language switch exists.
|
||||
- Write and load save v26 only. Require the exact `u-jagd-save-v26` schema (exact key sets live in `src/core/save_schema.py`) and the complete current catalog, platform, ESM, ASW, AIS, RNG and crewed-boat crew state (`crew` block: orders with the attack computer's stadimeter marks `tdc` and each tube's flooding state `tubes`, wires, plot, ESM picture, radio room, feed, sonar station; a loaded boat keeps its binding for `UBOOT_RESTORE_HOLD_S` until its crew returns), plus foreign active pings still travelling to the frigate (`ping_intercepts`) and each conventional boat's diesel, charge rate and air stores (endurance state version 2) and every submarine's ballast, trim and high-pressure air (`ballast`) and its compartments, leaks, fires, gas and damage-control teams (`damage_control`), plus the HQ task board (`tasking`), the frigate's watch bill (`watch`; the boat's is `crew.watch`), the patrol aircraft (`mpa`) and each buoy's `owner`, plus the frigate's variable-depth sonar (`vds_state`, payout, depth and target), plus the frigate's radar mast blips and the OPZ's marks the AI hunters act on (`radar_marks`). Reject malformed, non-integer, older, newer, incomplete, or unknown schemas without migration.
|
||||
- Writes must stage beside the destination, flush and `fsync`, then atomically `os.replace`; failure leaves the prior file intact and save-and-quit quits only after success. Load into a candidate state and commit only after complete validation/restoration; failure must leave the live game and global ID counters unchanged.
|
||||
- Treat imported/editor JSON as hostile. Require finite typed/bounded values, strict schemas, `user.<lowercase/digit/_/->` keys, confined destinations, and no symlinked root/file. Never interpret a logical reference as a filesystem path.
|
||||
- Bundle import validates every item and collision before the first visible write, stages all files, rechecks confinement/symlinks, and rolls back the whole commit on failure. Preserve backups if rollback itself fails. JSON output must reject NaN/Infinity.
|
||||
@@ -72,14 +72,14 @@
|
||||
## Remote Crew multiplayer
|
||||
|
||||
- Remote Crew is authoritative-host multiplayer for multiple authenticated browser clients. The uConsole process remains the sole simulation authority. Browsers never run simulation, advance time, resolve physics, read live entities, or mutate game state from transport threads.
|
||||
- Multiplayer protocol versions are independent of application and save versions. Remote Crew is protocol v2-only; every `/api/v1/*` route is retired and returns 404. Saves remain exact v25; credentials, clients, station leases, network queues, drafts, and unaccepted commands are transient and never enter saves or settings.
|
||||
- Multiplayer protocol versions are independent of application and save versions. Remote Crew is protocol v2-only; every `/api/v1/*` route is retired and returns 404. Saves remain exact v26; credentials, clients, station leases, network queues, drafts, and unaccepted commands are transient and never enter saves or settings.
|
||||
- Support a hard-bounded client count. Each client has an independent cryptographic session, expiry, request namespace, and revocation state. The host explicitly grants one exclusive station role per client and can revoke or take over any role. Reconnect never inherits another client's authority.
|
||||
- Role capabilities are allowlisted. A granted browser may directly operate its station, including weapons when the host separately enables direct fire, but every action must pass the same observation freshness, damage, inventory, ROE, envelope, and readiness checks as local input. Save/load, reset, editors, options, quit, network administration, and credentials remain host-only, with one explicit exception: solo mode (below).
|
||||
- The transport is `src/commander/server.py` (`CommanderServer`: sessions, leases, publications) with `src/commander/v2/` (`wire.py` constants and framing, `commands.py` the closed action registry and validators, `routes.py` HTTP and WebSocket handlers); `server.py` re-exports the v2 names. `/ws/v2/state` pushes the active role's projection (the same bytes as `GET /api/v2/state`, at most 4 Hz, heartbeat 2 s, latest state only) and the browser falls back to polling; both paths share one allowlist: `src/commander/v2/schema.py` is rendered into the generated block of `data/commander/js/state/schema.js` by `tools/gen_web_schema.py` (`--check` in CI). Transport handlers accept only strict, finite, size-bounded, versioned messages and enqueue detached envelopes. The main thread revalidates client, role, lease generation, world epoch, resource revision, freshness, and readiness immediately before applying each command. Never synthesize Pygame events or dispatch arbitrary method names from network data.
|
||||
- Apply accepted remote commands exactly once in deterministic station order and per-client FIFO order before `Game.update()`. Wall clock, packet scheduling, polling frequency, browser rendering, and hash iteration must not affect simulation results. Role loss, disconnect, load/new game, and world replacement reject unsafe queued commands and clear held remote controls; local overlays and focus loss do not.
|
||||
- Each normal role view receives only an allowlisted detached projection of own ship and commanded assets, published observations, annotations, and known geography. Never export simulation objects, hidden IDs, undiscovered positions, true hostile identity, RNG state, or save dumps through station state. The explicit host-granted SimLog capability is the sole diagnostic exception: its read-only history may include detached full-truth snapshots, but never simulation objects, RNG state, credentials, settings, or save dumps.
|
||||
- Observers are a host-granted, never-persisted read-only pseudo-role (at most `OBSERVER_MAX` = 2): no lease, any station viewable through `stations/activate` with generation 0, every command rejected, SimLog included; occupancy and `station_leased()` ignore observers. Voice starts enabled in the web-host room and the host switches it off.
|
||||
- Solo mode is a per-launch, never-persisted host decision (`--solo-crew` or the F9 "Crew mode" row; changing it revokes every session and rotates the code). One paired session then holds all nine stations and may use the closed host command surface: save/load slots 1-5, new game and the instructor environment, sent as pseudo-role `host` over the normal command pipeline (same CSRF/Origin, exactly-once, phase and world-session checks; rejected in crew mode). There is no pause or time-scale command. Editors, options, quit, network administration and credentials stay host-only, saves stay exact v25, and a world replacement keeps the solo session but re-leases every station and drops queued commands. The browser runs on a desktop PC, so the web UI targets large screens; `data/commander/` keeps the accessible single-column fallback for narrow windows only.
|
||||
- Solo mode is a per-launch, never-persisted host decision (`--solo-crew` or the F9 "Crew mode" row; changing it revokes every session and rotates the code). One paired session then holds all nine stations and may use the closed host command surface: save/load slots 1-5, new game and the instructor environment, sent as pseudo-role `host` over the normal command pipeline (same CSRF/Origin, exactly-once, phase and world-session checks; rejected in crew mode). There is no pause or time-scale command. Editors, options, quit, network administration and credentials stay host-only, saves stay exact v26, and a world replacement keeps the solo session but re-leases every station and drops queued commands. The browser runs on a desktop PC, so the web UI targets large screens; `data/commander/` keeps the accessible single-column fallback for narrow windows only.
|
||||
- Browser sessions may use host-only HttpOnly SameSite cookies for reload recovery. Credentials never enter JavaScript, URLs, DOM, logs, settings, or saves. State-changing requests also require exact Origin and a separate CSRF token. Plain HTTP remains trusted-LAN-only; Internet-capable deployment requires a separately reviewed encrypted endpoint or reverse proxy. The local F9 listener accepts only its exact LAN `Host`/`http://` origin unless launched with `--public-origin https://…`; then it also accepts exactly that proxy host (plus explicit `:443`) and origin, and marks cookies `Secure` only on the HTTPS path. The `--web-host` room accepts its public origin only.
|
||||
- Keep clients, histories, queues, projections, polling, and render work bounded for the uConsole. Cache immutable projections shared by clients with identical visibility, apply backpressure, and verify maximum-client CPU, memory, bandwidth, frame time, reconnect, and thermal behavior on real hardware.
|
||||
- New multiplayer prose uses exact EN/DE catalog parity and safe DOM insertion. Browser controls require keyboard and touch access, bounded responsive layouts, explicit stale/revoked states, and tests at desktop, mobile, large zoom, and pseudolocale where applicable.
|
||||
|
||||
@@ -4,6 +4,16 @@
|
||||
|
||||
Alle Versionen von U-Jagd, die neueste zuerst. Die [README](README.de.md) zeigt nur die neueste.
|
||||
|
||||
## 1.3.31
|
||||
|
||||
Version 1.3.31 gibt dem besetzten U-Boot echte Torpedorohre: Die Torpedogasten
|
||||
laden jedes leere Rohr aus den Reserven (`M` an der Station Waffen oder Laden
|
||||
im Browser), und ein geladenes Rohr muss vor dem Schuss geflutet werden, was
|
||||
20 s dauert und hörbar ist (`Shift+M` oder Fluten). Jedes U-Boot führt jetzt
|
||||
noch einmal so viele Reservetorpedos wie Rohre, nachgeladen in 2 bis 4
|
||||
Minuten; die U-Boote der KI laden und fluten weiter selbst. Spielstände sind
|
||||
jetzt v26.
|
||||
|
||||
## 1.3.30
|
||||
|
||||
Version 1.3.30 lässt die **Fregatte die U-Boot-Missionen gegen die KI
|
||||
|
||||
@@ -4,6 +4,15 @@
|
||||
|
||||
Every U-Jagd release, newest first. The [README](README.md) shows only the latest one.
|
||||
|
||||
## 1.3.31
|
||||
|
||||
Release 1.3.31 gives the crewed submarine real torpedo tubes: the torpedo gang
|
||||
loads each empty tube from the racks (`M` at the Weapons station, or Load in
|
||||
the browser), and a loaded tube must be flooded before it fires, which takes
|
||||
20 s and can be heard (`Shift+M`, or Flood). Every submarine now carries as
|
||||
many reloads again as it has tubes, reloaded in 2 to 4 minutes; the AI's
|
||||
submarines keep loading and flooding by themselves. Saves are now v26.
|
||||
|
||||
## 1.3.30
|
||||
|
||||
Release 1.3.30 lets the **frigate play the submarine missions against the AI**:
|
||||
|
||||
+12
-12
@@ -14,15 +14,15 @@ Sie führen eine fiktive Fregatte und wechseln zwischen neun Arbeitsplätzen, um
|
||||
zu navigieren, zu suchen, Kontakte zu klassifizieren, Ziele zu bekämpfen und das
|
||||
Schiff einsatzfähig zu halten.
|
||||
|
||||
Aktuelle Version: **1.3.30**
|
||||
Aktuelle Version: **1.3.31**
|
||||
|
||||
Version 1.3.30 lässt die **Fregatte die U-Boot-Missionen gegen die KI
|
||||
spielen**: Ein unbesetztes Missions-U-Boot verfolgt jetzt seinen Auftrag,
|
||||
statt zu patrouillieren. Es läuft unter der Sprungschicht zum
|
||||
Durchbruchsziel, folgt den Feindmeldungen der Führung und geht zum Sichten
|
||||
und Melden der Fregatte auf Sehrohrtiefe, und beim Geleitzugangriff läuft es
|
||||
dem Geleitzug voraus und torpediert seine Handelsschiffe einzeln.
|
||||
Spielstände bleiben v25.
|
||||
Version 1.3.31 gibt dem besetzten U-Boot echte Torpedorohre: Die Torpedogasten
|
||||
laden jedes leere Rohr aus den Reserven (`M` an der Station Waffen oder Laden
|
||||
im Browser), und ein geladenes Rohr muss vor dem Schuss geflutet werden, was
|
||||
20 s dauert und hörbar ist (`Shift+M` oder Fluten). Jedes U-Boot führt jetzt
|
||||
noch einmal so viele Reservetorpedos wie Rohre, nachgeladen in 2 bis 4
|
||||
Minuten; die U-Boote der KI laden und fluten weiter selbst. Spielstände sind
|
||||
jetzt v26.
|
||||
|
||||
Frühere Versionen: [CHANGELOG.de.md](CHANGELOG.de.md).
|
||||
|
||||
@@ -391,7 +391,7 @@ Die Einstellungen für Sprache, Vollbildmodus, Audio, Großschrift und
|
||||
Kontexthinweise werden in `~/.u-jagd/settings.json` geschrieben. Der Zustand der
|
||||
Kontexthinweise gilt daher global und wird für die deterministische
|
||||
Wiederherstellung bestehender Sitzungen zusätzlich in Spielständen des Formats
|
||||
v25 gespeichert.
|
||||
v26 gespeichert.
|
||||
|
||||
## Commander-LAN-Koop
|
||||
|
||||
@@ -473,7 +473,7 @@ Beim Überfahren eines nicht verfügbaren Browser-Bedienelements erscheint der
|
||||
aktuelle lokalisierte Grund, etwa fehlende Freigabe, Stationsschaden, Abklingzeit,
|
||||
leerer Bestand, ausstehender Befehl oder die TAS-Fahrtgrenze.
|
||||
|
||||
Anwendungsversion **1.3.10**, API-Protokoll **v2** und Speicherformat **v25** sind
|
||||
Anwendungsversion **1.3.10**, API-Protokoll **v2** und Speicherformat **v26** sind
|
||||
voneinander unabhängige Kompatibilitätsverträge. Remote Crew verwendet
|
||||
ausschließlich Protokoll v2; sämtliche Legacy-Routen unter `/api/v1/*` sind
|
||||
entfernt und liefern 404.
|
||||
@@ -529,8 +529,8 @@ Version gilt:
|
||||
|
||||
## Spielstände und Benutzerdaten
|
||||
|
||||
Dieser Stand schreibt und lädt ausschließlich das Speicherformat **v25**. V25
|
||||
verlangt das exakte Schema `u-jagd-save-v25` einschließlich der Radarpunkte und OPZ-Markierungen der Fregatte, der Marken des Angriffsrechners, des Tiefensonars
|
||||
Dieser Stand schreibt und lädt ausschließlich das Speicherformat **v26**. V26
|
||||
verlangt das exakte Schema `u-jagd-save-v26` einschließlich der Rohrzustände des besetzten U-Boots, der Radarpunkte und OPZ-Markierungen der Fregatte, der Marken des Angriffsrechners, des Tiefensonars
|
||||
der Fregatte, des Funkraums des besetzten U-Boots, der Auftragstafel
|
||||
der Führung, der Wachpläne beider Crews, des Seefernaufklärers und des Besitzers
|
||||
jeder Boje, des aktuellen
|
||||
|
||||
@@ -12,14 +12,14 @@ around the ClockworkPi uConsole's 1280 x 720 workspace. You command a fictional
|
||||
frigate and move between nine workstations to navigate, search, classify,
|
||||
engage, and keep the ship operational.
|
||||
|
||||
Current release: **1.3.30**
|
||||
Current release: **1.3.31**
|
||||
|
||||
Release 1.3.30 lets the **frigate play the submarine missions against the AI**:
|
||||
an uncrewed mission submarine now pursues its objective instead of
|
||||
patrolling. It runs below the layer for the breakthrough goal, follows HQ's
|
||||
contact reports and comes to periscope depth to sight and report the
|
||||
frigate, and in the convoy attack runs ahead of the convoy and torpedoes its
|
||||
merchants one at a time. Saves stay v25.
|
||||
Release 1.3.31 gives the crewed submarine real torpedo tubes: the torpedo gang
|
||||
loads each empty tube from the racks (`M` at the Weapons station, or Load in
|
||||
the browser), and a loaded tube must be flooded before it fires, which takes
|
||||
20 s and can be heard (`Shift+M`, or Flood). Every submarine now carries as
|
||||
many reloads again as it has tubes, reloaded in 2 to 4 minutes; the AI's
|
||||
submarines keep loading and flooding by themselves. Saves are now v26.
|
||||
|
||||
Earlier releases: [CHANGELOG.md](CHANGELOG.md).
|
||||
|
||||
@@ -373,7 +373,7 @@ between `en` and `de` and controls fullscreen, audio, large text, and tooltips.
|
||||
|
||||
Language, fullscreen, audio, large-text, and tooltip preferences are written to
|
||||
`~/.u-jagd/settings.json`. Tooltip state is therefore global and is also stored
|
||||
in v25 game saves for deterministic restoration of existing sessions.
|
||||
in v26 game saves for deterministic restoration of existing sessions.
|
||||
|
||||
## Commander LAN Co-op
|
||||
|
||||
@@ -488,8 +488,8 @@ Validated does not mean runtime-effective. In this release:
|
||||
|
||||
## Saves and User Data
|
||||
|
||||
This build writes and loads save format **v25** only. V25 requires the exact
|
||||
`u-jagd-save-v25` schema, including the frigate's radar blips and OPZ marks, the crewed submarine's attack-computer marks, the frigate's variable-depth sonar, the crewed submarine's radio room, the HQ task board, both crews' watch bills,
|
||||
This build writes and loads save format **v26** only. V26 requires the exact
|
||||
`u-jagd-save-v26` schema, including the crewed submarine's tube states, the frigate's radar blips and OPZ marks, the crewed submarine's attack-computer marks, the frigate's variable-depth sonar, the crewed submarine's radio room, the HQ task board, both crews' watch bills,
|
||||
the patrol aircraft and each buoy's owner, the current runtime catalog snapshot, all
|
||||
deterministic continuation state, the crewed submarine's crew state (orders,
|
||||
modes, mast, wires, plot, alarm bearings, its sonar station and its ESM
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
<section id="station-engine" class="station-section" data-station-role="engine" aria-labelledby="station-engine-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-engine-title" data-i18n="station_engine"></h2></div><div class="station-grid"><article class="station-card-view card-readout"><h3 data-i18n="station_propulsion"></h3><dl id="engine-propulsion" class="detail-metrics"></dl></article><article class="station-card-view card-readout"><h3 data-i18n="station_machinery"></h3><dl id="engine-machinery" class="detail-metrics"></dl></article><article class="station-card-view card-readout"><h3 data-i18n="station_environment_effects"></h3><dl id="engine-environment" class="detail-metrics"></dl></article><article class="station-card-view station-controls station-wide card-controls"><h3 data-i18n="engine_controls"></h3><label for="engine-telegraph" data-i18n="telegraph"></label><select id="engine-telegraph"></select><button id="engine-telegraph-submit" type="button" data-i18n="engine_order_telegraph"></button><form id="engine-course-form" class="control-form"><label for="engine-course" data-i18n="engine_course"></label><input id="engine-course" type="number" min="0" max="359.99999999999994" step="any" inputmode="decimal" autocomplete="off" required><button id="engine-course-submit" type="submit" data-i18n="engine_order_course"></button></form><form id="engine-speed-form" class="control-form"><label for="engine-speed" data-i18n="engine_speed"></label><input id="engine-speed" type="number" min="0" max="25" step="any" inputmode="decimal" autocomplete="off" required><button id="engine-speed-submit" type="submit" data-i18n="engine_order_speed"></button></form><button id="engine-quiet" type="button"></button><div class="fire-grid"><label for="engine-plant" data-i18n="engine_plant"></label><select id="engine-plant"><option value="AUTO" data-i18n="plant_auto"></option><option value="DIESEL" data-i18n="plant_diesel"></option><option value="TURBINE" data-i18n="plant_turbine"></option></select><button id="engine-plant-apply" type="button" data-i18n="engine_apply_plant"></button></div></article></div></section>
|
||||
<section id="station-helicopter" class="station-section" data-station-role="helicopter" aria-labelledby="station-helicopter-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-helicopter-title" data-i18n="station_helicopter"></h2></div><div class="station-grid"><article class="station-card-view"><h3 data-i18n="station_asset"></h3><dl id="helicopter-asset" class="detail-metrics"></dl></article><article class="station-card-view"><h3 data-i18n="station_readiness"></h3><dl id="helicopter-readiness" class="detail-metrics"></dl></article><article class="station-card-view"><h3 data-i18n="station_waypoint"></h3><dl id="helicopter-waypoint" class="detail-metrics"></dl><form id="helicopter-waypoint-form" class="control-form"><label for="helicopter-x" data-i18n="helicopter_x"></label><input id="helicopter-x" type="number" min="0" max="1000" step="any" inputmode="decimal" autocomplete="off" required><label for="helicopter-y" data-i18n="helicopter_y"></label><input id="helicopter-y" type="number" min="0" max="1000" step="any" inputmode="decimal" autocomplete="off" required><button id="helicopter-waypoint-submit" type="submit" data-i18n="helicopter_set_waypoint"></button></form></article><article class="station-card-view station-controls"><h3 data-i18n="helicopter_controls"></h3><button id="helicopter-launch" type="button" data-i18n="helicopter_launch"></button><button id="helicopter-return" type="button" data-i18n="helicopter_return"></button><button id="helicopter-buoy" type="button" data-i18n="helicopter_buoy"></button><div class="fire-grid"><label for="helicopter-pattern" data-i18n="helicopter_pattern"></label><select id="helicopter-pattern"><option value="single" data-i18n="buoy_pattern_single"></option><option value="field" data-i18n="buoy_pattern_field"></option><option value="barrier" data-i18n="buoy_pattern_barrier"></option><option value="circle" data-i18n="buoy_pattern_circle"></option></select><button id="helicopter-pattern-apply" type="button" data-i18n="helicopter_apply_pattern"></button><button id="helicopter-mad" type="button"></button></div></article><article class="station-card-view station-wide direct-fire-controls" aria-labelledby="helicopter-fire-title"><h3 id="helicopter-fire-title" data-i18n="helicopter_release_control"></h3><div class="fire-grid"><label for="helicopter-fire-target" data-i18n="fire_target"></label><select id="helicopter-fire-target"></select><label for="helicopter-fire-depth" data-i18n="fire_depth"></label><input id="helicopter-fire-depth" type="number" min="10" max="300" step="any" inputmode="decimal" autocomplete="off"><button id="helicopter-fire-torpedo" type="button" data-fire-action="helicopter_launch_torpedo" data-i18n="helicopter_launch_torpedo"></button></div><p id="helicopter-fire-status" class="fire-status" role="status" aria-live="polite"></p></article><article class="station-card-view station-wide"><h3 data-i18n="buoys"></h3><div id="helicopter-buoys" class="station-list"></div></article></div></section>
|
||||
<section id="station-eloka" class="station-section" data-station-role="eloka" aria-labelledby="station-eloka-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-eloka-title" data-i18n="station_eloka"></h2></div><div class="station-grid"><article class="station-card-view"><h3 data-i18n="eloka_hardware"></h3><dl id="eloka-hardware" class="metrics"></dl></article><article class="station-card-view station-controls station-wide"><h3 data-i18n="eloka_filters"></h3><label for="eloka-status-filter" data-i18n="eloka_filter_status"></label><select id="eloka-status-filter"><option value="OPERATIONAL" data-i18n="eloka_filter_operational"></option><option value="LIVE" data-i18n="eloka_filter_live"></option><option value="MEMORY" data-i18n="eloka_filter_memory"></option><option value="ALL" data-i18n="eloka_filter_all"></option></select><label for="eloka-threat-filter" data-i18n="eloka_filter_threat"></label><select id="eloka-threat-filter"><option value="ALL" data-i18n="eloka_filter_all"></option><option value="LOW" data-i18n="eloka_threat_low"></option><option value="MEDIUM" data-i18n="eloka_threat_medium"></option><option value="HIGH" data-i18n="eloka_threat_high"></option><option value="CRITICAL" data-i18n="eloka_threat_critical"></option></select><label for="eloka-band-filter" data-i18n="eloka_filter_band"></label><select id="eloka-band-filter"><option value="ALL" data-i18n="eloka_filter_all"></option><option value="a_c">A/C</option><option value="d">D</option><option value="e_f">E/F</option><option value="g_h">G/H</option><option value="i_j">I/J</option><option value="k">K</option></select><output id="eloka-filter-count" aria-live="polite"></output></article><article class="station-card-view station-wide"><h3 data-i18n="station_intercepts"></h3><div id="eloka-intercepts" class="station-list"></div></article></div></section>
|
||||
<section id="station-uboot" class="station-section" data-station-role="uboot" aria-labelledby="station-uboot-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="uboot_side"></p><h2 id="station-uboot-title" data-i18n="station_uboot"></h2></div><div class="station-grid uboot-grid"><article class="station-card-view station-wide uboot-strip" data-uboot-stations="uboot uboot_weapons uboot_engine uboot_esm uboot_nav uboot_radio"><div id="uboot-readouts" class="uboot-readouts"></div><div id="uboot-chips" class="uboot-chips" aria-live="polite"></div><p id="uboot-battery-warning" class="station-alert" role="status" hidden></p><p id="uboot-nav-warning" class="station-alert" role="status" hidden></p></article><article class="station-card-view uboot-depth-card" data-uboot-stations="uboot uboot_nav uboot_engine"><h3 data-i18n="uboot_depth_title"></h3><canvas id="uboot-depth-canvas" class="uboot-canvas" data-i18n-aria="uboot_depth_title"></canvas><div class="uboot-presets" role="group" data-i18n-aria="uboot_depth_presets" data-uboot-stations="uboot uboot_nav"><button type="button" data-uboot-depth-preset="periscope" data-i18n="uboot_preset_periscope"></button><button type="button" data-uboot-depth-preset="snorkel" data-i18n="uboot_preset_snorkel"></button><button type="button" data-uboot-depth-preset="above_layer" data-i18n="uboot_preset_above_layer"></button><button type="button" data-uboot-depth-preset="below_layer" data-i18n="uboot_preset_below_layer"></button><button type="button" data-uboot-depth-preset="deep" data-i18n="uboot_preset_deep"></button></div><form id="uboot-depth-form" class="control-form" data-uboot-stations="uboot uboot_nav"><label for="uboot-depth" data-i18n="uboot_depth"></label><input id="uboot-depth" type="number" min="0" max="1000" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-depth-submit" type="submit" data-i18n="uboot_order_depth"></button></form><div class="uboot-pair" role="group" data-uboot-stations="uboot uboot_nav"><button type="button" data-uboot-mode="uboot_bottom" data-enabled="true" data-i18n="uboot_bottom_on"></button><button type="button" data-uboot-mode="uboot_bottom" data-enabled="false" data-i18n="uboot_bottom_off"></button></div></article><article class="station-card-view station-controls card-controls" data-uboot-stations="uboot uboot_nav"><h3 data-i18n="uboot_nav_title"></h3><form id="uboot-course-form" class="control-form"><label for="uboot-course" data-i18n="uboot_course"></label><input id="uboot-course" type="number" min="0" max="359.99999999999994" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-course-submit" type="submit" data-i18n="uboot_order_course"></button></form><dl id="uboot-navigation" class="detail-metrics compact-metrics"></dl><div class="uboot-pair" role="group" data-uboot-stations="uboot"><button id="uboot-ping" type="button" data-i18n="uboot_ping"></button><button id="uboot-bt" type="button" data-i18n="uboot_bt"></button></div></article><article class="station-card-view station-controls card-controls uboot-threat-card" data-uboot-stations="uboot uboot_nav" aria-labelledby="uboot-threat-title"><h3 id="uboot-threat-title" data-i18n="uboot_threat_title"></h3><p id="uboot-threat-warning" class="station-alert" role="status" hidden></p><dl id="uboot-threat" class="detail-metrics compact-metrics"></dl><h4 data-i18n="uboot_threat_advice"></h4><div id="uboot-threat-advice" class="station-list compact-list"></div><button id="uboot-evade" type="button" class="danger" data-i18n="uboot_evade"></button><p id="uboot-evade-plan" class="uboot-scope-status" role="status"></p><h4 data-i18n="uboot_threat_intercepts"></h4><div id="uboot-threat-intercepts" class="station-list compact-list"></div></article><article class="station-card-view station-controls card-controls" data-uboot-stations="uboot uboot_engine"><h3 data-i18n="uboot_plant"></h3><div class="uboot-telegraph" role="group" data-i18n-aria="uboot_telegraph"><button type="button" data-uboot-speed-step="0"></button><button type="button" data-uboot-speed-step="1"></button><button type="button" data-uboot-speed-step="2"></button><button type="button" data-uboot-speed-step="3"></button><button type="button" data-uboot-speed-step="4"></button><button type="button" data-uboot-speed-step="5"></button></div><form id="uboot-speed-form" class="control-form"><label for="uboot-speed" data-i18n="uboot_speed"></label><input id="uboot-speed" type="number" min="0" max="40" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-speed-submit" type="submit" data-i18n="uboot_order_speed"></button></form><div class="uboot-pair" role="group"><button type="button" data-uboot-mode="uboot_silent" data-enabled="true" data-i18n="uboot_silent_on"></button><button type="button" data-uboot-mode="uboot_silent" data-enabled="false" data-i18n="uboot_silent_off"></button></div><div class="uboot-pair" role="group" data-uboot-stations="uboot_enginLine truncated
|
||||
<section id="station-uboot" class="station-section" data-station-role="uboot" aria-labelledby="station-uboot-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="uboot_side"></p><h2 id="station-uboot-title" data-i18n="station_uboot"></h2></div><div class="station-grid uboot-grid"><article class="station-card-view station-wide uboot-strip" data-uboot-stations="uboot uboot_weapons uboot_engine uboot_esm uboot_nav uboot_radio"><div id="uboot-readouts" class="uboot-readouts"></div><div id="uboot-chips" class="uboot-chips" aria-live="polite"></div><p id="uboot-battery-warning" class="station-alert" role="status" hidden></p><p id="uboot-nav-warning" class="station-alert" role="status" hidden></p></article><article class="station-card-view uboot-depth-card" data-uboot-stations="uboot uboot_nav uboot_engine"><h3 data-i18n="uboot_depth_title"></h3><canvas id="uboot-depth-canvas" class="uboot-canvas" data-i18n-aria="uboot_depth_title"></canvas><div class="uboot-presets" role="group" data-i18n-aria="uboot_depth_presets" data-uboot-stations="uboot uboot_nav"><button type="button" data-uboot-depth-preset="periscope" data-i18n="uboot_preset_periscope"></button><button type="button" data-uboot-depth-preset="snorkel" data-i18n="uboot_preset_snorkel"></button><button type="button" data-uboot-depth-preset="above_layer" data-i18n="uboot_preset_above_layer"></button><button type="button" data-uboot-depth-preset="below_layer" data-i18n="uboot_preset_below_layer"></button><button type="button" data-uboot-depth-preset="deep" data-i18n="uboot_preset_deep"></button></div><form id="uboot-depth-form" class="control-form" data-uboot-stations="uboot uboot_nav"><label for="uboot-depth" data-i18n="uboot_depth"></label><input id="uboot-depth" type="number" min="0" max="1000" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-depth-submit" type="submit" data-i18n="uboot_order_depth"></button></form><div class="uboot-pair" role="group" data-uboot-stations="uboot uboot_nav"><button type="button" data-uboot-mode="uboot_bottom" data-enabled="true" data-i18n="uboot_bottom_on"></button><button type="button" data-uboot-mode="uboot_bottom" data-enabled="false" data-i18n="uboot_bottom_off"></button></div></article><article class="station-card-view station-controls card-controls" data-uboot-stations="uboot uboot_nav"><h3 data-i18n="uboot_nav_title"></h3><form id="uboot-course-form" class="control-form"><label for="uboot-course" data-i18n="uboot_course"></label><input id="uboot-course" type="number" min="0" max="359.99999999999994" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-course-submit" type="submit" data-i18n="uboot_order_course"></button></form><dl id="uboot-navigation" class="detail-metrics compact-metrics"></dl><div class="uboot-pair" role="group" data-uboot-stations="uboot"><button id="uboot-ping" type="button" data-i18n="uboot_ping"></button><button id="uboot-bt" type="button" data-i18n="uboot_bt"></button></div></article><article class="station-card-view station-controls card-controls uboot-threat-card" data-uboot-stations="uboot uboot_nav" aria-labelledby="uboot-threat-title"><h3 id="uboot-threat-title" data-i18n="uboot_threat_title"></h3><p id="uboot-threat-warning" class="station-alert" role="status" hidden></p><dl id="uboot-threat" class="detail-metrics compact-metrics"></dl><h4 data-i18n="uboot_threat_advice"></h4><div id="uboot-threat-advice" class="station-list compact-list"></div><button id="uboot-evade" type="button" class="danger" data-i18n="uboot_evade"></button><p id="uboot-evade-plan" class="uboot-scope-status" role="status"></p><h4 data-i18n="uboot_threat_intercepts"></h4><div id="uboot-threat-intercepts" class="station-list compact-list"></div></article><article class="station-card-view station-controls card-controls" data-uboot-stations="uboot uboot_engine"><h3 data-i18n="uboot_plant"></h3><div class="uboot-telegraph" role="group" data-i18n-aria="uboot_telegraph"><button type="button" data-uboot-speed-step="0"></button><button type="button" data-uboot-speed-step="1"></button><button type="button" data-uboot-speed-step="2"></button><button type="button" data-uboot-speed-step="3"></button><button type="button" data-uboot-speed-step="4"></button><button type="button" data-uboot-speed-step="5"></button></div><form id="uboot-speed-form" class="control-form"><label for="uboot-speed" data-i18n="uboot_speed"></label><input id="uboot-speed" type="number" min="0" max="40" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-speed-submit" type="submit" data-i18n="uboot_order_speed"></button></form><div class="uboot-pair" role="group"><button type="button" data-uboot-mode="uboot_silent" data-enabled="true" data-i18n="uboot_silent_on"></button><button type="button" data-uboot-mode="uboot_silent" data-enabled="false" data-i18n="uboot_silent_off"></button></div><div class="uboot-pair" role="group" data-uboot-stations="uboot_enginLine truncated
|
||||
</section>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
@@ -53,6 +53,8 @@ export const reasons = {
|
||||
uboot_no_air_stores: "reason_uboot_no_air_stores",
|
||||
uboot_no_antenna: "reason_uboot_no_antenna", uboot_transmitting: "reason_uboot_transmitting",
|
||||
uboot_no_solution: "reason_uboot_no_solution",
|
||||
uboot_tube_dry: "reason_uboot_tube_dry", uboot_tubes_full: "reason_uboot_tubes_full",
|
||||
uboot_no_dry_tube: "reason_uboot_no_dry_tube",
|
||||
ok: "reason_ok",
|
||||
};
|
||||
// Listening streams: frigate sonar, helicopter and the submarine's sonar room.
|
||||
|
||||
@@ -304,10 +304,12 @@ export function validateV2State(state) {
|
||||
[status.emergency_ascent, status.blow_available, status.transmitting].some((value) => typeof value !== "boolean") ||
|
||||
(status.battery !== null && !finite(status.battery)) ||
|
||||
(status.endurance_phase !== null && (typeof status.endurance_phase !== "string" || status.endurance_phase.length > 16)) ||
|
||||
!exactKeys(weapons, ["torpedoes", "tubes_ready", "reload_s", "ready", "reason", "arc_center_deg", "arc_width_deg", "decoys", "decoy_ready"]) ||
|
||||
!exactKeys(weapons, ["torpedoes", "tubes_ready", "tubes", "reload_s", "ready", "reason", "arc_center_deg", "arc_width_deg", "decoys", "decoy_ready"]) ||
|
||||
!boundedArray(weapons.tubes, 32) || weapons.tubes.some((row) => !exactKeys(row, ["state", "seconds"]) ||
|
||||
!["empty", "loading", "dry", "flooding", "flooded"].includes(row.state) || (row.seconds !== null && !finite(row.seconds))) ||
|
||||
[weapons.torpedoes, weapons.tubes_ready, weapons.decoys].some((value) => !Number.isInteger(value) || value < 0) ||
|
||||
typeof weapons.ready !== "boolean" || typeof weapons.decoy_ready !== "boolean" ||
|
||||
(weapons.reason !== null && !["not_ready", "no_torpedoes", "reloading", "out_of_arc"].includes(weapons.reason)) ||
|
||||
(weapons.reason !== null && !["not_ready", "no_torpedoes", "reloading", "out_of_arc", "uboot_compartment_down", "uboot_tube_dry"].includes(weapons.reason)) ||
|
||||
[weapons.reload_s, weapons.arc_center_deg, weapons.arc_width_deg].some((value) => value !== null && !finite(value)) ||
|
||||
!exactKeys(alarms, ["ping_age_s", "torpedo_age_s", "ping_bearing", "torpedo_bearing", "esm"]) ||
|
||||
[alarms.ping_age_s, alarms.torpedo_age_s, alarms.ping_bearing, alarms.torpedo_bearing].some((value) => value !== null && !finite(value)) ||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { S } from "../state/store.js";
|
||||
import { $ } from "../core/base.js";
|
||||
import { duration, number, stateText, t, unit } from "../core/format.js";
|
||||
import { fillFireTargets, metrics, node, sonarEntries, stationRows, yesNo } from "../views/dom.js";
|
||||
import { actionButton, fillFireTargets, metrics, node, sonarEntries, stationRows, yesNo } from "../views/dom.js";
|
||||
import { renderCrew } from "../views/crew.js";
|
||||
import { drawBoatBallast, drawBoatDamage, drawBoatDepth, drawBoatEsm, drawBoatScope } from "./uboot-graphics.js";
|
||||
|
||||
@@ -21,6 +21,17 @@ function showStationCards(role) {
|
||||
document.querySelector("#station-uboot .uboot-grid").dataset.role = role;
|
||||
}
|
||||
|
||||
// The torpedo room: each tube's state, with its load or flood order.
|
||||
function renderTubes(tubes) {
|
||||
$("uboot-tubes").replaceChildren(...(tubes.length ? tubes.map((row, index) => {
|
||||
const line = node("p", undefined, "uboot-log-line");
|
||||
line.append(node("span", t(`uboot_tube_${row.state}`, {tube: index + 1, seconds: number(row.seconds, 0)})));
|
||||
if (row.state === "empty") line.append(actionButton("uboot_tube_load", "uboot_tube_load", {tube: index}));
|
||||
if (row.state === "dry") line.append(actionButton("uboot_tube_flood", "uboot_tube_flood", {tube: index}));
|
||||
return line;
|
||||
}) : [node("p", t("station_none"), "uboot-log-line")]));
|
||||
}
|
||||
|
||||
// The boat log as compact lines, newest first.
|
||||
function renderLog(feed) {
|
||||
$("uboot-feed").replaceChildren(...(feed.length ? [...feed].reverse().map((row) => {
|
||||
@@ -458,6 +469,7 @@ export function renderUbootStation(payload) {
|
||||
["uboot_tubes_ready", number(weapons.tubes_ready, 0)], ["reload", unit(weapons.reload_s, "s", 0)],
|
||||
["uboot_decoys", number(weapons.decoys, 0)],
|
||||
["uboot_torpedo_alarm", alarmText(alarms.torpedo_age_s, alarms.torpedo_bearing)]]);
|
||||
renderTubes(weapons.tubes);
|
||||
metrics($("uboot-alarms"), [
|
||||
["uboot_ping_heard", alarmText(alarms.ping_age_s, alarms.ping_bearing)],
|
||||
["uboot_torpedo_alarm", alarmText(alarms.torpedo_age_s, alarms.torpedo_bearing)]]);
|
||||
|
||||
+44
-44
@@ -4411,7 +4411,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 4,
|
||||
"ready_count": 4,
|
||||
"reload_s": 0,
|
||||
"reload_s": 240,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4424,7 +4424,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 5,
|
||||
"ready_count": 5,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4437,7 +4437,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 8,
|
||||
"ready_count": 8,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4450,7 +4450,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 5,
|
||||
"ready_count": 5,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4463,7 +4463,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 5,
|
||||
"ready_count": 5,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4476,7 +4476,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 4,
|
||||
"ready_count": 4,
|
||||
"reload_s": 60,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 90,
|
||||
"vls_cells": null,
|
||||
@@ -4489,7 +4489,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 8,
|
||||
"ready_count": 8,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4502,7 +4502,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 8,
|
||||
"ready_count": 8,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4515,7 +4515,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 8,
|
||||
"ready_count": 8,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4528,7 +4528,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 4,
|
||||
"ready_count": 4,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4541,7 +4541,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 4,
|
||||
"ready_count": 4,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4554,7 +4554,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 8,
|
||||
"ready_count": 8,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4567,7 +4567,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 5,
|
||||
"ready_count": 5,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4580,7 +4580,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 4,
|
||||
"ready_count": 4,
|
||||
"reload_s": 0,
|
||||
"reload_s": 240,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4593,7 +4593,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 5,
|
||||
"ready_count": 5,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4606,7 +4606,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 5,
|
||||
"ready_count": 5,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4619,7 +4619,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 8,
|
||||
"ready_count": 8,
|
||||
"reload_s": 60,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 120,
|
||||
"vls_cells": null,
|
||||
@@ -4632,7 +4632,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 12,
|
||||
"ready_count": 12,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4645,7 +4645,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 12,
|
||||
"ready_count": 12,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4658,7 +4658,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 8,
|
||||
"ready_count": 8,
|
||||
"reload_s": 0,
|
||||
"reload_s": 120,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4671,7 +4671,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 8,
|
||||
"ready_count": 8,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4684,7 +4684,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 5,
|
||||
"ready_count": 5,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4697,7 +4697,7 @@
|
||||
"launcher_type": "torpedo_tube",
|
||||
"mount_count": 5,
|
||||
"ready_count": 5,
|
||||
"reload_s": 0,
|
||||
"reload_s": 180,
|
||||
"arc_center_deg": 0,
|
||||
"arc_width_deg": 360,
|
||||
"vls_cells": null,
|
||||
@@ -4710,27 +4710,27 @@
|
||||
{
|
||||
"key": "magazine.diesel_alt.torpedoes",
|
||||
"weapon_key": "weapon.diesel_alt.torpedo",
|
||||
"mission_count": 4
|
||||
"mission_count": 8
|
||||
},
|
||||
{
|
||||
"key": "magazine.aip_modern.torpedoes",
|
||||
"weapon_key": "weapon.aip_modern.torpedo",
|
||||
"mission_count": 5
|
||||
"mission_count": 10
|
||||
},
|
||||
{
|
||||
"key": "magazine.ssn.torpedoes",
|
||||
"weapon_key": "weapon.ssn.torpedo",
|
||||
"mission_count": 8
|
||||
"mission_count": 16
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_01.torpedoes",
|
||||
"weapon_key": "weapon.sub_01.torpedo",
|
||||
"mission_count": 5
|
||||
"mission_count": 10
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_02.torpedoes",
|
||||
"weapon_key": "weapon.sub_02.torpedo",
|
||||
"mission_count": 5
|
||||
"mission_count": 10
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_03.torpedoes",
|
||||
@@ -4740,52 +4740,52 @@
|
||||
{
|
||||
"key": "magazine.sub_04.torpedoes",
|
||||
"weapon_key": "weapon.sub_04.torpedo",
|
||||
"mission_count": 8
|
||||
"mission_count": 16
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_05.torpedoes",
|
||||
"weapon_key": "weapon.sub_05.torpedo",
|
||||
"mission_count": 8
|
||||
"mission_count": 16
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_06.torpedoes",
|
||||
"weapon_key": "weapon.sub_06.torpedo",
|
||||
"mission_count": 8
|
||||
"mission_count": 16
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_07.torpedoes",
|
||||
"weapon_key": "weapon.sub_07.torpedo",
|
||||
"mission_count": 4
|
||||
"mission_count": 8
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_08.torpedoes",
|
||||
"weapon_key": "weapon.sub_08.torpedo",
|
||||
"mission_count": 4
|
||||
"mission_count": 8
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_09.torpedoes",
|
||||
"weapon_key": "weapon.sub_09.torpedo",
|
||||
"mission_count": 8
|
||||
"mission_count": 16
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_10.torpedoes",
|
||||
"weapon_key": "weapon.sub_10.torpedo",
|
||||
"mission_count": 5
|
||||
"mission_count": 10
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_11.torpedoes",
|
||||
"weapon_key": "weapon.sub_11.torpedo",
|
||||
"mission_count": 4
|
||||
"mission_count": 8
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_12.torpedoes",
|
||||
"weapon_key": "weapon.sub_12.torpedo",
|
||||
"mission_count": 5
|
||||
"mission_count": 10
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_13.torpedoes",
|
||||
"weapon_key": "weapon.sub_13.torpedo",
|
||||
"mission_count": 5
|
||||
"mission_count": 10
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_14.torpedoes",
|
||||
@@ -4795,32 +4795,32 @@
|
||||
{
|
||||
"key": "magazine.sub_15.torpedoes",
|
||||
"weapon_key": "weapon.sub_15.torpedo",
|
||||
"mission_count": 12
|
||||
"mission_count": 24
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_16.torpedoes",
|
||||
"weapon_key": "weapon.sub_16.torpedo",
|
||||
"mission_count": 12
|
||||
"mission_count": 24
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_17.torpedoes",
|
||||
"weapon_key": "weapon.sub_17.torpedo",
|
||||
"mission_count": 8
|
||||
"mission_count": 16
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_18.torpedoes",
|
||||
"weapon_key": "weapon.sub_18.torpedo",
|
||||
"mission_count": 8
|
||||
"mission_count": 16
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_19.torpedoes",
|
||||
"weapon_key": "weapon.sub_19.torpedo",
|
||||
"mission_count": 5
|
||||
"mission_count": 10
|
||||
},
|
||||
{
|
||||
"key": "magazine.sub_20.torpedoes",
|
||||
"weapon_key": "weapon.sub_20.torpedo",
|
||||
"mission_count": 5
|
||||
"mission_count": 10
|
||||
}
|
||||
],
|
||||
"countermeasures": [
|
||||
|
||||
+30
-1
@@ -5606,5 +5606,34 @@
|
||||
"uboot.esm.fit.poor": "passt schwach",
|
||||
"commander.web.uboot_esm_fit_good": "passt gut",
|
||||
"commander.web.uboot_esm_fit_fair": "passt mittel",
|
||||
"commander.web.uboot_esm_fit_poor": "passt schwach"
|
||||
"commander.web.uboot_esm_fit_poor": "passt schwach",
|
||||
"uboot.tube.empty": "{tube} leer",
|
||||
"uboot.tube.loading": "{tube} lädt {seconds} s",
|
||||
"uboot.tube.dry": "{tube} trocken",
|
||||
"uboot.tube.flooding": "{tube} flutet {seconds} s",
|
||||
"uboot.tube.flooded": "{tube} klar",
|
||||
"uboot.line.tubes": "Rohre: {tubes}",
|
||||
"uboot.footer.tube_load": "ROHR LADEN",
|
||||
"uboot.footer.tube_flood": "ROHR FLUTEN",
|
||||
"uboot.local.tube_loading": "Rohr wird geladen",
|
||||
"uboot.local.tube_flooding": "Rohr wird geflutet, Mündungsklappe öffnet",
|
||||
"uboot.local.tube_rejected": "Rohrbefehl nicht möglich: {reason}",
|
||||
"uboot.reason.uboot_tube_dry": "kein Rohr geflutet",
|
||||
"uboot.reason.uboot_tubes_full": "kein Rohr leer",
|
||||
"uboot.reason.uboot_no_dry_tube": "kein geladenes trockenes Rohr",
|
||||
"uboot.event.tube_loaded": "Rohr {tube} geladen.",
|
||||
"uboot.event.tube_flooded": "Rohr {tube} geflutet, Mündungsklappe offen.",
|
||||
"commander.web.uboot_tubes_title": "Torpedorohre",
|
||||
"commander.web.uboot_tube_empty": "Rohr {tube}: leer",
|
||||
"commander.web.uboot_tube_loading": "Rohr {tube}: wird geladen, {seconds} s",
|
||||
"commander.web.uboot_tube_dry": "Rohr {tube}: geladen, trocken",
|
||||
"commander.web.uboot_tube_flooding": "Rohr {tube}: wird geflutet, {seconds} s",
|
||||
"commander.web.uboot_tube_flooded": "Rohr {tube}: geflutet, schussklar",
|
||||
"commander.web.uboot_tube_load": "Laden",
|
||||
"commander.web.uboot_tube_flood": "Fluten",
|
||||
"commander.web.reason_uboot_tube_dry": "Kein Rohr geflutet: erst ein geladenes Rohr fluten.",
|
||||
"commander.web.reason_uboot_tubes_full": "Kein leeres Rohr zum Laden.",
|
||||
"commander.web.reason_uboot_no_dry_tube": "Kein geladenes, trockenes Rohr zum Fluten.",
|
||||
"help.uboot.tube_load": "Nächstes leeres Torpedorohr laden (Waffen)",
|
||||
"help.uboot.tube_flood": "Nächstes geladenes Rohr fluten und Mündungsklappe öffnen; nur ein geflutetes Rohr schießt (Waffen)"
|
||||
}
|
||||
+30
-1
@@ -5606,5 +5606,34 @@
|
||||
"uboot.esm.fit.poor": "poor fit",
|
||||
"commander.web.uboot_esm_fit_good": "good fit",
|
||||
"commander.web.uboot_esm_fit_fair": "fair fit",
|
||||
"commander.web.uboot_esm_fit_poor": "poor fit"
|
||||
"commander.web.uboot_esm_fit_poor": "poor fit",
|
||||
"uboot.tube.empty": "{tube} empty",
|
||||
"uboot.tube.loading": "{tube} loading {seconds} s",
|
||||
"uboot.tube.dry": "{tube} dry",
|
||||
"uboot.tube.flooding": "{tube} flooding {seconds} s",
|
||||
"uboot.tube.flooded": "{tube} ready",
|
||||
"uboot.line.tubes": "Tubes: {tubes}",
|
||||
"uboot.footer.tube_load": "LOAD TUBE",
|
||||
"uboot.footer.tube_flood": "FLOOD TUBE",
|
||||
"uboot.local.tube_loading": "Loading tube",
|
||||
"uboot.local.tube_flooding": "Flooding tube, opening outer door",
|
||||
"uboot.local.tube_rejected": "Tube order not possible: {reason}",
|
||||
"uboot.reason.uboot_tube_dry": "no flooded tube",
|
||||
"uboot.reason.uboot_tubes_full": "no empty tube",
|
||||
"uboot.reason.uboot_no_dry_tube": "no loaded dry tube",
|
||||
"uboot.event.tube_loaded": "Tube {tube} loaded.",
|
||||
"uboot.event.tube_flooded": "Tube {tube} flooded, outer door open.",
|
||||
"commander.web.uboot_tubes_title": "Torpedo tubes",
|
||||
"commander.web.uboot_tube_empty": "Tube {tube}: empty",
|
||||
"commander.web.uboot_tube_loading": "Tube {tube}: loading, {seconds} s",
|
||||
"commander.web.uboot_tube_dry": "Tube {tube}: loaded, dry",
|
||||
"commander.web.uboot_tube_flooding": "Tube {tube}: flooding, {seconds} s",
|
||||
"commander.web.uboot_tube_flooded": "Tube {tube}: flooded, ready to fire",
|
||||
"commander.web.uboot_tube_load": "Load",
|
||||
"commander.web.uboot_tube_flood": "Flood",
|
||||
"commander.web.reason_uboot_tube_dry": "No flooded tube: flood a loaded tube first.",
|
||||
"commander.web.reason_uboot_tubes_full": "No empty tube to load.",
|
||||
"commander.web.reason_uboot_no_dry_tube": "No loaded, dry tube to flood.",
|
||||
"help.uboot.tube_load": "Load the next empty torpedo tube (Weapons)",
|
||||
"help.uboot.tube_flood": "Flood the next loaded tube and open its outer door; only a flooded tube fires (Weapons)"
|
||||
}
|
||||
@@ -105,7 +105,7 @@ Eine zweite Crew kann den Gegner spielen. Das U-Boot hat sieben Stationen: Führ
|
||||
|
||||
- **Stationen:** Die *Führung* befiehlt Kurs, Fahrt und Tiefe, legt das U-Boot auf Grund, pingt, nimmt eine BT-Messung und sieht das ganze U-Boot. Die *Navigation* befiehlt Kurs und Tiefe, führt den Plot des U-Boots und überwacht Kiel und Hindernisse. Die *Maschine* bedient Telegraf, Schnorchel, Schleichfahrt, Trimm und Notanblasen und überwacht Batterie und Lärm. *Mast & ESM* fährt den Mast aus und überwacht ESM und Alarme; auch die Führung darf ihn ausfahren, um durchs Sehrohr zu sehen. Die *Waffen* schießen, lenken die Drähte und stoßen Täuschkörper aus. Das *Sonar* ist der Sonarraum des U-Boots. Der *Funkraum* nimmt den Rundspruch der Führung auf und sendet Lagemeldungen; er darf für seine Antenne den Mast ausfahren. Jeder Befehl wird nur von der Station angenommen, zu der er gehört.
|
||||
- **Tiefenstufen und Anzeigen:** Führung und Navigation befehlen die Tiefe in einem Schritt: Sehrohrtiefe (15 m, der Mast bleibt nutzbar), Schnorcheltiefe (U-Boote mit Schnorchel), über oder unter dem Layer (15 m darüber / 30 m darunter; erst nach der eigenen BT-Messung, denn nur daraus kennt die Crew den Layer) und tief (die sichere Tiefe über dem kartierten Grund). Am uConsole sind das `U`, `Umschalt+U`, `J`, `Umschalt+J` und `H`. Der Browser zeigt die Wassersäule (Oberfläche, Sehrohrtiefe, gemessener Layer, Soll-, sichere und Zerstörungstiefe, Grund, das U-Boot und seine Tauchrichtung), große Anzeigen für Kurs, Fahrt, Tiefe und Batterie mit farbigen Betriebs- und Alarmchips sowie eine ESM-Rose mit der Peilung jedes Emitters und den Peilungen von Ping- und Torpedoalarm; die Seite Mast & ESM am uConsole hat dieselbe Rose. Mast, Schnorchel, Schleichfahrt und Auf-Grund-Legen haben getrennte Knöpfe zum Ein- und Ausschalten.
|
||||
- **Befehle und Waffen:** das U-Boot folgt Kurs-, Fahrt- und Tiefenbefehlen im Rahmen seiner Wende-, Tiefen- und Beschleunigungsgrenzen; Fahrtstufen (Stopp, 3, 6, 10, 15 kn, Maximum) setzen die Fahrt schnell. Schießt einen Torpedo auf die gemessene Peilung eines Sonarkontakts, mit Ping-Fix oder TMA-Lösung, solange aktuell, oder auf eine freie Peilung mit optionaler Entfernung; der Schuss braucht ein klares Rohr und das Ziel im Schussfeld der Rohre. Die Crew stellt die Lauftiefe ein (5-300 m, sonst eine flache Voreinstellung) und schießt einen Torpedo oder zwei im Fächer von ±4°, jeder mit eigenem Datum. Jeder Crew-Torpedo läuft am Draht: die Crew kann sein Datum versetzen (Peilung und Entfernung vom U-Boot), und der Draht dreht ihn darauf ein, bis sein Suchkopf erfasst; schneller als 10 kn oder stärker als 1,5°/s drehen für 5 s lässt den Draht reißen, ebenso eine abgelaufene Spule, und die Crew kann ihn kappen. Stößt einen Täuschkörper aus und bläst im Notfall die Hauptzellen an (mit voller Pressluft dreimal).
|
||||
- **Befehle und Waffen:** das U-Boot folgt Kurs-, Fahrt- und Tiefenbefehlen im Rahmen seiner Wende-, Tiefen- und Beschleunigungsgrenzen; Fahrtstufen (Stopp, 3, 6, 10, 15 kn, Maximum) setzen die Fahrt schnell. Schießt einen Torpedo auf die gemessene Peilung eines Sonarkontakts, mit Ping-Fix oder TMA-Lösung, solange aktuell, oder auf eine freie Peilung mit optionaler Entfernung; der Schuss braucht ein geflutetes, geladenes Rohr und das Ziel im Schussfeld der Rohre. **Rohre:** Die Crew übernimmt die geladenen Rohre geflutet. Ein leergeschossenes Rohr bleibt leer, bis die Torpedogasten es aus den Reserven laden, sofern dort noch ein Torpedo liegt (`M` an der Station Waffen, Browser: Laden; jedes U-Boot führt mindestens noch einmal so viele Reservetorpedos wie Rohre, und das Laden dauert 2 min auf einem Atom-U-Boot, 3 min auf einem konventionellen und 4 min auf den älteren Dieselklassen, langsamer bei verbrauchter Luft); ein geladenes Rohr ist trocken und muss vor dem Schuss geflutet werden, was die Mündungsklappe öffnet, 20 s dauert und 4 s lang wie ein kurzer Transient hörbar ist (`Shift+M`, Browser: Fluten). Die Station Waffen und der Browser zeigen jedes Rohr als leer, lädt, trocken, flutet oder klar, und das Log meldet jedes geladene und geflutete Rohr. Die U-Boote der KI laden und fluten selbst. Die Crew stellt die Lauftiefe ein (5-300 m, sonst eine flache Voreinstellung) und schießt einen Torpedo oder zwei im Fächer von ±4°, jeder mit eigenem Datum. Jeder Crew-Torpedo läuft am Draht: die Crew kann sein Datum versetzen (Peilung und Entfernung vom U-Boot), und der Draht dreht ihn darauf ein, bis sein Suchkopf erfasst; schneller als 10 kn oder stärker als 1,5°/s drehen für 5 s lässt den Draht reißen, ebenso eine abgelaufene Spule, und die Crew kann ihn kappen. Stößt einen Täuschkörper aus und bläst im Notfall die Hauptzellen an (mit voller Pressluft dreimal).
|
||||
- **Anlage und U-Boot-Betrieb:** ein besetztes U-Boot taucht nie von selbst auf, schnorchelt nicht und funkt nicht von selbst. Die Batterie entlädt sich mit Fahrt und Bordnetz; unter 20 % warnt das U-Boot-Log, eine leere Batterie begrenzt die Fahrt auf das, was die Anlage noch liefert (eine AIP-Anlage übernimmt die Last weiterhin selbst). **Schnorcheln** betreibt die Diesel auf Schnorcheltiefe und lädt die Batterie, höchstens 6 kn; tieferes Tauchen schließt das Kopfventil. Die laufenden Diesel sind laut: +12 dB abgestrahlter Pegel, ein niedrigerer Stillefaktor und zwei Zündlinien bei 50 und 100 Hz in der LOFAR-Signatur des U-Boots (auch bei KI-U-Booten). **Schleichfahrt** begrenzt das U-Boot auf 5 kn und macht es so leise wie ein lauerndes KI-U-Boot. **Auf Grund legen** stoppt das U-Boot 3 m über dem Grund, wo das Wasser nicht tiefer als die Tauchtiefe ist: leise und ohne Drift; jeder Fahrt- oder Tiefenbefehl hebt ab. Vor Land oder einer Untiefe stoppt das U-Boot, statt auszuweichen, und das Log warnt bei wenig Wasser unter dem Kiel.
|
||||
- **Energie und Vorräte:** die Maschine zeigt unter **Energie & Vorräte** (Karte im Browser, auf der uConsole Maschine Seite 2 **Vorräte**) die Energiebilanz bei der aktuellen Fahrt (Verbrauch, Erzeugung und Bilanz in kW, die Zeit bis die Batterie leer oder voll ist), Batterie und AIP-Sauerstoff, die Dieselbunker und eine Tabelle, wie lange die Batterie getaucht bei jeder Telegrafenstufe reicht und wie weit das U-Boot damit kommt. **Diesel:** die Bunker fassen 300 Stunden volle Generatorleistung, eine Fahrt beginnt mit 65 %; nur laufende Diesel verbrauchen (0,27 l je kWh), das Log warnt bei 10 %, und mit leeren Bunkern lädt Schnorcheln nicht mehr. Die **Laderate** bestimmt, was Schnorcheln tut: *voll* (die ganze Generatorleistung, +12 dB und beide Diesellinien), *halb* (die halbe Leistung, +9 dB, schwächere Linien) oder *nur lüften* (die Lüfter ohne Diesel, +4 dB, keine Linien). **Luft:** getaucht verbraucht die Crew Sauerstoff und atmet Kohlendioxid aus (je etwa 0,45 % pro Stunde); ein CO2-Absorbersatz nimmt CO2 auf, bis er verbraucht ist (8 Ersatzsätze), eine O2-Kerze setzt in 15 Minuten 1 % O2 zu (12 an Bord, eine zur Zeit), und Schnorcheln lüftet das U-Boot in wenigen Minuten Richtung Frischluft. Ab 3 % CO2 oder unter 18 % O2 ist die Luft verbraucht, ab 5 % CO2 oder unter 16 % O2 gefährlich; das Log warnt bei jeder Stufe. Schlechte Luft macht die Crew langsamer (bis 30 % Leistung), und die Torpedomannschaft lädt entsprechend langsamer nach. KI-U-Boote versorgen ihre Luft selbst und tauchen zum Lüften auf, wenn sie gefährlich wird. Ein Atom-U-Boot hat keine dieser Vorräte.
|
||||
- **Tauchzellen, Trimm und Pressluft:** die Maschine zeigt unter **Tauchzellen & Trimm** (Karte im Browser mit Schnittbild des U-Boots, auf der uConsole Maschine Seite 3 **Zellen**) die Hauptzellen, die Regelzelle, die Trimmzellen, die Pressluft und den Trimmzustand des U-Boots. Jede Gewichtsänderung bringt das U-Boot aus dem Gleichgewicht: ein Torpedo aus einem Bugrohr macht es 1,5 t leichter und achterlastig, Wasser in vollgelaufenen Abteilungen (siehe Leckwehr) macht es schwerer und trimmt es zum gefluteten Ende; die Trimmautomatik gleicht davon aus, was ihre Zellen fassen. Mit der **Trimmautomatik** pumpt der LI die Regelzelle (±8 t, 25 kg/s) und die Trimmzellen (±3 t vorn und achtern, 15 kg/s) zurück ins Gleichgewicht; von Hand verschiebt jeder Befehl die Regelzelle um 0,5 t oder das Trimmwasser um 0,25 t (und schaltet die Automatik aus). Laufende Trimmpumpen sind hörbar (+3 dB und eine Linie bei 120 Hz). Was die Zellen nicht aufnehmen, lässt das U-Boot mit 0,03 m/s je Tonne sinken oder steigen, und ein Trimmwinkel (1° je Tonne Moment, + vorlastig) drückt es mit Fahrt nach unten oder oben; die Tiefenruder halten das nur mit Fahrt, ein schweres U-Boot sinkt bei wenig Fahrt unter seine befohlene Tiefe; das Log warnt ab 2 t und ab 3°. Die **Pressluft** (200 bar) reicht für drei Notanblasungen zu je 60 bar; Anblasen leert die Hauptzellen in 20 s, das U-Boot steigt auf 10 m und bleibt dort, die befohlene Tiefe steht dann auf 10 m. Der nächste Befehl unter 12 m öffnet die Entlüftung: die Hauptzellen fluten in 40 s, erst dann kann das U-Boot tauchen. Schnorcheln auf Diesel betreibt den Kompressor (0,05 bar/s); mit nur lüften läuft er nicht. Ohne Strom laufen weder Trimmpumpen noch Kompressor. Die KI-U-Boote halten sich selbst im Trimm und behalten ihr eines Notanblasen.
|
||||
@@ -127,7 +127,7 @@ Eine zweite Crew kann den Gegner spielen. Das U-Boot hat sieben Stationen: Führ
|
||||
|
||||
Jedes neue Spiel fragt zuerst **Welche Einheit spielst du?**: *Fregatte F-217* oder *Feindliches U-Boot* (`Auf`/`Ab` oder `1`/`2`, `Enter`; die letzte Wahl ist vorausgewählt, `--play-sub` wählt das U-Boot vor). Außerhalb einer Mission ändert auch Optionen (`F10`) Seite 2 **uConsole spielt** die Wahl, etwa vor dem Laden eines Spielstands. Mit dem U-Boot führt der uConsole das feindliche U-Boot statt der Fregatte. Die Fregatte wird dann über Remote Crew (`F9`) aus den Browsern besetzt; jede Fregattenstation, die kein Browser hält, besetzen die **KI-Jäger** (unten). Der uConsole zeigt nur das Lagebild des U-Boots; Banner, Ereignislog, Soundeffekte, Plot und Tooltips der Fregatte erscheinen nie, und Trackball- und Telegraphenbedienung der Fregatte sind gesperrt. Die Seite lässt sich nur außerhalb einer Mission wechseln; die Wahl gilt nur für diesen Programmstart und wird nie gespeichert, jeder Start beginnt also mit der Fregatte. Ein Solo-Browser (Remote Crew im Solo-Modus) wählt die Seite genauso: sein Dialog **Neues Spiel** hat ein Feld *Seite*, und mit *U-Boot* übernimmt die Sitzung die sieben Stationen des U-Boots, während die KI-Jäger die Fregatte besetzen.
|
||||
|
||||
Die obere Leiste zeigt die sieben Stationen des U-Boots als Reiter: `1` Führung, `2` Sonar, `3` Waffen, `4` Maschine, `5` Mast & ESM, `6` Navigation, `7` Funkraum (`Tab` oder ein Klick auf den Reiter wechselt). Jede Befehlstaste wirkt nur an der Station, zu der der Befehl gehört, wie im Browser; sonst nennt ein Banner die richtige Station. Browser können gleichzeitig die übrigen Stationen des U-Boots besetzen; eine Station, die ein Browser hält, ist in der oberen Leiste markiert und wird nicht vom uConsole bedient. Jede Station außer dem Sonarraum ist aufgebaut wie die Brücke: links die Seekarte (bekannte Geografie, der eigene Plot des U-Boots, die ESM-Peillinien und Kreuzpeilungen, das eigene U-Boot mit Sollkurs und Fahrtvektor, die Peilstriche der eigenen Sonarkontakte bzw. ihr Symbol bei aktuellem Ping- oder TMA-Fix, die eigenen Torpedos `T1`…, ein begrenztes Schussfeld der Rohre), rechts die Station mit Bedrohungsleiste (Torpedoalarm und gehörtes Aktivsonar mit gemessener Peilung, Rumpfschaden, Kavitation, schwache Batterie, ESM-Radarerfassung) und die Seite der Station. Die **Führung** hat vier Seiten, die **Maschine** vier, **Mast & ESM** zwei und **Navigation** zwei (die Taste der Station erneut oder `Bild auf`/`Bild ab`). Die zweite Seite der Maschine, **Vorräte**, zeigt Energie, Ausdauer und Luft; `R` wechselt die Laderate, `A` setzt einen Absorbersatz ein und `O` zündet eine O2-Kerze. Ihre dritte Seite **Zellen** zeigt das Schnittbild, Hauptzellen und Pressluft, die Zellen mit ihren Sollwerten, Gewicht, Trimmwinkel, Drift ohne Tiefenruder, Wassereinbruch und Pumpen; `↑`/`↓` lenzen oder fluten die Regelzelle, `←`/`→` pumpen Trimmwasser nach achtern oder vorn und `Z` schaltet die Trimmautomatik. Ihre vierte Seite **Leckwehr** zeigt die Abteilungen (Wasser, Leck, Brand, Gas, geschlossene Schotten, Trupps), die Tabelle der Abteilungen, den Strom und beide Trupps; `↑`/`↓` wählen eine Abteilung, `←`/`→` eine Aufgabe, `Enter` schickt Trupp 1 und `Umschalt+Enter` Trupp 2 mit dieser Aufgabe dorthin, und `I` schließt oder öffnet die Schotten der Abteilung. **Navigation** (Seite und Station) zeigt Kurs und Tiefe, das Wasser unter dem Kiel und ein kartiertes Hindernis voraus, Fahrt, Eigenlärm, Batterie und die aktiven Betriebsarten sowie die Wassersäule unter dem U-Boot: U-Boot-Tiefe, befohlene Tiefe, sichere Tiefe und Grund; die Sprungschicht erscheint dort erst nach einer eigenen BT-Messung (`E` am U-Boot-Sonar). **Waffen & Kontakte** (Seite und Station Waffen) zeigt Feuerbereitschaft, Torpedos, klare Rohre, Nachladen, Täuschkörper, Notanblasen und die eigenen Sonarkontakte (Peilung, Entfernung falls bekannt, und Güte in Prozent: der bessere Wert aus Signalgüte und Spurvertrauen, 100 % ist ein sicherer Kontakt). Die **Maschine** zeigt Fahrt, Eigenlärm, Batterie, die Betriebsarten und die Telegrafenstufen; **Mast & ESM** zeigt die Mastzeit, die Rose, die Emitterliste und den gewählten Emitter (Signal, Pegel und Trend, Kreuzpeilung, Einstufung); ihre zweite Seite und die dritte der Führung ist das **Sehrohr** (Okular, Sichtlinie, Licht und die Sichtungsliste; `←`/`→` schwenken, `Enter` Stadimeter). Der **Funkraum** hat eine Seite: Antenne, Rundspruchplan, Fortschritt von Aufnahme und Sendung, die letzte Feindlage der Führung und das Funktagebuch; `Enter` sendet eine Lagemeldung und `P` fährt den Mast aus oder ein. Unten stehen U-Boot-Log und Telemetrie des U-Boots, als Leiste oder Statuszeile wie in den Optionen eingestellt; Befehle, Schüsse und Täuschkörper werden dort protokolliert.
|
||||
Die obere Leiste zeigt die sieben Stationen des U-Boots als Reiter: `1` Führung, `2` Sonar, `3` Waffen, `4` Maschine, `5` Mast & ESM, `6` Navigation, `7` Funkraum (`Tab` oder ein Klick auf den Reiter wechselt). Jede Befehlstaste wirkt nur an der Station, zu der der Befehl gehört, wie im Browser; sonst nennt ein Banner die richtige Station. Browser können gleichzeitig die übrigen Stationen des U-Boots besetzen; eine Station, die ein Browser hält, ist in der oberen Leiste markiert und wird nicht vom uConsole bedient. Jede Station außer dem Sonarraum ist aufgebaut wie die Brücke: links die Seekarte (bekannte Geografie, der eigene Plot des U-Boots, die ESM-Peillinien und Kreuzpeilungen, das eigene U-Boot mit Sollkurs und Fahrtvektor, die Peilstriche der eigenen Sonarkontakte bzw. ihr Symbol bei aktuellem Ping- oder TMA-Fix, die eigenen Torpedos `T1`…, ein begrenztes Schussfeld der Rohre), rechts die Station mit Bedrohungsleiste (Torpedoalarm und gehörtes Aktivsonar mit gemessener Peilung, Rumpfschaden, Kavitation, schwache Batterie, ESM-Radarerfassung) und die Seite der Station. Die **Führung** hat vier Seiten, die **Maschine** vier, **Mast & ESM** zwei und **Navigation** zwei (die Taste der Station erneut oder `Bild auf`/`Bild ab`). Die zweite Seite der Maschine, **Vorräte**, zeigt Energie, Ausdauer und Luft; `R` wechselt die Laderate, `A` setzt einen Absorbersatz ein und `O` zündet eine O2-Kerze. Ihre dritte Seite **Zellen** zeigt das Schnittbild, Hauptzellen und Pressluft, die Zellen mit ihren Sollwerten, Gewicht, Trimmwinkel, Drift ohne Tiefenruder, Wassereinbruch und Pumpen; `↑`/`↓` lenzen oder fluten die Regelzelle, `←`/`→` pumpen Trimmwasser nach achtern oder vorn und `Z` schaltet die Trimmautomatik. Ihre vierte Seite **Leckwehr** zeigt die Abteilungen (Wasser, Leck, Brand, Gas, geschlossene Schotten, Trupps), die Tabelle der Abteilungen, den Strom und beide Trupps; `↑`/`↓` wählen eine Abteilung, `←`/`→` eine Aufgabe, `Enter` schickt Trupp 1 und `Umschalt+Enter` Trupp 2 mit dieser Aufgabe dorthin, und `I` schließt oder öffnet die Schotten der Abteilung. **Navigation** (Seite und Station) zeigt Kurs und Tiefe, das Wasser unter dem Kiel und ein kartiertes Hindernis voraus, Fahrt, Eigenlärm, Batterie und die aktiven Betriebsarten sowie die Wassersäule unter dem U-Boot: U-Boot-Tiefe, befohlene Tiefe, sichere Tiefe und Grund; die Sprungschicht erscheint dort erst nach einer eigenen BT-Messung (`E` am U-Boot-Sonar). **Waffen & Kontakte** (Seite und Station Waffen) zeigt Feuerbereitschaft, Torpedos, klare (geflutete) Rohre, Nachladen, Täuschkörper, Notanblasen, eine Zeile mit dem Zustand jedes Rohrs (`M` lädt das nächste leere Rohr, `Shift+M` flutet das nächste trockene) und die eigenen Sonarkontakte (Peilung, Entfernung falls bekannt, und Güte in Prozent: der bessere Wert aus Signalgüte und Spurvertrauen, 100 % ist ein sicherer Kontakt). Die **Maschine** zeigt Fahrt, Eigenlärm, Batterie, die Betriebsarten und die Telegrafenstufen; **Mast & ESM** zeigt die Mastzeit, die Rose, die Emitterliste und den gewählten Emitter (Signal, Pegel und Trend, Kreuzpeilung, Einstufung); ihre zweite Seite und die dritte der Führung ist das **Sehrohr** (Okular, Sichtlinie, Licht und die Sichtungsliste; `←`/`→` schwenken, `Enter` Stadimeter). Der **Funkraum** hat eine Seite: Antenne, Rundspruchplan, Fortschritt von Aufnahme und Sendung, die letzte Feindlage der Führung und das Funktagebuch; `Enter` sendet eine Lagemeldung und `P` fährt den Mast aus oder ein. Unten stehen U-Boot-Log und Telemetrie des U-Boots, als Leiste oder Statuszeile wie in den Optionen eingestellt; Befehle, Schüsse und Täuschkörper werden dort protokolliert.
|
||||
|
||||
<!-- keys:uboot -->
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ A second crew can play the enemy. The submarine has seven stations: Command, Son
|
||||
|
||||
- **Stations:** *Command* orders course, speed and depth, lies on the bottom, pings and takes a BT, and sees the whole submarine. *Navigation* orders course and depth, keeps the submarine's plot and watches keel and obstacles. *Engine room* runs the telegraph, snorkel, silent running, the trim and the emergency blow and watches battery and noise. *Mast & ESM* raises the mast and watches ESM and alarms; Command may raise it too, to look through the periscope. *Weapons* fires, guides the wires and launches decoys. *Sonar* is the submarine's sonar room. The *Radio room* copies HQ's broadcast and sends situation reports; it may raise the mast for its antenna. Each order is accepted only from the station that owns it.
|
||||
- **Depth steps and displays:** Command and Navigation order depth in one step: periscope depth (15 m, keeps the mast usable), snorkel depth (submarines with a snorkel), above or below the layer (15 m above / 30 m below; only after the submarine's own BT measurement, since the crew knows the layer only from it) and deep (the safe depth over the charted bottom). On the uConsole these are `U`, `Shift+U`, `J`, `Shift+J` and `H`. The browser shows the water column (surface, periscope depth, measured layer, ordered, safe and crush depth, seabed, the submarine and its dive direction), large readouts for course, speed, depth and battery with coloured mode and alarm chips, and an ESM rose with each emitter's strobe and the ping and torpedo alarm bearings; the uConsole's Mast & ESM page has the same rose. Mast, snorkel, silent running and lying on the bottom have separate on and off buttons.
|
||||
- **Orders and weapons:** the submarine follows course, speed and depth orders within its turn, depth and acceleration limits; telegraph steps (stop, 3, 6, 10, 15 kn, maximum) set the speed quickly. Fires a torpedo down a sonar contact's measured bearing, with its ping fix or TMA solution while current, or down a free bearing with an optional range; firing needs a ready tube and the target inside the tube arc. The crew sets the run depth (5-300 m, otherwise a shallow default) and fires one torpedo or two in a ±4° spread, each with its own datum. Every crew torpedo runs on a wire: the crew can move its datum (bearing and distance from the submarine) and the wire turns it onto the new datum until its seeker acquires; faster than 10 kn or turning harder than 1.5°/s for 5 s breaks the wire, as does running out of either spool, and the crew can cut it. Launches a decoy and blows main ballast in an emergency (three times on a full air store).
|
||||
- **Orders and weapons:** the submarine follows course, speed and depth orders within its turn, depth and acceleration limits; telegraph steps (stop, 3, 6, 10, 15 kn, maximum) set the speed quickly. Fires a torpedo down a sonar contact's measured bearing, with its ping fix or TMA solution while current, or down a free bearing with an optional range; firing needs a flooded, loaded tube and the target inside the tube arc. **Tubes:** the crew takes over with the loaded tubes flooded. A fired tube stays empty until the torpedo gang loads it from the racks, if any torpedo is left there (`M` at the Weapons station, browser: Load; every submarine carries at least as many reloads again as it has tubes, and loading takes 2 min on a nuclear submarine, 3 min on a conventional one and 4 min on the older diesel classes, slower in stale air); a loaded tube is dry and must be flooded before it fires, which opens its outer door, takes 20 s and is audible for 4 s like a short transient (`Shift+M`, browser: Flood). The Weapons station and the browser list each tube as empty, loading, dry, flooding or ready, and the log reports every tube loaded and flooded. The AI's submarines load and flood by themselves. The crew sets the run depth (5-300 m, otherwise a shallow default) and fires one torpedo or two in a ±4° spread, each with its own datum. Every crew torpedo runs on a wire: the crew can move its datum (bearing and distance from the submarine) and the wire turns it onto the new datum until its seeker acquires; faster than 10 kn or turning harder than 1.5°/s for 5 s breaks the wire, as does running out of either spool, and the crew can cut it. Launches a decoy and blows main ballast in an emergency (three times on a full air store).
|
||||
- **Plant and submarine modes:** a crewed submarine never goes up, snorkels or calls home by itself. The battery drains with speed and hotel load; below 20 % the log warns, and an empty battery limits the speed to what the plant can serve (an AIP plant still takes over the load by itself). **Snorkel** runs the diesels at snorkel depth and charges the battery, at most 6 kn; diving deeper shuts the head valve. The running diesels are loud: +12 dB radiated level, a lower quiet factor and two firing lines at 50 and 100 Hz in the submarine's LOFAR signature (AI submarines too). **Silent running** limits the submarine to 5 kn and makes it as quiet as a lurking AI submarine. **Lie on bottom** stops the submarine 3 m above the seabed where the water is no deeper than test depth: silent and no drift; any speed or depth order lifts off. The submarine stops short of land or a seamount instead of turning away, and the log warns in shallow water.
|
||||
- **Energy and stores:** the engine room's **Energy & stores** (browser card, uConsole Engine room page 2 **Stores**) shows the energy balance at the present speed (load, supply and net kW, the time until the battery is empty or full), the battery and AIP oxygen, the diesel bunkers and a table of how long the battery lasts dived at each telegraph step and how far that carries the submarine. **Diesel:** the bunkers hold 300 hours of the generators' full output and a patrol starts with 65 %; only the running diesels burn it (0.27 l per kWh), the log warns at 10 %, and with dry bunkers snorkelling no longer charges. The **charge rate** sets what snorkelling does: *full* (the whole generator output, +12 dB and both diesel lines), *half* (half the output, +9 dB, weaker lines) or *air only* (the fans without diesels, +4 dB, no lines). **Air:** dived, the crew uses oxygen and breathes out carbon dioxide (about 0.45 % per hour each); a CO2 absorber set takes CO2 out until it is spent (8 spare sets), an oxygen candle adds 1 % O2 over 15 minutes (12 aboard, one at a time), and snorkelling flushes the submarine toward fresh air within minutes. From 3 % CO2 or below 18 % O2 the air is stale, from 5 % CO2 or below 16 % O2 it is foul; the log warns at each step. Stale air slows the crew (down to 30 % performance), and the torpedo gang reloads accordingly slower. AI submarines manage their air by themselves and come up to air the submarine when it turns foul. A nuclear submarine has none of these stores.
|
||||
- **Tanks, trim and air:** the engine room's **Tanks & trim** (browser card with a cross-section of the submarine, uConsole Engine room page 3 **Tanks**) shows the main ballast, the regulating tank, the trim tanks, the high-pressure air and the trim the submarine is in. Every weight change moves the submarine off neutral: a torpedo leaving a bow tube makes it 1.5 t lighter and bow light, water in flooded compartments (see damage control) makes it heavier and trims it toward the flooded end; the automatic trim takes up what its tanks can of that weight and moment. With the **automatic trim** on, the engineer pumps the regulating tank (±8 t, 25 kg/s) and the trim tanks (±3 t fore and aft, 15 kg/s) back to neutral; by hand, each order moves the regulating tank 0.5 t or the trim water 0.25 t (and switches the automatic off). Running trim pumps are audible (+3 dB and a 120 Hz line). Whatever the tanks cannot take up sinks or lifts the submarine by 0.03 m/s per tonne, and a trim angle (1° per tonne of moment, + bow down) drives it down or up with speed; the hydroplanes hold that only with way on, so a heavy submarine hovering at low speed sinks below its ordered depth; the log warns from 2 t and from 3°. The **high-pressure air** (200 bar) holds three emergency blows of 60 bar each; a blow empties the main ballast in 20 s and the submarine rises to 10 m and stays there, the ordered depth reset to 10 m. The next order below 12 m opens the vents: the main ballast floods in 40 s before the submarine can dive. Snorkelling on the diesels runs the compressor (0.05 bar/s); with the air only on the fans it does not. Without power neither the trim pumps nor the compressor run. The AI's submarines keep themselves trimmed and keep their one legacy blow.
|
||||
@@ -127,7 +127,7 @@ A second crew can play the enemy. The submarine has seven stations: Command, Son
|
||||
|
||||
Every new game first asks **Which unit do you play?**: *Frigate F-217* or *Hostile submarine* (`Up`/`Down` or `1`/`2`, `Enter`; the last choice is preselected, `--play-sub` preselects the submarine). Outside a mission, Options (`F10`) page 2 **uConsole plays** changes it as well, for example before loading a game. With the submarine the uConsole commands the hostile submarine instead of the frigate. The frigate is then crewed from the browsers through Remote Crew (`F9`); every frigate station no browser holds is crewed by the **AI hunters** (below). The uConsole shows only the submarine's own picture; the frigate's banners, event log, sound cues, plot and tooltips never appear, and its trackball and telegraph controls are disabled. The side can only be changed outside a mission; it lasts for this launch and is never saved, so every launch starts with the frigate. A solo browser (Remote Crew solo mode) chooses the side in the same way: its **New game** dialog has a *Side* field, and with *Submarine* the session takes the submarine's seven stations while the AI hunters crew the frigate.
|
||||
|
||||
The top bar shows the submarine's seven stations as tabs: `1` Command, `2` Sonar, `3` Weapons, `4` Engine room, `5` Mast & ESM, `6` Navigation, `7` Radio room (`Tab` or a click on a tab switches). Each order key works only at the station that owns it, as in the browser; elsewhere a banner names the right station. Browsers can crew the submarine's other stations at the same time; a station a browser holds is marked in the top bar and is not operated from the uConsole. Every station but the sonar room is laid out like the Bridge: the chart on the left (known geography, the submarine's own plot, the ESM bearing lines and cross-fixes, the submarine with its ordered course and motion vector, the bearing lines of its own sonar contacts or their symbol while a ping or TMA fix is current, its own torpedoes `T1`…, a limited tube firing arc), the station on the right with a threat bar (torpedo alarm and active sonar heard with measured bearing, hull damage, cavitation, low battery, ESM radar intercept) and the station's page. **Command** has four pages, the **Engine room** four, **Mast & ESM** two and **Navigation** two (the station's key again or `PgUp`/`PgDn`). The Engine room's second page **Stores** shows energy, endurance and air; `R` cycles the charge rate, `A` fits an absorber set and `O` lights an oxygen candle. Its third page **Tanks** shows the cross-section, main ballast and air, the tanks with their orders, weight, trim angle, drift without planes, flooding and pumps; `↑`/`↓` pump out or flood the regulating tank, `←`/`→` move trim water aft or forward and `Z` switches the automatic trim. Its fourth page **Damage** shows the compartments (water, leak, fire, gas, shut bulkheads, teams), the table of compartments, the power and both teams; `↑`/`↓` pick a compartment, `←`/`→` a task, `Enter` sends team 1 and `Shift+Enter` team 2 there with that task, and `I` shuts or opens the compartment's bulkheads. **Navigation** (page and station) shows course and depth, water under the keel and any charted obstacle ahead, speed, own noise, battery and the active modes, and the water column under the submarine: submarine depth, ordered depth, safe depth and seabed; the layer appears there only after the submarine's own BT measurement (`E` at the submarine sonar). **Weapons & contacts** (page and Weapons station) shows fire readiness, torpedoes, tubes ready, reload, decoys, emergency blow and the submarine's own sonar contacts (bearing, range where known, and quality in percent: the better of the signal quality and the track confidence, 100 % being a firm contact). The **Engine room** shows speed, own noise, battery, the modes and the telegraph steps; **Mast & ESM** shows the mast time, the rose, the emitter list and the selected emitter (signal, level and trend, cross-fix, classification); its second page and Command's third are the **Periscope** (eyepiece, line of sight, light and the sightings list; `←`/`→` train, `Enter` stadimeter). The **Radio room** has one page: antenna, broadcast schedule, copy and transmit progress, HQ's latest contact report and the radio log; `Enter` sends a situation report and `P` raises or lowers the mast. Below are the submarine log and the submarine's telemetry, as a band or a status ticker as set in the options; orders, shots and decoys are logged there.
|
||||
The top bar shows the submarine's seven stations as tabs: `1` Command, `2` Sonar, `3` Weapons, `4` Engine room, `5` Mast & ESM, `6` Navigation, `7` Radio room (`Tab` or a click on a tab switches). Each order key works only at the station that owns it, as in the browser; elsewhere a banner names the right station. Browsers can crew the submarine's other stations at the same time; a station a browser holds is marked in the top bar and is not operated from the uConsole. Every station but the sonar room is laid out like the Bridge: the chart on the left (known geography, the submarine's own plot, the ESM bearing lines and cross-fixes, the submarine with its ordered course and motion vector, the bearing lines of its own sonar contacts or their symbol while a ping or TMA fix is current, its own torpedoes `T1`…, a limited tube firing arc), the station on the right with a threat bar (torpedo alarm and active sonar heard with measured bearing, hull damage, cavitation, low battery, ESM radar intercept) and the station's page. **Command** has four pages, the **Engine room** four, **Mast & ESM** two and **Navigation** two (the station's key again or `PgUp`/`PgDn`). The Engine room's second page **Stores** shows energy, endurance and air; `R` cycles the charge rate, `A` fits an absorber set and `O` lights an oxygen candle. Its third page **Tanks** shows the cross-section, main ballast and air, the tanks with their orders, weight, trim angle, drift without planes, flooding and pumps; `↑`/`↓` pump out or flood the regulating tank, `←`/`→` move trim water aft or forward and `Z` switches the automatic trim. Its fourth page **Damage** shows the compartments (water, leak, fire, gas, shut bulkheads, teams), the table of compartments, the power and both teams; `↑`/`↓` pick a compartment, `←`/`→` a task, `Enter` sends team 1 and `Shift+Enter` team 2 there with that task, and `I` shuts or opens the compartment's bulkheads. **Navigation** (page and station) shows course and depth, water under the keel and any charted obstacle ahead, speed, own noise, battery and the active modes, and the water column under the submarine: submarine depth, ordered depth, safe depth and seabed; the layer appears there only after the submarine's own BT measurement (`E` at the submarine sonar). **Weapons & contacts** (page and Weapons station) shows fire readiness, torpedoes, tubes ready (flooded), reload, decoys, emergency blow, a line with every tube's state (`M` loads the next empty tube, `Shift+M` floods the next dry one) and the submarine's own sonar contacts (bearing, range where known, and quality in percent: the better of the signal quality and the track confidence, 100 % being a firm contact). The **Engine room** shows speed, own noise, battery, the modes and the telegraph steps; **Mast & ESM** shows the mast time, the rose, the emitter list and the selected emitter (signal, level and trend, cross-fix, classification); its second page and Command's third are the **Periscope** (eyepiece, line of sight, light and the sightings list; `←`/`→` train, `Enter` stadimeter). The **Radio room** has one page: antenna, broadcast schedule, copy and transmit progress, HQ's latest contact report and the radio log; `Enter` sends a situation report and `P` raises or lowers the mast. Below are the submarine log and the submarine's telemetry, as a band or a status ticker as set in the options; orders, shots and decoys are logged there.
|
||||
|
||||
<!-- keys:uboot -->
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[English](commander-protocol.md)
|
||||
|
||||
Anwendung 1.3.10, API-Protokoll 2, ausschließlich Spielstandsformat v25. Diese
|
||||
Anwendung 1.3.10, API-Protokoll 2, ausschließlich Spielstandsformat v26. Diese
|
||||
Versionen sind voneinander unabhängig. Zugangsdaten, Netzwerksitzungen, Leases,
|
||||
Befehlswarteschlangen oder Vorschläge werden nicht gespeichert. Gemeinsame
|
||||
Anmerkungen und von der Besatzung angenommene Ziel-/Navigations-Sollwerte verwenden
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[Deutsch](commander-protocol.de.md)
|
||||
|
||||
Application 1.3.10, API protocol 2, save format v25-only. These versions are independent.
|
||||
Application 1.3.10, API protocol 2, save format v26-only. These versions are independent.
|
||||
No credentials, network sessions, leases, command queues or proposals are saved.
|
||||
Shared annotations and crew-accepted target/navigation setpoints use normal game
|
||||
persistence.
|
||||
|
||||
Binary file not shown.
@@ -1104,7 +1104,7 @@ Eine zweite Crew kann den Gegner spielen. Das U-Boot hat sieben Stationen: Führ
|
||||
|
||||
- **Stationen:** Die *Führung* befiehlt Kurs, Fahrt und Tiefe, legt das U-Boot auf Grund, pingt, nimmt eine BT-Messung und sieht das ganze U-Boot. Die *Navigation* befiehlt Kurs und Tiefe, führt den Plot des U-Boots und überwacht Kiel und Hindernisse. Die *Maschine* bedient Telegraf, Schnorchel, Schleichfahrt, Trimm und Notanblasen und überwacht Batterie und Lärm. *Mast & ESM* fährt den Mast aus und überwacht ESM und Alarme; auch die Führung darf ihn ausfahren, um durchs Sehrohr zu sehen. Die *Waffen* schießen, lenken die Drähte und stoßen Täuschkörper aus. Das *Sonar* ist der Sonarraum des U-Boots. Der *Funkraum* nimmt den Rundspruch der Führung auf und sendet Lagemeldungen; er darf für seine Antenne den Mast ausfahren. Jeder Befehl wird nur von der Station angenommen, zu der er gehört.
|
||||
- **Tiefenstufen und Anzeigen:** Führung und Navigation befehlen die Tiefe in einem Schritt: Sehrohrtiefe (15 m, der Mast bleibt nutzbar), Schnorcheltiefe (U-Boote mit Schnorchel), über oder unter dem Layer (15 m darüber / 30 m darunter; erst nach der eigenen BT-Messung, denn nur daraus kennt die Crew den Layer) und tief (die sichere Tiefe über dem kartierten Grund). Am uConsole sind das `U`, `Umschalt+U`, `J`, `Umschalt+J` und `H`. Der Browser zeigt die Wassersäule (Oberfläche, Sehrohrtiefe, gemessener Layer, Soll-, sichere und Zerstörungstiefe, Grund, das U-Boot und seine Tauchrichtung), große Anzeigen für Kurs, Fahrt, Tiefe und Batterie mit farbigen Betriebs- und Alarmchips sowie eine ESM-Rose mit der Peilung jedes Emitters und den Peilungen von Ping- und Torpedoalarm; die Seite Mast & ESM am uConsole hat dieselbe Rose. Mast, Schnorchel, Schleichfahrt und Auf-Grund-Legen haben getrennte Knöpfe zum Ein- und Ausschalten.
|
||||
- **Befehle und Waffen:** das U-Boot folgt Kurs-, Fahrt- und Tiefenbefehlen im Rahmen seiner Wende-, Tiefen- und Beschleunigungsgrenzen; Fahrtstufen (Stopp, 3, 6, 10, 15 kn, Maximum) setzen die Fahrt schnell. Schießt einen Torpedo auf die gemessene Peilung eines Sonarkontakts, mit Ping-Fix oder TMA-Lösung, solange aktuell, oder auf eine freie Peilung mit optionaler Entfernung; der Schuss braucht ein klares Rohr und das Ziel im Schussfeld der Rohre. Die Crew stellt die Lauftiefe ein (5-300 m, sonst eine flache Voreinstellung) und schießt einen Torpedo oder zwei im Fächer von ±4°, jeder mit eigenem Datum. Jeder Crew-Torpedo läuft am Draht: die Crew kann sein Datum versetzen (Peilung und Entfernung vom U-Boot), und der Draht dreht ihn darauf ein, bis sein Suchkopf erfasst; schneller als 10 kn oder stärker als 1,5°/s drehen für 5 s lässt den Draht reißen, ebenso eine abgelaufene Spule, und die Crew kann ihn kappen. Stößt einen Täuschkörper aus und bläst im Notfall die Hauptzellen an (mit voller Pressluft dreimal).
|
||||
- **Befehle und Waffen:** das U-Boot folgt Kurs-, Fahrt- und Tiefenbefehlen im Rahmen seiner Wende-, Tiefen- und Beschleunigungsgrenzen; Fahrtstufen (Stopp, 3, 6, 10, 15 kn, Maximum) setzen die Fahrt schnell. Schießt einen Torpedo auf die gemessene Peilung eines Sonarkontakts, mit Ping-Fix oder TMA-Lösung, solange aktuell, oder auf eine freie Peilung mit optionaler Entfernung; der Schuss braucht ein geflutetes, geladenes Rohr und das Ziel im Schussfeld der Rohre. **Rohre:** Die Crew übernimmt die geladenen Rohre geflutet. Ein leergeschossenes Rohr bleibt leer, bis die Torpedogasten es aus den Reserven laden, sofern dort noch ein Torpedo liegt (`M` an der Station Waffen, Browser: Laden; jedes U-Boot führt mindestens noch einmal so viele Reservetorpedos wie Rohre, und das Laden dauert 2 min auf einem Atom-U-Boot, 3 min auf einem konventionellen und 4 min auf den älteren Dieselklassen, langsamer bei verbrauchter Luft); ein geladenes Rohr ist trocken und muss vor dem Schuss geflutet werden, was die Mündungsklappe öffnet, 20 s dauert und 4 s lang wie ein kurzer Transient hörbar ist (`Shift+M`, Browser: Fluten). Die Station Waffen und der Browser zeigen jedes Rohr als leer, lädt, trocken, flutet oder klar, und das Log meldet jedes geladene und geflutete Rohr. Die U-Boote der KI laden und fluten selbst. Die Crew stellt die Lauftiefe ein (5-300 m, sonst eine flache Voreinstellung) und schießt einen Torpedo oder zwei im Fächer von ±4°, jeder mit eigenem Datum. Jeder Crew-Torpedo läuft am Draht: die Crew kann sein Datum versetzen (Peilung und Entfernung vom U-Boot), und der Draht dreht ihn darauf ein, bis sein Suchkopf erfasst; schneller als 10 kn oder stärker als 1,5°/s drehen für 5 s lässt den Draht reißen, ebenso eine abgelaufene Spule, und die Crew kann ihn kappen. Stößt einen Täuschkörper aus und bläst im Notfall die Hauptzellen an (mit voller Pressluft dreimal).
|
||||
- **Anlage und U-Boot-Betrieb:** ein besetztes U-Boot taucht nie von selbst auf, schnorchelt nicht und funkt nicht von selbst. Die Batterie entlädt sich mit Fahrt und Bordnetz; unter 20 % warnt das U-Boot-Log, eine leere Batterie begrenzt die Fahrt auf das, was die Anlage noch liefert (eine AIP-Anlage übernimmt die Last weiterhin selbst). **Schnorcheln** betreibt die Diesel auf Schnorcheltiefe und lädt die Batterie, höchstens 6 kn; tieferes Tauchen schließt das Kopfventil. Die laufenden Diesel sind laut: +12 dB abgestrahlter Pegel, ein niedrigerer Stillefaktor und zwei Zündlinien bei 50 und 100 Hz in der LOFAR-Signatur des U-Boots (auch bei KI-U-Booten). **Schleichfahrt** begrenzt das U-Boot auf 5 kn und macht es so leise wie ein lauerndes KI-U-Boot. **Auf Grund legen** stoppt das U-Boot 3 m über dem Grund, wo das Wasser nicht tiefer als die Tauchtiefe ist: leise und ohne Drift; jeder Fahrt- oder Tiefenbefehl hebt ab. Vor Land oder einer Untiefe stoppt das U-Boot, statt auszuweichen, und das Log warnt bei wenig Wasser unter dem Kiel.
|
||||
- **Energie und Vorräte:** die Maschine zeigt unter **Energie & Vorräte** (Karte im Browser, auf der uConsole Maschine Seite 2 **Vorräte**) die Energiebilanz bei der aktuellen Fahrt (Verbrauch, Erzeugung und Bilanz in kW, die Zeit bis die Batterie leer oder voll ist), Batterie und AIP-Sauerstoff, die Dieselbunker und eine Tabelle, wie lange die Batterie getaucht bei jeder Telegrafenstufe reicht und wie weit das U-Boot damit kommt. **Diesel:** die Bunker fassen 300 Stunden volle Generatorleistung, eine Fahrt beginnt mit 65 %; nur laufende Diesel verbrauchen (0,27 l je kWh), das Log warnt bei 10 %, und mit leeren Bunkern lädt Schnorcheln nicht mehr. Die **Laderate** bestimmt, was Schnorcheln tut: *voll* (die ganze Generatorleistung, +12 dB und beide Diesellinien), *halb* (die halbe Leistung, +9 dB, schwächere Linien) oder *nur lüften* (die Lüfter ohne Diesel, +4 dB, keine Linien). **Luft:** getaucht verbraucht die Crew Sauerstoff und atmet Kohlendioxid aus (je etwa 0,45 % pro Stunde); ein CO2-Absorbersatz nimmt CO2 auf, bis er verbraucht ist (8 Ersatzsätze), eine O2-Kerze setzt in 15 Minuten 1 % O2 zu (12 an Bord, eine zur Zeit), und Schnorcheln lüftet das U-Boot in wenigen Minuten Richtung Frischluft. Ab 3 % CO2 oder unter 18 % O2 ist die Luft verbraucht, ab 5 % CO2 oder unter 16 % O2 gefährlich; das Log warnt bei jeder Stufe. Schlechte Luft macht die Crew langsamer (bis 30 % Leistung), und die Torpedomannschaft lädt entsprechend langsamer nach. KI-U-Boote versorgen ihre Luft selbst und tauchen zum Lüften auf, wenn sie gefährlich wird. Ein Atom-U-Boot hat keine dieser Vorräte.
|
||||
- **Tauchzellen, Trimm und Pressluft:** die Maschine zeigt unter **Tauchzellen & Trimm** (Karte im Browser mit Schnittbild des U-Boots, auf der uConsole Maschine Seite 3 **Zellen**) die Hauptzellen, die Regelzelle, die Trimmzellen, die Pressluft und den Trimmzustand des U-Boots. Jede Gewichtsänderung bringt das U-Boot aus dem Gleichgewicht: ein Torpedo aus einem Bugrohr macht es 1,5 t leichter und achterlastig, Wasser in vollgelaufenen Abteilungen (siehe Leckwehr) macht es schwerer und trimmt es zum gefluteten Ende; die Trimmautomatik gleicht davon aus, was ihre Zellen fassen. Mit der **Trimmautomatik** pumpt der LI die Regelzelle (±8 t, 25 kg/s) und die Trimmzellen (±3 t vorn und achtern, 15 kg/s) zurück ins Gleichgewicht; von Hand verschiebt jeder Befehl die Regelzelle um 0,5 t oder das Trimmwasser um 0,25 t (und schaltet die Automatik aus). Laufende Trimmpumpen sind hörbar (+3 dB und eine Linie bei 120 Hz). Was die Zellen nicht aufnehmen, lässt das U-Boot mit 0,03 m/s je Tonne sinken oder steigen, und ein Trimmwinkel (1° je Tonne Moment, + vorlastig) drückt es mit Fahrt nach unten oder oben; die Tiefenruder halten das nur mit Fahrt, ein schweres U-Boot sinkt bei wenig Fahrt unter seine befohlene Tiefe; das Log warnt ab 2 t und ab 3°. Die **Pressluft** (200 bar) reicht für drei Notanblasungen zu je 60 bar; Anblasen leert die Hauptzellen in 20 s, das U-Boot steigt auf 10 m und bleibt dort, die befohlene Tiefe steht dann auf 10 m. Der nächste Befehl unter 12 m öffnet die Entlüftung: die Hauptzellen fluten in 40 s, erst dann kann das U-Boot tauchen. Schnorcheln auf Diesel betreibt den Kompressor (0,05 bar/s); mit nur lüften läuft er nicht. Ohne Strom laufen weder Trimmpumpen noch Kompressor. Die KI-U-Boote halten sich selbst im Trimm und behalten ihr eines Notanblasen.
|
||||
@@ -1126,7 +1126,7 @@ Eine zweite Crew kann den Gegner spielen. Das U-Boot hat sieben Stationen: Führ
|
||||
|
||||
Jedes neue Spiel fragt zuerst **Welche Einheit spielst du?**: *Fregatte F-217* oder *Feindliches U-Boot* (`Auf`/`Ab` oder `1`/`2`, `Enter`; die letzte Wahl ist vorausgewählt, `--play-sub` wählt das U-Boot vor). Außerhalb einer Mission ändert auch Optionen (`F10`) Seite 2 **uConsole spielt** die Wahl, etwa vor dem Laden eines Spielstands. Mit dem U-Boot führt der uConsole das feindliche U-Boot statt der Fregatte. Die Fregatte wird dann über Remote Crew (`F9`) aus den Browsern besetzt; jede Fregattenstation, die kein Browser hält, besetzen die **KI-Jäger** (unten). Der uConsole zeigt nur das Lagebild des U-Boots; Banner, Ereignislog, Soundeffekte, Plot und Tooltips der Fregatte erscheinen nie, und Trackball- und Telegraphenbedienung der Fregatte sind gesperrt. Die Seite lässt sich nur außerhalb einer Mission wechseln; die Wahl gilt nur für diesen Programmstart und wird nie gespeichert, jeder Start beginnt also mit der Fregatte. Ein Solo-Browser (Remote Crew im Solo-Modus) wählt die Seite genauso: sein Dialog **Neues Spiel** hat ein Feld *Seite*, und mit *U-Boot* übernimmt die Sitzung die sieben Stationen des U-Boots, während die KI-Jäger die Fregatte besetzen.
|
||||
|
||||
Die obere Leiste zeigt die sieben Stationen des U-Boots als Reiter: `1` Führung, `2` Sonar, `3` Waffen, `4` Maschine, `5` Mast & ESM, `6` Navigation, `7` Funkraum (`Tab` oder ein Klick auf den Reiter wechselt). Jede Befehlstaste wirkt nur an der Station, zu der der Befehl gehört, wie im Browser; sonst nennt ein Banner die richtige Station. Browser können gleichzeitig die übrigen Stationen des U-Boots besetzen; eine Station, die ein Browser hält, ist in der oberen Leiste markiert und wird nicht vom uConsole bedient. Jede Station außer dem Sonarraum ist aufgebaut wie die Brücke: links die Seekarte (bekannte Geografie, der eigene Plot des U-Boots, die ESM-Peillinien und Kreuzpeilungen, das eigene U-Boot mit Sollkurs und Fahrtvektor, die Peilstriche der eigenen Sonarkontakte bzw. ihr Symbol bei aktuellem Ping- oder TMA-Fix, die eigenen Torpedos `T1`…, ein begrenztes Schussfeld der Rohre), rechts die Station mit Bedrohungsleiste (Torpedoalarm und gehörtes Aktivsonar mit gemessener Peilung, Rumpfschaden, Kavitation, schwache Batterie, ESM-Radarerfassung) und die Seite der Station. Die **Führung** hat vier Seiten, die **Maschine** vier, **Mast & ESM** zwei und **Navigation** zwei (die Taste der Station erneut oder `Bild auf`/`Bild ab`). Die zweite Seite der Maschine, **Vorräte**, zeigt Energie, Ausdauer und Luft; `R` wechselt die Laderate, `A` setzt einen Absorbersatz ein und `O` zündet eine O2-Kerze. Ihre dritte Seite **Zellen** zeigt das Schnittbild, Hauptzellen und Pressluft, die Zellen mit ihren Sollwerten, Gewicht, Trimmwinkel, Drift ohne Tiefenruder, Wassereinbruch und Pumpen; `↑`/`↓` lenzen oder fluten die Regelzelle, `←`/`→` pumpen Trimmwasser nach achtern oder vorn und `Z` schaltet die Trimmautomatik. Ihre vierte Seite **Leckwehr** zeigt die Abteilungen (Wasser, Leck, Brand, Gas, geschlossene Schotten, Trupps), die Tabelle der Abteilungen, den Strom und beide Trupps; `↑`/`↓` wählen eine Abteilung, `←`/`→` eine Aufgabe, `Enter` schickt Trupp 1 und `Umschalt+Enter` Trupp 2 mit dieser Aufgabe dorthin, und `I` schließt oder öffnet die Schotten der Abteilung. **Navigation** (Seite und Station) zeigt Kurs und Tiefe, das Wasser unter dem Kiel und ein kartiertes Hindernis voraus, Fahrt, Eigenlärm, Batterie und die aktiven Betriebsarten sowie die Wassersäule unter dem U-Boot: U-Boot-Tiefe, befohlene Tiefe, sichere Tiefe und Grund; die Sprungschicht erscheint dort erst nach einer eigenen BT-Messung (`E` am U-Boot-Sonar). **Waffen & Kontakte** (Seite und Station Waffen) zeigt Feuerbereitschaft, Torpedos, klare Rohre, Nachladen, Täuschkörper, Notanblasen und die eigenen Sonarkontakte (Peilung, Entfernung falls bekannt, und Güte in Prozent: der bessere Wert aus Signalgüte und Spurvertrauen, 100 % ist ein sicherer Kontakt). Die **Maschine** zeigt Fahrt, Eigenlärm, Batterie, die Betriebsarten und die Telegrafenstufen; **Mast & ESM** zeigt die Mastzeit, die Rose, die Emitterliste und den gewählten Emitter (Signal, Pegel und Trend, Kreuzpeilung, Einstufung); ihre zweite Seite und die dritte der Führung ist das **Sehrohr** (Okular, Sichtlinie, Licht und die Sichtungsliste; `←`/`→` schwenken, `Enter` Stadimeter). Der **Funkraum** hat eine Seite: Antenne, Rundspruchplan, Fortschritt von Aufnahme und Sendung, die letzte Feindlage der Führung und das Funktagebuch; `Enter` sendet eine Lagemeldung und `P` fährt den Mast aus oder ein. Unten stehen U-Boot-Log und Telemetrie des U-Boots, als Leiste oder Statuszeile wie in den Optionen eingestellt; Befehle, Schüsse und Täuschkörper werden dort protokolliert.
|
||||
Die obere Leiste zeigt die sieben Stationen des U-Boots als Reiter: `1` Führung, `2` Sonar, `3` Waffen, `4` Maschine, `5` Mast & ESM, `6` Navigation, `7` Funkraum (`Tab` oder ein Klick auf den Reiter wechselt). Jede Befehlstaste wirkt nur an der Station, zu der der Befehl gehört, wie im Browser; sonst nennt ein Banner die richtige Station. Browser können gleichzeitig die übrigen Stationen des U-Boots besetzen; eine Station, die ein Browser hält, ist in der oberen Leiste markiert und wird nicht vom uConsole bedient. Jede Station außer dem Sonarraum ist aufgebaut wie die Brücke: links die Seekarte (bekannte Geografie, der eigene Plot des U-Boots, die ESM-Peillinien und Kreuzpeilungen, das eigene U-Boot mit Sollkurs und Fahrtvektor, die Peilstriche der eigenen Sonarkontakte bzw. ihr Symbol bei aktuellem Ping- oder TMA-Fix, die eigenen Torpedos `T1`…, ein begrenztes Schussfeld der Rohre), rechts die Station mit Bedrohungsleiste (Torpedoalarm und gehörtes Aktivsonar mit gemessener Peilung, Rumpfschaden, Kavitation, schwache Batterie, ESM-Radarerfassung) und die Seite der Station. Die **Führung** hat vier Seiten, die **Maschine** vier, **Mast & ESM** zwei und **Navigation** zwei (die Taste der Station erneut oder `Bild auf`/`Bild ab`). Die zweite Seite der Maschine, **Vorräte**, zeigt Energie, Ausdauer und Luft; `R` wechselt die Laderate, `A` setzt einen Absorbersatz ein und `O` zündet eine O2-Kerze. Ihre dritte Seite **Zellen** zeigt das Schnittbild, Hauptzellen und Pressluft, die Zellen mit ihren Sollwerten, Gewicht, Trimmwinkel, Drift ohne Tiefenruder, Wassereinbruch und Pumpen; `↑`/`↓` lenzen oder fluten die Regelzelle, `←`/`→` pumpen Trimmwasser nach achtern oder vorn und `Z` schaltet die Trimmautomatik. Ihre vierte Seite **Leckwehr** zeigt die Abteilungen (Wasser, Leck, Brand, Gas, geschlossene Schotten, Trupps), die Tabelle der Abteilungen, den Strom und beide Trupps; `↑`/`↓` wählen eine Abteilung, `←`/`→` eine Aufgabe, `Enter` schickt Trupp 1 und `Umschalt+Enter` Trupp 2 mit dieser Aufgabe dorthin, und `I` schließt oder öffnet die Schotten der Abteilung. **Navigation** (Seite und Station) zeigt Kurs und Tiefe, das Wasser unter dem Kiel und ein kartiertes Hindernis voraus, Fahrt, Eigenlärm, Batterie und die aktiven Betriebsarten sowie die Wassersäule unter dem U-Boot: U-Boot-Tiefe, befohlene Tiefe, sichere Tiefe und Grund; die Sprungschicht erscheint dort erst nach einer eigenen BT-Messung (`E` am U-Boot-Sonar). **Waffen & Kontakte** (Seite und Station Waffen) zeigt Feuerbereitschaft, Torpedos, klare (geflutete) Rohre, Nachladen, Täuschkörper, Notanblasen, eine Zeile mit dem Zustand jedes Rohrs (`M` lädt das nächste leere Rohr, `Shift+M` flutet das nächste trockene) und die eigenen Sonarkontakte (Peilung, Entfernung falls bekannt, und Güte in Prozent: der bessere Wert aus Signalgüte und Spurvertrauen, 100 % ist ein sicherer Kontakt). Die **Maschine** zeigt Fahrt, Eigenlärm, Batterie, die Betriebsarten und die Telegrafenstufen; **Mast & ESM** zeigt die Mastzeit, die Rose, die Emitterliste und den gewählten Emitter (Signal, Pegel und Trend, Kreuzpeilung, Einstufung); ihre zweite Seite und die dritte der Führung ist das **Sehrohr** (Okular, Sichtlinie, Licht und die Sichtungsliste; `←`/`→` schwenken, `Enter` Stadimeter). Der **Funkraum** hat eine Seite: Antenne, Rundspruchplan, Fortschritt von Aufnahme und Sendung, die letzte Feindlage der Führung und das Funktagebuch; `Enter` sendet eine Lagemeldung und `P` fährt den Mast aus oder ein. Unten stehen U-Boot-Log und Telemetrie des U-Boots, als Leiste oder Statuszeile wie in den Optionen eingestellt; Befehle, Schüsse und Täuschkörper werden dort protokolliert.
|
||||
|
||||
| Taste | Funktion |
|
||||
|---|---|
|
||||
@@ -1141,6 +1141,8 @@ Die obere Leiste zeigt die sieben Stationen des U-Boots als Reiter: `1` Führung
|
||||
| `Strg+Enter` | Torpedo auf den gewählten Kontakt schießen (Waffen) |
|
||||
| `F` | Auf eine eingegebene Peilung schießen, danach Entfernung zum Datum (Enter: keine) (Waffen) |
|
||||
| `X` | Täuschkörper ausstoßen (Waffen) |
|
||||
| `M` | Nächstes leeres Torpedorohr laden (Waffen) |
|
||||
| `Shift+M` | Nächstes geladenes Rohr fluten und Mündungsklappe öffnen; nur ein geflutetes Rohr schießt (Waffen) |
|
||||
| `Umschalt+B` | Notanblasen, einmal (Führung, Maschine) |
|
||||
| `T` | Torpedo-Lauftiefe 5-300 m (Waffen) |
|
||||
| `Y` | Ein Torpedo oder Zweierfächer (Waffen) |
|
||||
|
||||
@@ -1103,7 +1103,7 @@ A second crew can play the enemy. The submarine has seven stations: Command, Son
|
||||
|
||||
- **Stations:** *Command* orders course, speed and depth, lies on the bottom, pings and takes a BT, and sees the whole submarine. *Navigation* orders course and depth, keeps the submarine's plot and watches keel and obstacles. *Engine room* runs the telegraph, snorkel, silent running, the trim and the emergency blow and watches battery and noise. *Mast & ESM* raises the mast and watches ESM and alarms; Command may raise it too, to look through the periscope. *Weapons* fires, guides the wires and launches decoys. *Sonar* is the submarine's sonar room. The *Radio room* copies HQ's broadcast and sends situation reports; it may raise the mast for its antenna. Each order is accepted only from the station that owns it.
|
||||
- **Depth steps and displays:** Command and Navigation order depth in one step: periscope depth (15 m, keeps the mast usable), snorkel depth (submarines with a snorkel), above or below the layer (15 m above / 30 m below; only after the submarine's own BT measurement, since the crew knows the layer only from it) and deep (the safe depth over the charted bottom). On the uConsole these are `U`, `Shift+U`, `J`, `Shift+J` and `H`. The browser shows the water column (surface, periscope depth, measured layer, ordered, safe and crush depth, seabed, the submarine and its dive direction), large readouts for course, speed, depth and battery with coloured mode and alarm chips, and an ESM rose with each emitter's strobe and the ping and torpedo alarm bearings; the uConsole's Mast & ESM page has the same rose. Mast, snorkel, silent running and lying on the bottom have separate on and off buttons.
|
||||
- **Orders and weapons:** the submarine follows course, speed and depth orders within its turn, depth and acceleration limits; telegraph steps (stop, 3, 6, 10, 15 kn, maximum) set the speed quickly. Fires a torpedo down a sonar contact's measured bearing, with its ping fix or TMA solution while current, or down a free bearing with an optional range; firing needs a ready tube and the target inside the tube arc. The crew sets the run depth (5-300 m, otherwise a shallow default) and fires one torpedo or two in a ±4° spread, each with its own datum. Every crew torpedo runs on a wire: the crew can move its datum (bearing and distance from the submarine) and the wire turns it onto the new datum until its seeker acquires; faster than 10 kn or turning harder than 1.5°/s for 5 s breaks the wire, as does running out of either spool, and the crew can cut it. Launches a decoy and blows main ballast in an emergency (three times on a full air store).
|
||||
- **Orders and weapons:** the submarine follows course, speed and depth orders within its turn, depth and acceleration limits; telegraph steps (stop, 3, 6, 10, 15 kn, maximum) set the speed quickly. Fires a torpedo down a sonar contact's measured bearing, with its ping fix or TMA solution while current, or down a free bearing with an optional range; firing needs a flooded, loaded tube and the target inside the tube arc. **Tubes:** the crew takes over with the loaded tubes flooded. A fired tube stays empty until the torpedo gang loads it from the racks, if any torpedo is left there (`M` at the Weapons station, browser: Load; every submarine carries at least as many reloads again as it has tubes, and loading takes 2 min on a nuclear submarine, 3 min on a conventional one and 4 min on the older diesel classes, slower in stale air); a loaded tube is dry and must be flooded before it fires, which opens its outer door, takes 20 s and is audible for 4 s like a short transient (`Shift+M`, browser: Flood). The Weapons station and the browser list each tube as empty, loading, dry, flooding or ready, and the log reports every tube loaded and flooded. The AI's submarines load and flood by themselves. The crew sets the run depth (5-300 m, otherwise a shallow default) and fires one torpedo or two in a ±4° spread, each with its own datum. Every crew torpedo runs on a wire: the crew can move its datum (bearing and distance from the submarine) and the wire turns it onto the new datum until its seeker acquires; faster than 10 kn or turning harder than 1.5°/s for 5 s breaks the wire, as does running out of either spool, and the crew can cut it. Launches a decoy and blows main ballast in an emergency (three times on a full air store).
|
||||
- **Plant and submarine modes:** a crewed submarine never goes up, snorkels or calls home by itself. The battery drains with speed and hotel load; below 20 % the log warns, and an empty battery limits the speed to what the plant can serve (an AIP plant still takes over the load by itself). **Snorkel** runs the diesels at snorkel depth and charges the battery, at most 6 kn; diving deeper shuts the head valve. The running diesels are loud: +12 dB radiated level, a lower quiet factor and two firing lines at 50 and 100 Hz in the submarine's LOFAR signature (AI submarines too). **Silent running** limits the submarine to 5 kn and makes it as quiet as a lurking AI submarine. **Lie on bottom** stops the submarine 3 m above the seabed where the water is no deeper than test depth: silent and no drift; any speed or depth order lifts off. The submarine stops short of land or a seamount instead of turning away, and the log warns in shallow water.
|
||||
- **Energy and stores:** the engine room's **Energy & stores** (browser card, uConsole Engine room page 2 **Stores**) shows the energy balance at the present speed (load, supply and net kW, the time until the battery is empty or full), the battery and AIP oxygen, the diesel bunkers and a table of how long the battery lasts dived at each telegraph step and how far that carries the submarine. **Diesel:** the bunkers hold 300 hours of the generators' full output and a patrol starts with 65 %; only the running diesels burn it (0.27 l per kWh), the log warns at 10 %, and with dry bunkers snorkelling no longer charges. The **charge rate** sets what snorkelling does: *full* (the whole generator output, +12 dB and both diesel lines), *half* (half the output, +9 dB, weaker lines) or *air only* (the fans without diesels, +4 dB, no lines). **Air:** dived, the crew uses oxygen and breathes out carbon dioxide (about 0.45 % per hour each); a CO2 absorber set takes CO2 out until it is spent (8 spare sets), an oxygen candle adds 1 % O2 over 15 minutes (12 aboard, one at a time), and snorkelling flushes the submarine toward fresh air within minutes. From 3 % CO2 or below 18 % O2 the air is stale, from 5 % CO2 or below 16 % O2 it is foul; the log warns at each step. Stale air slows the crew (down to 30 % performance), and the torpedo gang reloads accordingly slower. AI submarines manage their air by themselves and come up to air the submarine when it turns foul. A nuclear submarine has none of these stores.
|
||||
- **Tanks, trim and air:** the engine room's **Tanks & trim** (browser card with a cross-section of the submarine, uConsole Engine room page 3 **Tanks**) shows the main ballast, the regulating tank, the trim tanks, the high-pressure air and the trim the submarine is in. Every weight change moves the submarine off neutral: a torpedo leaving a bow tube makes it 1.5 t lighter and bow light, water in flooded compartments (see damage control) makes it heavier and trims it toward the flooded end; the automatic trim takes up what its tanks can of that weight and moment. With the **automatic trim** on, the engineer pumps the regulating tank (±8 t, 25 kg/s) and the trim tanks (±3 t fore and aft, 15 kg/s) back to neutral; by hand, each order moves the regulating tank 0.5 t or the trim water 0.25 t (and switches the automatic off). Running trim pumps are audible (+3 dB and a 120 Hz line). Whatever the tanks cannot take up sinks or lifts the submarine by 0.03 m/s per tonne, and a trim angle (1° per tonne of moment, + bow down) drives it down or up with speed; the hydroplanes hold that only with way on, so a heavy submarine hovering at low speed sinks below its ordered depth; the log warns from 2 t and from 3°. The **high-pressure air** (200 bar) holds three emergency blows of 60 bar each; a blow empties the main ballast in 20 s and the submarine rises to 10 m and stays there, the ordered depth reset to 10 m. The next order below 12 m opens the vents: the main ballast floods in 40 s before the submarine can dive. Snorkelling on the diesels runs the compressor (0.05 bar/s); with the air only on the fans it does not. Without power neither the trim pumps nor the compressor run. The AI's submarines keep themselves trimmed and keep their one legacy blow.
|
||||
@@ -1125,7 +1125,7 @@ A second crew can play the enemy. The submarine has seven stations: Command, Son
|
||||
|
||||
Every new game first asks **Which unit do you play?**: *Frigate F-217* or *Hostile submarine* (`Up`/`Down` or `1`/`2`, `Enter`; the last choice is preselected, `--play-sub` preselects the submarine). Outside a mission, Options (`F10`) page 2 **uConsole plays** changes it as well, for example before loading a game. With the submarine the uConsole commands the hostile submarine instead of the frigate. The frigate is then crewed from the browsers through Remote Crew (`F9`); every frigate station no browser holds is crewed by the **AI hunters** (below). The uConsole shows only the submarine's own picture; the frigate's banners, event log, sound cues, plot and tooltips never appear, and its trackball and telegraph controls are disabled. The side can only be changed outside a mission; it lasts for this launch and is never saved, so every launch starts with the frigate. A solo browser (Remote Crew solo mode) chooses the side in the same way: its **New game** dialog has a *Side* field, and with *Submarine* the session takes the submarine's seven stations while the AI hunters crew the frigate.
|
||||
|
||||
The top bar shows the submarine's seven stations as tabs: `1` Command, `2` Sonar, `3` Weapons, `4` Engine room, `5` Mast & ESM, `6` Navigation, `7` Radio room (`Tab` or a click on a tab switches). Each order key works only at the station that owns it, as in the browser; elsewhere a banner names the right station. Browsers can crew the submarine's other stations at the same time; a station a browser holds is marked in the top bar and is not operated from the uConsole. Every station but the sonar room is laid out like the Bridge: the chart on the left (known geography, the submarine's own plot, the ESM bearing lines and cross-fixes, the submarine with its ordered course and motion vector, the bearing lines of its own sonar contacts or their symbol while a ping or TMA fix is current, its own torpedoes `T1`…, a limited tube firing arc), the station on the right with a threat bar (torpedo alarm and active sonar heard with measured bearing, hull damage, cavitation, low battery, ESM radar intercept) and the station's page. **Command** has four pages, the **Engine room** four, **Mast & ESM** two and **Navigation** two (the station's key again or `PgUp`/`PgDn`). The Engine room's second page **Stores** shows energy, endurance and air; `R` cycles the charge rate, `A` fits an absorber set and `O` lights an oxygen candle. Its third page **Tanks** shows the cross-section, main ballast and air, the tanks with their orders, weight, trim angle, drift without planes, flooding and pumps; `↑`/`↓` pump out or flood the regulating tank, `←`/`→` move trim water aft or forward and `Z` switches the automatic trim. Its fourth page **Damage** shows the compartments (water, leak, fire, gas, shut bulkheads, teams), the table of compartments, the power and both teams; `↑`/`↓` pick a compartment, `←`/`→` a task, `Enter` sends team 1 and `Shift+Enter` team 2 there with that task, and `I` shuts or opens the compartment's bulkheads. **Navigation** (page and station) shows course and depth, water under the keel and any charted obstacle ahead, speed, own noise, battery and the active modes, and the water column under the submarine: submarine depth, ordered depth, safe depth and seabed; the layer appears there only after the submarine's own BT measurement (`E` at the submarine sonar). **Weapons & contacts** (page and Weapons station) shows fire readiness, torpedoes, tubes ready, reload, decoys, emergency blow and the submarine's own sonar contacts (bearing, range where known, and quality in percent: the better of the signal quality and the track confidence, 100 % being a firm contact). The **Engine room** shows speed, own noise, battery, the modes and the telegraph steps; **Mast & ESM** shows the mast time, the rose, the emitter list and the selected emitter (signal, level and trend, cross-fix, classification); its second page and Command's third are the **Periscope** (eyepiece, line of sight, light and the sightings list; `←`/`→` train, `Enter` stadimeter). The **Radio room** has one page: antenna, broadcast schedule, copy and transmit progress, HQ's latest contact report and the radio log; `Enter` sends a situation report and `P` raises or lowers the mast. Below are the submarine log and the submarine's telemetry, as a band or a status ticker as set in the options; orders, shots and decoys are logged there.
|
||||
The top bar shows the submarine's seven stations as tabs: `1` Command, `2` Sonar, `3` Weapons, `4` Engine room, `5` Mast & ESM, `6` Navigation, `7` Radio room (`Tab` or a click on a tab switches). Each order key works only at the station that owns it, as in the browser; elsewhere a banner names the right station. Browsers can crew the submarine's other stations at the same time; a station a browser holds is marked in the top bar and is not operated from the uConsole. Every station but the sonar room is laid out like the Bridge: the chart on the left (known geography, the submarine's own plot, the ESM bearing lines and cross-fixes, the submarine with its ordered course and motion vector, the bearing lines of its own sonar contacts or their symbol while a ping or TMA fix is current, its own torpedoes `T1`…, a limited tube firing arc), the station on the right with a threat bar (torpedo alarm and active sonar heard with measured bearing, hull damage, cavitation, low battery, ESM radar intercept) and the station's page. **Command** has four pages, the **Engine room** four, **Mast & ESM** two and **Navigation** two (the station's key again or `PgUp`/`PgDn`). The Engine room's second page **Stores** shows energy, endurance and air; `R` cycles the charge rate, `A` fits an absorber set and `O` lights an oxygen candle. Its third page **Tanks** shows the cross-section, main ballast and air, the tanks with their orders, weight, trim angle, drift without planes, flooding and pumps; `↑`/`↓` pump out or flood the regulating tank, `←`/`→` move trim water aft or forward and `Z` switches the automatic trim. Its fourth page **Damage** shows the compartments (water, leak, fire, gas, shut bulkheads, teams), the table of compartments, the power and both teams; `↑`/`↓` pick a compartment, `←`/`→` a task, `Enter` sends team 1 and `Shift+Enter` team 2 there with that task, and `I` shuts or opens the compartment's bulkheads. **Navigation** (page and station) shows course and depth, water under the keel and any charted obstacle ahead, speed, own noise, battery and the active modes, and the water column under the submarine: submarine depth, ordered depth, safe depth and seabed; the layer appears there only after the submarine's own BT measurement (`E` at the submarine sonar). **Weapons & contacts** (page and Weapons station) shows fire readiness, torpedoes, tubes ready (flooded), reload, decoys, emergency blow, a line with every tube's state (`M` loads the next empty tube, `Shift+M` floods the next dry one) and the submarine's own sonar contacts (bearing, range where known, and quality in percent: the better of the signal quality and the track confidence, 100 % being a firm contact). The **Engine room** shows speed, own noise, battery, the modes and the telegraph steps; **Mast & ESM** shows the mast time, the rose, the emitter list and the selected emitter (signal, level and trend, cross-fix, classification); its second page and Command's third are the **Periscope** (eyepiece, line of sight, light and the sightings list; `←`/`→` train, `Enter` stadimeter). The **Radio room** has one page: antenna, broadcast schedule, copy and transmit progress, HQ's latest contact report and the radio log; `Enter` sends a situation report and `P` raises or lowers the mast. Below are the submarine log and the submarine's telemetry, as a band or a status ticker as set in the options; orders, shots and decoys are logged there.
|
||||
|
||||
| Key | Action |
|
||||
|---|---|
|
||||
@@ -1140,6 +1140,8 @@ The top bar shows the submarine's seven stations as tabs: `1` Command, `2` Sonar
|
||||
| `Ctrl+Enter` | Fire a torpedo at the selected contact (Weapons) |
|
||||
| `F` | Fire down an entered bearing, then the distance to the datum (Enter: none) (Weapons) |
|
||||
| `X` | Launch a decoy (Weapons) |
|
||||
| `M` | Load the next empty torpedo tube (Weapons) |
|
||||
| `Shift+M` | Flood the next loaded tube and open its outer door; only a flooded tube fires (Weapons) |
|
||||
| `Shift+B` | Emergency blow, once (Command, Engine room) |
|
||||
| `T` | Torpedo run depth 5-300 m (Weapons) |
|
||||
| `Y` | One torpedo or a two-torpedo spread (Weapons) |
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
# U-Jagd 1.3.30 - Stations- und Tastenkürzel
|
||||
# U-Jagd 1.3.31 - Stations- und Tastenkürzel
|
||||
|
||||
Druckfassung: [`station-shortcuts.de.pdf`](station-shortcuts.de.pdf).
|
||||
Maßgeblich ist die implementierte lokale Bedienung. Stationsnummern und
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -121,4 +121,4 @@ im Internet. Die Proxy-Einrichtung und sein Zertifikat werden außerhalb des
|
||||
Spiels verwaltet.
|
||||
|
||||
Die Webverwaltung liegt unter `/api/v2/web/*` und nutzt die vorhandene v2-Sitzung.
|
||||
Alle `/api/v1/*`-Routen bleiben abgeschaltet. Spielstände bleiben exakt v25.
|
||||
Alle `/api/v1/*`-Routen bleiben abgeschaltet. Spielstände bleiben exakt v26.
|
||||
@@ -671,6 +671,14 @@ def _uboot_decoy(game, boat, params, _bindings):
|
||||
return _uboot_result(boat.sub.command_decoy())
|
||||
|
||||
|
||||
def _uboot_tube_load(game, boat, params, _bindings):
|
||||
return _uboot_result(boat.sub.command_load_tube(params["tube"]))
|
||||
|
||||
|
||||
def _uboot_tube_flood(game, boat, params, _bindings):
|
||||
return _uboot_result(boat.sub.command_flood_tube(params["tube"]))
|
||||
|
||||
|
||||
def _uboot_evade(game, boat, params, _bindings):
|
||||
from src.core import boat_threat
|
||||
return _uboot_result(boat_threat.evade(game, boat))
|
||||
@@ -776,6 +784,8 @@ _UBOOT_ACTION_HANDLERS = {
|
||||
"uboot_set_depth": _uboot_set_depth,
|
||||
"uboot_fire": _uboot_fire,
|
||||
"uboot_decoy": _uboot_decoy,
|
||||
"uboot_tube_load": _uboot_tube_load,
|
||||
"uboot_tube_flood": _uboot_tube_flood,
|
||||
"uboot_blow": _uboot_blow,
|
||||
"uboot_snorkel": _uboot_snorkel,
|
||||
"uboot_charge_rate": _uboot_charge_rate,
|
||||
|
||||
@@ -1569,8 +1569,9 @@ def _uboot(game, boat, rows, target_ref, asset_refs):
|
||||
mast=bool(sub.crew is not None and sub.crew.mast)),
|
||||
weapons=dict(
|
||||
torpedoes=int(sub.torpedoes_left),
|
||||
tubes_ready=(int(sub.weapon_battery.ready_count)
|
||||
if sub.weapon_battery is not None else 0),
|
||||
tubes_ready=opfor.tubes_flooded(sub),
|
||||
tubes=[dict(state=state, seconds=_number(seconds))
|
||||
for state, seconds in opfor.tube_states(sub)[:32]],
|
||||
reload_s=(_number(sub.weapon_battery.next_reload_s)
|
||||
if sub.weapon_battery is not None else None),
|
||||
ready=reason is None, reason=reason,
|
||||
|
||||
@@ -134,7 +134,15 @@ UBOOT_REASONS = frozenset((
|
||||
"uboot_mast_down", "uboot_no_sighting", "uboot_no_stadimeter",
|
||||
"uboot_no_absorbers", "uboot_no_candles", "uboot_candle_burning",
|
||||
"uboot_no_air_stores", "uboot_no_hp_air", "uboot_compartment_down",
|
||||
"uboot_no_antenna", "uboot_transmitting", "uboot_no_solution"))
|
||||
"uboot_no_antenna", "uboot_transmitting", "uboot_no_solution",
|
||||
"uboot_tube_dry", "uboot_tubes_full", "uboot_no_dry_tube"))
|
||||
|
||||
|
||||
def _uboot_tube_params(params):
|
||||
"""``{"tube": index}`` (0-based) or ``{"tube": None}`` for the next one."""
|
||||
return (type(params) is dict and set(params) == {"tube"}
|
||||
and (params["tube"] is None
|
||||
or (type(params["tube"]) is int and 0 <= params["tube"] < 32)))
|
||||
|
||||
|
||||
def _uboot_ballast_params(params):
|
||||
@@ -621,6 +629,9 @@ V2_ACTION_REGISTRY = {
|
||||
"uboot_fire": V2Action(frozenset({"uboot_weapons"}), _uboot_fire_params,
|
||||
direct_fire=True),
|
||||
"uboot_decoy": V2Action(frozenset({"uboot_weapons"}), _no_params),
|
||||
# The torpedo room loads each tube and floods it before the shot.
|
||||
"uboot_tube_load": V2Action(frozenset({"uboot_weapons"}), _uboot_tube_params),
|
||||
"uboot_tube_flood": V2Action(frozenset({"uboot_weapons"}), _uboot_tube_params),
|
||||
"uboot_evade": V2Action(frozenset({"uboot", "uboot_nav"}), _no_params),
|
||||
"uboot_blow": V2Action(frozenset({"uboot", "uboot_engine"}), _no_params),
|
||||
"uboot_snorkel": V2Action(frozenset({"uboot_engine"}), _bool_params("enabled")),
|
||||
|
||||
@@ -409,6 +409,11 @@ UBOOT_DC_HAND_PUMP = 0.25 # pump rate without power
|
||||
UBOOT_DC_GAS_FACTOR = 0.5 # work rate in gas masks
|
||||
UBOOT_DC_STERN_SPEED_FACTOR = 0.5 # shaft and motor room flooded
|
||||
# Periscope of the crewed boat (plan 1.3, phase 9).
|
||||
# A crewed submarine's tubes: each is loaded on order (the launcher's reload
|
||||
# time) and must be flooded before it fires; flooding is briefly audible.
|
||||
UBOOT_TUBE_FLOOD_S = 20.0
|
||||
UBOOT_TUBE_FLOOD_NOISE_S = 4.0
|
||||
UBOOT_TUBE_STATES = ("dry", "flooding", "flooded")
|
||||
UBOOT_SCOPE_EYE_HEIGHT_M = 2.5 # optics just above the surface
|
||||
UBOOT_SCOPE_FOV_DEG = 32.0 # field of view of the low-power optics
|
||||
UBOOT_SCOPE_STEP_DEG = 2.0 # arrow keys turn the scope by this
|
||||
|
||||
@@ -239,6 +239,8 @@ _UBOOT_HELP = (
|
||||
("help.key.uboot_fire", "help.uboot.fire"),
|
||||
("F", "help.uboot.fire_bearing"),
|
||||
("X", "help.uboot.decoy"),
|
||||
("M", "help.uboot.tube_load"),
|
||||
("Shift+M", "help.uboot.tube_flood"),
|
||||
("help.key.uboot_blow", "help.uboot.blow"),
|
||||
("T", "help.uboot.torpedo_depth"),
|
||||
("Y", "help.uboot.salvo"),
|
||||
|
||||
+37
-1
@@ -87,7 +87,8 @@ class CrewOrders:
|
||||
"dc_power_lost": "schaden", "dc_power_restored": "schaden",
|
||||
"radio_sending": "funk", "radio_sent": "funk", "radio_aborted": "funk",
|
||||
"radio_copied": "funk", "radio_copied_report": "funk",
|
||||
"detonation_near": "sonar", "detonation_far": "sonar"}
|
||||
"detonation_near": "sonar", "detonation_far": "sonar",
|
||||
"tube_loaded": "waffen", "tube_flooded": "waffen"}
|
||||
|
||||
def __init__(self):
|
||||
self.silent = False
|
||||
@@ -104,6 +105,9 @@ class CrewOrders:
|
||||
self._sightings_seen = set()
|
||||
# Attack computer: stadimeter marks by sighting (``attack_computer``).
|
||||
self.tdc = {}
|
||||
# Flood state of each torpedo tube, ``[state, seconds left]`` with the
|
||||
# state in ``UBOOT_TUBE_STATES`` (loading itself is the boat's battery).
|
||||
self.tubes = []
|
||||
# Wire-guided crew torpedoes: EnemyTorpedo id -> CrewWire.
|
||||
self.wires = {}
|
||||
self._known_torpedoes = set()
|
||||
@@ -161,6 +165,7 @@ class CrewOrders:
|
||||
tdc={ref: dict(target_id=entry["target_id"],
|
||||
marks=[list(mark) for mark in entry["marks"]])
|
||||
for ref, entry in sorted(self.tdc.items())},
|
||||
tubes=[list(row) for row in self.tubes],
|
||||
wires={str(torpedo_id): wire.to_save()
|
||||
for torpedo_id, wire in sorted(self.wires.items())},
|
||||
known_torpedoes=sorted(self._known_torpedoes),
|
||||
@@ -187,6 +192,7 @@ class CrewOrders:
|
||||
self.tdc = {ref: dict(target_id=entry["target_id"],
|
||||
marks=[list(mark) for mark in entry["marks"]])
|
||||
for ref, entry in data["tdc"].items()}
|
||||
self.tubes = [list(row) for row in data["tubes"]]
|
||||
self.wires = {int(torpedo_id): CrewWire.from_save(int(torpedo_id), wire)
|
||||
for torpedo_id, wire in data["wires"].items()}
|
||||
self._known_torpedoes = set(data["known_torpedoes"])
|
||||
@@ -232,6 +238,32 @@ class CrewWire:
|
||||
return wire
|
||||
|
||||
|
||||
def tube_states(sub) -> list:
|
||||
"""Each tube as ``(state, seconds)``: empty, loading, dry, flooding, flooded
|
||||
(the AI's tubes, which nobody floods, read as loaded and flooded)."""
|
||||
battery = sub.weapon_battery
|
||||
if battery is None:
|
||||
return []
|
||||
crew = sub.crew_tubes
|
||||
rows = []
|
||||
for tube in battery.tubes:
|
||||
if tube.loading_weapon_key is not None:
|
||||
rows.append(("loading", tube.reload_remaining_s))
|
||||
elif tube.loaded_weapon_key is None:
|
||||
rows.append(("empty", None))
|
||||
elif crew is None:
|
||||
rows.append(("flooded", None))
|
||||
else:
|
||||
state, left = crew[tube.index]
|
||||
rows.append((state, left if state == "flooding" else None))
|
||||
return rows
|
||||
|
||||
|
||||
def tubes_flooded(sub) -> int:
|
||||
return sum(state == "flooded" for state, _left in tube_states(sub))
|
||||
|
||||
|
||||
|
||||
class CrewedBoat:
|
||||
"""One crewed submarine: the boat, its sonar workstation and its feed."""
|
||||
|
||||
@@ -240,6 +272,10 @@ class CrewedBoat:
|
||||
self.sub_id = sub.id
|
||||
self.orders = CrewOrders()
|
||||
sub.crew = self.orders
|
||||
# The crew takes over with the loaded tubes flooded, ready to fire.
|
||||
battery = sub.weapon_battery
|
||||
self.orders.tubes = ([["flooded" if tube.loaded_weapon_key is not None else "dry", 0.0]
|
||||
for tube in battery.tubes] if battery is not None else [])
|
||||
# Watches, fatigue and morale of the boat's crew (saved; the game
|
||||
# replaces it with one that knows the current sim time on claim).
|
||||
self.watch = CrewState()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Declarative exact key sets for the ``u-jagd-save-v25`` document.
|
||||
"""Declarative exact key sets for the ``u-jagd-save-v26`` document.
|
||||
|
||||
Every persisted block whose shape is validated exactly is declared here, so a
|
||||
new saved field is added in exactly three places: this module,
|
||||
@@ -52,7 +52,7 @@ CREW_ORDERS_FIELDS = frozenset({
|
||||
"last_course", "torpedo_depth", "salvo", "pending_bearing",
|
||||
"steer_torpedo", "events", "battery_state", "keel_warned",
|
||||
"obstacle_warned", "obstacle_ahead_nm",
|
||||
"scope_rel_deg", "sightings", "sightings_seen", "tdc",
|
||||
"scope_rel_deg", "sightings", "sightings_seen", "tdc", "tubes",
|
||||
})
|
||||
# Save v24: the attack computer's stadimeter marks, ``{ref: {target_id, marks}}``
|
||||
# with marks ``[t, x, y]`` in time order.
|
||||
|
||||
@@ -199,6 +199,22 @@ def _valid_crew_block(data, *, valid_sonar, valid_sonar_controls, entity_ids,
|
||||
or not bounded(mark[1], -1e5, 1e5) or not bounded(mark[2], -1e5, 1e5)):
|
||||
return False
|
||||
last_t = mark[0]
|
||||
# Save v26: the flood state of each tube of the crewed boat's battery.
|
||||
battery = sub_rows[sub_id].get("asw_battery")
|
||||
battery_tubes = battery.get("tubes") if isinstance(battery, dict) else None
|
||||
tubes = orders["tubes"]
|
||||
if (not isinstance(tubes, list)
|
||||
or len(tubes) != (len(battery_tubes) if isinstance(battery_tubes, list) else 0)):
|
||||
return False
|
||||
for index, row in enumerate(tubes):
|
||||
if (not isinstance(row, list) or len(row) != 2
|
||||
or row[0] not in config.UBOOT_TUBE_STATES
|
||||
or not bounded(row[1], 0.0, config.UBOOT_TUBE_FLOOD_S)
|
||||
or (row[0] == "flooding") != (row[1] > 0.0)
|
||||
or (row[0] != "dry" and (not isinstance(battery_tubes[index], dict)
|
||||
or battery_tubes[index].get("loaded_weapon_key")
|
||||
is None))):
|
||||
return False
|
||||
seen = orders["sightings_seen"]
|
||||
if (not isinstance(seen, list) or len(seen) > 64
|
||||
or any(not isinstance(item, str) or not 1 <= len(item) <= 16 for item in seen)
|
||||
|
||||
@@ -39,6 +39,9 @@ _SONAR_BLOCKED = frozenset({
|
||||
UBOOT_INPUT_MODES = ("uboot_course", "uboot_speed", "uboot_depth", "uboot_bearing",
|
||||
"uboot_range", "uboot_torpedo_depth", "uboot_wire_bearing",
|
||||
"uboot_wire_range")
|
||||
# Rejections of the tube orders (``Sub.command_load_tube``/``command_flood_tube``).
|
||||
TUBE_REASONS = ("not_ready", "no_torpedoes", "uboot_compartment_down", "uboot_tubes_full",
|
||||
"uboot_no_dry_tube")
|
||||
# Rejections of boat-mode orders that have their own local text.
|
||||
UBOOT_LOCAL_REASONS = ("not_ready", "uboot_too_deep", "uboot_no_snorkel", "uboot_mast_depth",
|
||||
"uboot_no_absorbers", "uboot_no_candles", "uboot_candle_burning",
|
||||
@@ -191,6 +194,7 @@ def _fire_notice(game, result) -> None:
|
||||
reason=message(f"uboot.reason.{result}")
|
||||
if result in ("not_ready", "no_torpedoes", "reloading",
|
||||
"out_of_arc", "stale_ref", "unknown_ref",
|
||||
"uboot_tube_dry",
|
||||
"uboot_no_wire", "invalid_value",
|
||||
"uboot_compartment_down", "uboot_no_solution",
|
||||
"uboot_mast_down", "uboot_no_sighting")
|
||||
@@ -583,6 +587,17 @@ def _command_key(game, current, key, mods) -> None:
|
||||
team, compartment, current.dc_task), team=team + 1,
|
||||
compartment=message(f"uboot.compartment.{compartment}"),
|
||||
task=message(f"uboot.dc.task.{current.dc_task}"))
|
||||
elif page == "UBOOT_WEAPONS" and key == pygame.K_m:
|
||||
flood = bool(mods & pygame.KMOD_SHIFT)
|
||||
if order_allowed(game, "uboot_tube_flood" if flood else "uboot_tube_load"):
|
||||
result = sub.command_flood_tube() if flood else sub.command_load_tube()
|
||||
if result is True:
|
||||
_announce(game, "waffen", message(
|
||||
"uboot.local.tube_flooding" if flood else "uboot.local.tube_loading"))
|
||||
else:
|
||||
game.flash(message("uboot.local.tube_rejected", reason=message(
|
||||
f"uboot.reason.{result}" if result in TUBE_REASONS
|
||||
else "uboot.reason.not_ready")), 2.0)
|
||||
elif page == "UBOOT_DAMAGE" and key == pygame.K_m:
|
||||
if order_allowed(game, "uboot_watch_change") and game.boat_change_watch() is not True:
|
||||
game.flash(message("crew.watch_blocked"), 2.0)
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@ This module is deliberately dependency-free because setuptools imports the
|
||||
version while building the project.
|
||||
"""
|
||||
|
||||
APP_VERSION = "1.3.30"
|
||||
SAVE_VERSION = 25
|
||||
SAVE_SCHEMA = "u-jagd-save-v25"
|
||||
APP_VERSION = "1.3.31"
|
||||
SAVE_VERSION = 26
|
||||
SAVE_SCHEMA = "u-jagd-save-v26"
|
||||
SPLASH_TEXT = (
|
||||
"Anti Sub Marine Warfare on uConsole by Dominik Bornhäußer "
|
||||
f"Version {APP_VERSION}"
|
||||
|
||||
+97
-3
@@ -480,9 +480,16 @@ class Sub:
|
||||
profile = self.enemy_torpedo_profile
|
||||
fired_key = None
|
||||
if self.weapon_battery is not None:
|
||||
fired_key = self.weapon_battery.fire()
|
||||
tubes = self.crew_tubes
|
||||
# A crew fires only flooded tubes and loads each one itself.
|
||||
fired_key = self.weapon_battery.fire(
|
||||
tubes=None if tubes is None else {
|
||||
index for index, row in enumerate(tubes) if row[0] == "flooded"},
|
||||
auto_reload=tubes is None)
|
||||
if fired_key is None:
|
||||
break
|
||||
if tubes is not None:
|
||||
tubes[self.weapon_battery.last_fired_tube] = ["dry", 0.0]
|
||||
runtime_key = self.runtime_catalog.weapons[
|
||||
fired_key].runtime_profile_key
|
||||
if runtime_key is None:
|
||||
@@ -718,9 +725,15 @@ class Sub:
|
||||
if self.endurance is not None:
|
||||
self._update_air(dt)
|
||||
if self.weapon_battery is not None:
|
||||
# Foul air slows the torpedo gang's reloading.
|
||||
self.weapon_battery.update(dt * self.crew_efficiency())
|
||||
# Foul air slows the torpedo gang's reloading and flooding.
|
||||
tubes = self.crew_tubes
|
||||
loading = [tube.loading_weapon_key is not None
|
||||
for tube in self.weapon_battery.tubes]
|
||||
self.weapon_battery.update(dt * self.crew_efficiency(),
|
||||
auto_reload=tubes is None)
|
||||
self.torpedoes_left = self.weapon_battery.remaining_total
|
||||
if tubes is not None:
|
||||
self._update_tubes(dt * self.crew_efficiency(), tubes, loading)
|
||||
if self.countermeasure_store is not None:
|
||||
self.countermeasure_store.update(dt)
|
||||
if observation is not None and not isinstance(observation, PlatformObservation):
|
||||
@@ -1407,6 +1420,82 @@ class Sub:
|
||||
return "not_ready"
|
||||
return self.damage_control.set_bulkhead(compartment, closed)
|
||||
|
||||
@property
|
||||
def crew_tubes(self):
|
||||
"""The crew's flood state per tube (``[state, seconds left]``), or None
|
||||
when nobody crews the boat (the AI's tubes fire and reload by themselves)."""
|
||||
crew = self.crew
|
||||
tubes = getattr(crew, "tubes", None) if self.manual else None
|
||||
if (not tubes or self.weapon_battery is None
|
||||
or len(tubes) != len(self.weapon_battery.tubes)):
|
||||
return None
|
||||
return tubes
|
||||
|
||||
def _update_tubes(self, dt: float, tubes, was_loading) -> None:
|
||||
for index, row in enumerate(tubes):
|
||||
tube = self.weapon_battery.tubes[index]
|
||||
if was_loading[index] and tube.loaded_weapon_key is not None:
|
||||
self.crew.event("tube_loaded", tube=f"{index + 1}")
|
||||
if tube.loaded_weapon_key is None and row[0] != "dry":
|
||||
tubes[index] = ["dry", 0.0]
|
||||
elif row[0] == "flooding":
|
||||
left = max(0.0, row[1] - dt)
|
||||
tubes[index] = ["flooded", 0.0] if left <= 1e-9 else ["flooding", left]
|
||||
if left <= 1e-9:
|
||||
self.crew.event("tube_flooded", tube=f"{index + 1}")
|
||||
|
||||
def _tube_order_ready(self):
|
||||
if not self.manual or self.sunk or self.state in ("SINKING", "SUNK"):
|
||||
return "not_ready"
|
||||
if self.crew_tubes is None:
|
||||
return "not_ready"
|
||||
if self.damage_control.down("bow"):
|
||||
return "uboot_compartment_down" # torpedo room flooded or burning
|
||||
return None
|
||||
|
||||
def command_load_tube(self, tube=None):
|
||||
"""Load one empty tube from the racks (the first empty one by default)."""
|
||||
reason = self._tube_order_ready()
|
||||
if reason is not None:
|
||||
return reason
|
||||
battery = self.weapon_battery
|
||||
if tube is None:
|
||||
tube = next((item.index for item in battery.tubes
|
||||
if item.loaded_weapon_key is None
|
||||
and item.loading_weapon_key is None), None)
|
||||
if tube is None:
|
||||
return "uboot_tubes_full"
|
||||
if type(tube) is not int or not 0 <= tube < len(battery.tubes):
|
||||
return "invalid_value"
|
||||
row = battery.tubes[tube]
|
||||
if row.loaded_weapon_key is not None or row.loading_weapon_key is not None:
|
||||
return "uboot_tubes_full"
|
||||
if not battery.load_tube(tube):
|
||||
return "no_torpedoes"
|
||||
self.crew_tubes[tube] = ["dry", 0.0]
|
||||
return True
|
||||
|
||||
def command_flood_tube(self, tube=None):
|
||||
"""Flood a loaded tube and open its outer door: only a flooded tube fires.
|
||||
Flooding takes ``UBOOT_TUBE_FLOOD_S`` and is a short, audible transient."""
|
||||
reason = self._tube_order_ready()
|
||||
if reason is not None:
|
||||
return reason
|
||||
battery, tubes = self.weapon_battery, self.crew_tubes
|
||||
if tube is None:
|
||||
tube = next((item.index for item in battery.tubes
|
||||
if item.loaded_weapon_key is not None
|
||||
and tubes[item.index][0] == "dry"), None)
|
||||
if tube is None:
|
||||
return "uboot_no_dry_tube"
|
||||
if type(tube) is not int or not 0 <= tube < len(battery.tubes):
|
||||
return "invalid_value"
|
||||
if battery.tubes[tube].loaded_weapon_key is None or tubes[tube][0] != "dry":
|
||||
return "uboot_no_dry_tube"
|
||||
tubes[tube] = ["flooding", float(config.UBOOT_TUBE_FLOOD_S)]
|
||||
self.transient_left = max(self.transient_left, config.UBOOT_TUBE_FLOOD_NOISE_S)
|
||||
return True
|
||||
|
||||
def fire_readiness(self, bearing=None, salvo: int = 1):
|
||||
"""Why a crew torpedo shot is impossible now, or None when ready."""
|
||||
if not self.manual or self.sunk or self.state in ("SINKING", "SUNK"):
|
||||
@@ -1421,6 +1510,11 @@ class Sub:
|
||||
return "reloading"
|
||||
if len(self.pending_torpedoes) + salvo > SUB_MAX_PENDING_TORPEDOES:
|
||||
return "reloading"
|
||||
tubes = self.crew_tubes
|
||||
if tubes is not None and sum(
|
||||
row[0] == "flooded" and self.weapon_battery.tubes[index].loaded_weapon_key
|
||||
is not None for index, row in enumerate(tubes)) < salvo:
|
||||
return "uboot_tube_dry"
|
||||
if bearing is not None and self.weapon_battery is not None:
|
||||
launcher = self.runtime_catalog.launchers[self.weapon_battery.launcher_key]
|
||||
arc_center = (self.course + launcher.arc_center_deg) % 360.0
|
||||
|
||||
+17
-3
@@ -587,10 +587,20 @@ def _draw_nav_page(s, game, boat, x, y, w, h) -> None:
|
||||
draw_depth_ladder(s, game, boat, inner)
|
||||
|
||||
|
||||
def tube_line(sub):
|
||||
"""``1 ready · 2 dry · 3 loading 40 s · 4 empty`` (localized)."""
|
||||
parts = []
|
||||
for index, (state, left) in enumerate(opfor.tube_states(sub), start=1):
|
||||
parts.append(message(f"uboot.tube.{state}", tube=index,
|
||||
seconds=_fmt(left, "{:.0f}")))
|
||||
return raw_text(" · ".join(str(localize(part)) for part in parts)) if parts \
|
||||
else raw_text("--")
|
||||
|
||||
|
||||
def _draw_weapons_page(s, game, boat, x, y, w, h) -> None:
|
||||
sub = boat.sub
|
||||
battery = sub.weapon_battery
|
||||
box_h = min(150, h // 2)
|
||||
box_h = min(172, h // 2)
|
||||
fire = layout.box(s, (x, y, w, box_h), "uboot.panel.fire_control",
|
||||
border=config.COLOR_TEXT)
|
||||
fx, fy, fw, _ = fire
|
||||
@@ -602,7 +612,7 @@ def _draw_weapons_page(s, game, boat, x, y, w, h) -> None:
|
||||
layout.status_line(s, fx, fy + 36, half, "uboot.label.torpedoes",
|
||||
raw_text(f"{int(sub.torpedoes_left)}"), size=17, label_w=150)
|
||||
layout.status_line(s, fx, fy + 62, half, "uboot.label.tubes_ready",
|
||||
raw_text(f"{int(battery.ready_count) if battery else 0}"
|
||||
raw_text(f"{opfor.tubes_flooded(sub)}"
|
||||
f"/{int(battery.mount_count) if battery else 0}"),
|
||||
size=17, label_w=150)
|
||||
reload_s = battery.next_reload_s if battery is not None and battery.loading_count else None
|
||||
@@ -623,6 +633,8 @@ def _draw_weapons_page(s, game, boat, x, y, w, h) -> None:
|
||||
depth=_fmt(orders.torpedo_depth) if orders.torpedo_depth else message("uboot.value.auto_depth"),
|
||||
salvo=orders.salvo, wires=wired),
|
||||
(fx + half + 10, fy + 88, half, 20), config.COLOR_TEXT_DIM, size=15)
|
||||
layout.blit_line(s, message("uboot.line.tubes", tubes=tube_line(sub)),
|
||||
(fx, fy + 112, fw, 20), config.COLOR_TEXT, size=15)
|
||||
contacts_y = y + box_h + 10
|
||||
listing = layout.box(s, (x, contacts_y, w, y + h - contacts_y), "uboot.local.contacts")
|
||||
lx, ly, lw, lh = listing
|
||||
@@ -680,7 +692,9 @@ _FOOTERS = {
|
||||
("uboot_weapons", "UBOOT_WEAPONS"): (("↑/↓", "uboot.footer.contact"),
|
||||
("help.key.uboot_fire", "uboot.footer.fire"),
|
||||
("F", "uboot.footer.fire_bearing"),
|
||||
("W", "uboot.footer.wire"), ("X", "uboot.footer.decoy")),
|
||||
("W", "uboot.footer.wire"), ("X", "uboot.footer.decoy"),
|
||||
("M", "uboot.footer.tube_load"),
|
||||
("Shift+M", "uboot.footer.tube_flood")),
|
||||
("uboot_radio", "UBOOT_RADIO"): (("help.key.enter", "uboot.footer.radio_send"),
|
||||
("P", "uboot.footer.mast"), ("Q/E", "uboot.footer.chart")),
|
||||
("uboot_engine", "UBOOT_ENGINE"): (("+/-", "uboot.footer.telegraph"),
|
||||
|
||||
+26
-4
@@ -167,6 +167,8 @@ class WeaponBattery:
|
||||
# The type the tubes load next (the operator's selection; not saved
|
||||
# by the battery, the game restores it from its weapon settings).
|
||||
self.preferred_weapon_key = None
|
||||
# The tube the last ``fire`` emptied (transient, for the caller).
|
||||
self.last_fired_tube = None
|
||||
for tube in self.tubes[:min(int(ready_count), self.mount_count)]:
|
||||
weapon_key = self._reserve_weapon()
|
||||
if weapon_key is not None:
|
||||
@@ -286,18 +288,35 @@ class WeaponBattery:
|
||||
if tube.loading_weapon_key is not None]
|
||||
return min(values, default=0.0)
|
||||
|
||||
def fire(self, weapon_key: str | None = None) -> str | None:
|
||||
def fire(self, weapon_key: str | None = None, *, tubes=None,
|
||||
auto_reload: bool = True) -> str | None:
|
||||
"""Fire the first loaded tube (of ``tubes`` when given, by index);
|
||||
without ``auto_reload`` the tube stays empty until it is loaded."""
|
||||
tube = next((item for item in self.tubes
|
||||
if item.loaded_weapon_key is not None
|
||||
and (tubes is None or item.index in tubes)
|
||||
and (weapon_key is None
|
||||
or item.loaded_weapon_key == weapon_key)), None)
|
||||
if tube is None:
|
||||
return None
|
||||
fired = tube.loaded_weapon_key
|
||||
tube.loaded_weapon_key = None
|
||||
self._start_reload(tube, fired)
|
||||
self.last_fired_tube = tube.index
|
||||
if auto_reload:
|
||||
self._start_reload(tube, fired)
|
||||
return fired
|
||||
|
||||
def load_tube(self, index: int, preferred: str | None = None) -> bool:
|
||||
"""Start loading one empty tube from the magazine (a crew's order)."""
|
||||
if not 0 <= index < len(self.tubes):
|
||||
return False
|
||||
tube = self.tubes[index]
|
||||
if tube.loaded_weapon_key is not None or tube.loading_weapon_key is not None:
|
||||
return False
|
||||
self._start_reload(tube, preferred if preferred is not None
|
||||
else self.preferred_weapon_key)
|
||||
return tube.loaded_weapon_key is not None or tube.loading_weapon_key is not None
|
||||
|
||||
def _start_reload(self, tube: TubeState, preferred: str | None = None) -> None:
|
||||
weapon_key = self._reserve_weapon(preferred)
|
||||
if weapon_key is None:
|
||||
@@ -344,11 +363,14 @@ class WeaponBattery:
|
||||
in_tubes[magazine.weapon_key] = held - counted
|
||||
magazine.stowed = max(magazine.stowed, magazine.capacity - counted)
|
||||
|
||||
def update(self, dt: float, readiness_scale: float = 1.0) -> None:
|
||||
def update(self, dt: float, readiness_scale: float = 1.0, *,
|
||||
auto_reload: bool = True) -> None:
|
||||
"""Advance loading; ``auto_reload`` refills empty tubes on its own (a
|
||||
crewed submarine loads each tube on the crew's order instead)."""
|
||||
step = max(0.0, float(dt) * max(0.0, readiness_scale))
|
||||
for tube in self.tubes:
|
||||
if tube.loading_weapon_key is None:
|
||||
if tube.loaded_weapon_key is None:
|
||||
if tube.loaded_weapon_key is None and auto_reload:
|
||||
self._start_reload(tube, self.preferred_weapon_key)
|
||||
continue
|
||||
tube.reload_remaining_s = max(0.0, tube.reload_remaining_s - step)
|
||||
|
||||
@@ -84,7 +84,7 @@ def test_catalog_submarine_battery_uses_typed_pilot_profile():
|
||||
assert battery is not None
|
||||
assert battery.capacity_total == 24
|
||||
assert battery.ready_count == 4
|
||||
assert battery.reload_s == 60
|
||||
assert battery.reload_s == 120
|
||||
|
||||
|
||||
def test_battery_roundtrip_and_strict_rejection():
|
||||
|
||||
@@ -97,9 +97,10 @@ def test_r10_submarine_components_preserve_draw_order_and_add_finite_decoys():
|
||||
assert machine_acoustics(CATALOG, key, submarine.speed) is None
|
||||
assert set(submarine.sensor_suite.controllers) == {
|
||||
f"sensor.{key}.sonar", f"sensor.{key}.esm"}
|
||||
assert submarine.weapon_battery.remaining_total == profile.torpedoes
|
||||
# The tubes hold the legacy count; as many reloads again lie in the racks.
|
||||
assert submarine.weapon_battery.remaining_total == 2 * profile.torpedoes
|
||||
assert submarine.weapon_battery.ready_count == profile.torpedoes
|
||||
assert submarine.weapon_battery.reload_s == 0
|
||||
assert submarine.weapon_battery.reload_s in (120, 180, 240)
|
||||
assert submarine.countermeasure_store.remaining_total == 12
|
||||
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ def test_source_and_wheel_contain_editor_templates(tmp_path):
|
||||
(ROOT / "data/contact_analysis" / name).read_bytes()
|
||||
assert any(name.endswith(".dist-info/licenses/THIRD_PARTY_NOTICES.md")
|
||||
for name in wheel_names)
|
||||
assert any(name.endswith("-1.3.30.dist-info/METADATA") for name in wheel_names)
|
||||
assert any(name.endswith("-1.3.31.dist-info/METADATA") for name in wheel_names)
|
||||
|
||||
source = next(tmp_path.glob("u_jagd-*.tar.gz"))
|
||||
with tarfile.open(source) as archive:
|
||||
@@ -137,7 +137,7 @@ def test_source_and_wheel_contain_editor_templates(tmp_path):
|
||||
[sys.executable, "-c",
|
||||
"from importlib import resources; "
|
||||
"assert resources.files('data.editor_templates').joinpath('mission.json').is_file(); "
|
||||
"from src.core.version import APP_VERSION; assert APP_VERSION == '1.3.30'; "
|
||||
"from src.core.version import APP_VERSION; assert APP_VERSION == '1.3.31'; "
|
||||
"from src.commander.server import CommanderServer; "
|
||||
"server=CommanderServer(); server.start('127.0.0.1',0); server.stop(); "
|
||||
"from src.core import manual; page=manual.html_page('de'); assert 'station-sonar' in page; "
|
||||
|
||||
@@ -19,11 +19,11 @@ def _game(seed=1201):
|
||||
return Game(seed=seed, start_menu=False, audio_enabled=False)
|
||||
|
||||
|
||||
def test_save_is_v25_and_older_documents_are_rejected():
|
||||
def test_save_is_v26_and_older_documents_are_rejected():
|
||||
game = _game()
|
||||
state = json.loads(json.dumps(game.save_state()))
|
||||
assert (state["version"], state["save_schema"]) == (25, "u-jagd-save-v25")
|
||||
assert (SAVE_VERSION, SAVE_SCHEMA) == (25, "u-jagd-save-v25")
|
||||
assert (state["version"], state["save_schema"]) == (26, "u-jagd-save-v26")
|
||||
assert (SAVE_VERSION, SAVE_SCHEMA) == (26, "u-jagd-save-v26")
|
||||
assert set(state) == SAVE_ROOT_FIELDS
|
||||
before = game.save_state()
|
||||
legacy = copy.deepcopy(state)
|
||||
@@ -117,6 +117,11 @@ def test_save_is_v25_and_older_documents_are_rejected():
|
||||
v24["save_schema"] = "u-jagd-save-v24"
|
||||
del v24["radar_marks"]
|
||||
assert not game._load_save_data(v24)
|
||||
# v25 differs only by the crewed boat's tube flood states (crew.orders.tubes).
|
||||
v25 = copy.deepcopy(state)
|
||||
v25["version"] = 25
|
||||
v25["save_schema"] = "u-jagd-save-v25"
|
||||
assert not game._load_save_data(v25)
|
||||
assert game.save_state() == before
|
||||
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ from src.world.real_coast import sector_for_seed
|
||||
|
||||
|
||||
def test_release_version_and_exact_splash_text():
|
||||
assert APP_VERSION == "1.3.30"
|
||||
assert APP_VERSION == "1.3.31"
|
||||
assert SPLASH_TEXT == (
|
||||
"Anti Sub Marine Warfare on uConsole by Dominik Bornhäußer Version 1.3.30"
|
||||
"Anti Sub Marine Warfare on uConsole by Dominik Bornhäußer Version 1.3.31"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
"""The crewed submarine's torpedo tubes: loaded one by one, flooded to fire."""
|
||||
|
||||
import copy
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pygame
|
||||
|
||||
from src.commander.server import UBOOT_REASONS, V2_ACTION_REGISTRY
|
||||
from src.core import config, opfor, uboot_local
|
||||
from src.core.i18n import localize
|
||||
from src.ui import uboot_view
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from test_opfor_sub import _crewed, _feed_texts, _run # noqa: E402
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def _states(sub):
|
||||
return [state for state, _left in opfor.tube_states(sub)]
|
||||
|
||||
|
||||
def _fire(sub, game):
|
||||
return sub.command_fire(90.0, 3.0, now=game.sim_t)
|
||||
|
||||
|
||||
def _aim(sub):
|
||||
sub.course = 90.0
|
||||
|
||||
|
||||
def _reloads(sub, count=4, reload_s=60.0):
|
||||
"""Give the battery reloads in its racks (the catalog decides the real stock)."""
|
||||
battery = sub.weapon_battery
|
||||
magazine = next(iter(battery.magazines.values()))
|
||||
magazine.capacity += count
|
||||
magazine.stowed += count
|
||||
battery.reload_s = reload_s
|
||||
sub.torpedoes_left = battery.remaining_total
|
||||
|
||||
|
||||
def test_the_crew_takes_over_flooded_tubes_and_reloads_by_hand():
|
||||
game, _server, _bridge = _crewed(seed=71)
|
||||
sub = game.opfor.sub
|
||||
_aim(sub)
|
||||
_reloads(sub)
|
||||
battery = sub.weapon_battery
|
||||
loaded = battery.ready_count
|
||||
assert loaded >= 1 and _states(sub)[:loaded] == ["flooded"] * loaded
|
||||
assert _fire(sub, game) is True
|
||||
fired = battery.last_fired_tube
|
||||
# The fired tube stays empty: the crew loads each tube itself.
|
||||
_run(game, battery.reload_s + 5.0)
|
||||
assert _states(sub)[fired] == "empty"
|
||||
for _ in range(loaded - 1):
|
||||
game.opfor.sub.pending_torpedoes.clear()
|
||||
assert _fire(sub, game) is True
|
||||
sub.pending_torpedoes.clear()
|
||||
assert sub.fire_readiness() in ("reloading", "uboot_tube_dry")
|
||||
assert sub.command_flood_tube() == "uboot_no_dry_tube"
|
||||
assert sub.command_load_tube(fired) is True
|
||||
assert _states(sub)[fired] == "loading"
|
||||
assert sub.command_load_tube(fired) == "uboot_tubes_full"
|
||||
_run(game, battery.reload_s + 1.0)
|
||||
assert _states(sub)[fired] == "dry"
|
||||
assert any(f"Tube {fired + 1} loaded" in text for text in _feed_texts(game))
|
||||
# A loaded but dry tube does not fire.
|
||||
assert sub.fire_readiness() == "uboot_tube_dry"
|
||||
assert _fire(sub, game) == "uboot_tube_dry"
|
||||
before = sub.transient_left
|
||||
assert sub.command_flood_tube() is True
|
||||
assert _states(sub)[fired] == "flooding"
|
||||
assert sub.transient_left >= max(before, config.UBOOT_TUBE_FLOOD_NOISE_S - 1e-9)
|
||||
_run(game, config.UBOOT_TUBE_FLOOD_S + 1.0)
|
||||
assert _states(sub)[fired] == "flooded"
|
||||
assert any(f"Tube {fired + 1} flooded" in text for text in _feed_texts(game))
|
||||
assert sub.fire_readiness() is None and _fire(sub, game) is True
|
||||
|
||||
|
||||
def test_a_flooded_torpedo_room_cannot_work_the_tubes():
|
||||
game, _server, _bridge = _crewed(seed=72)
|
||||
sub = game.opfor.sub
|
||||
sub.damage_control.down = lambda name: name == "bow"
|
||||
assert sub.command_load_tube() == "uboot_compartment_down"
|
||||
assert sub.command_flood_tube() == "uboot_compartment_down"
|
||||
|
||||
|
||||
def test_the_ai_boat_keeps_reloading_by_itself():
|
||||
game, _server, _bridge = _crewed(seed=73)
|
||||
sub = game.opfor.sub
|
||||
sub.manual = False
|
||||
_reloads(sub)
|
||||
assert sub.crew_tubes is None
|
||||
battery = sub.weapon_battery
|
||||
assert battery.fire() is not None
|
||||
battery.update(1.0)
|
||||
assert battery.tubes[battery.last_fired_tube].loading_weapon_key is not None
|
||||
|
||||
|
||||
def test_tube_states_survive_a_save_and_bad_ones_are_rejected():
|
||||
game, _server, _bridge = _crewed(seed=74)
|
||||
sub = game.opfor.sub
|
||||
_aim(sub)
|
||||
assert _fire(sub, game) is True
|
||||
empty = sub.weapon_battery.last_fired_tube
|
||||
sub.pending_torpedoes.clear()
|
||||
tube = next(index for index, state in enumerate(_states(sub)) if state == "flooded")
|
||||
sub.crew.tubes[tube] = ["dry", 0.0] # a loaded tube, drained
|
||||
assert sub.command_flood_tube(tube) is True
|
||||
_run(game, 5.0)
|
||||
state = json.loads(json.dumps(game.save_state()))
|
||||
tubes = state["crew"]["orders"]["tubes"]
|
||||
assert tubes[tube][0] == "flooding" and 0 < tubes[tube][1] < config.UBOOT_TUBE_FLOOD_S
|
||||
assert tubes[empty] == ["dry", 0.0]
|
||||
assert game._load_save_data(copy.deepcopy(state))
|
||||
assert opfor.tube_states(game.opfor.sub)[tube][0] == "flooding"
|
||||
for row in (["dry", 0.0], None):
|
||||
broken = copy.deepcopy(state)
|
||||
if row is None:
|
||||
broken["crew"]["orders"]["tubes"].pop()
|
||||
else:
|
||||
broken["crew"]["orders"]["tubes"].append(row)
|
||||
assert not game._load_save_data(broken)
|
||||
broken = copy.deepcopy(state)
|
||||
broken["crew"]["orders"]["tubes"][empty] = ["flooded", 0.0] # an empty tube
|
||||
assert not game._load_save_data(broken)
|
||||
broken = copy.deepcopy(state)
|
||||
broken["crew"]["orders"]["tubes"][tube] = ["flooding", 0.0]
|
||||
assert not game._load_save_data(broken)
|
||||
broken = copy.deepcopy(state)
|
||||
broken["crew"]["orders"]["tubes"][tube] = ["open", 0.0]
|
||||
assert not game._load_save_data(broken)
|
||||
|
||||
|
||||
def test_the_tube_orders_reach_the_weapons_station_and_the_browser():
|
||||
for action in ("uboot_tube_load", "uboot_tube_flood"):
|
||||
spec = V2_ACTION_REGISTRY[action]
|
||||
assert spec.stations == frozenset({"uboot_weapons"})
|
||||
assert spec.validate_params({"tube": None}) and spec.validate_params({"tube": 2})
|
||||
assert not spec.validate_params({"tube": -1}) and not spec.validate_params({"tube": "1"})
|
||||
assert not spec.validate_params({})
|
||||
assert {"uboot_tube_dry", "uboot_tubes_full", "uboot_no_dry_tube"} <= UBOOT_REASONS
|
||||
game, server, bridge = _crewed(seed=75)
|
||||
sub = game.opfor.sub
|
||||
assert bridge._apply_opfor_action(game, "uboot_tube_load", {"tube": None},
|
||||
"uboot_weapons") in (True, "uboot_tubes_full")
|
||||
assert bridge._apply_opfor_action(game, "uboot_tube_flood", {"tube": 0},
|
||||
"uboot_weapons") == "uboot_no_dry_tube"
|
||||
bridge.pump(game, server, now=5.0)
|
||||
weapons = server.v2_states["uboot_weapons"]["uboot_weapons"]["weapons"]
|
||||
assert [row["state"] for row in weapons["tubes"]] == _states(sub)
|
||||
assert weapons["tubes_ready"] == opfor.tubes_flooded(sub)
|
||||
base = (ROOT / "data/commander/js/core/base.js").read_text(encoding="utf-8")
|
||||
assert "uboot_tube_dry" in base and "uboot_no_dry_tube" in base
|
||||
|
||||
|
||||
def test_the_uconsole_weapons_page_loads_and_floods_with_m():
|
||||
game, _server, _bridge = _crewed(seed=76)
|
||||
game.local_side = "uboot"
|
||||
uboot_local.set_local_station(game, "uboot_weapons")
|
||||
sub = game.opfor.sub
|
||||
_aim(sub)
|
||||
_reloads(sub)
|
||||
assert _fire(sub, game) is True
|
||||
tube = sub.weapon_battery.last_fired_tube
|
||||
sub.pending_torpedoes.clear()
|
||||
uboot_local.handle_key(game, pygame.event.Event(pygame.KEYDOWN, key=pygame.K_m, mod=0))
|
||||
assert _states(sub)[tube] == "loading"
|
||||
_run(game, sub.weapon_battery.reload_s + 1.0)
|
||||
uboot_local.handle_key(game, pygame.event.Event(pygame.KEYDOWN, key=pygame.K_m,
|
||||
mod=pygame.KMOD_SHIFT))
|
||||
assert _states(sub)[tube] == "flooding"
|
||||
text = str(localize(uboot_view.tube_line(sub)))
|
||||
assert f"{tube + 1} flooding" in text
|
||||
uboot_view.draw(game)
|
||||
Reference in new issue
Block a user