Add crew watches, fatigue, action stations and morale

Frigate and crewed boat stand three watches relieved every hour of game
time. Action stations make the crew more alert but tire everybody;
morale moves with kills, damage and HQ tasks. The crew's performance
raises the sonar recognition threshold, needs more lookout/periscope
contrast and slows damage-control work. A fresh crew is exactly the
calibrated crew (77/77 metrics unchanged). Damage page 3, Bridge G,
boat keys B/M, Remote Crew cards and orders, save v21 "watch" and
crew.watch.

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:
Claude committed 2026-09-27 17:20:08 +00:00
1 parent de0a9e7497
commit c1946eb75f
49 files changed
+1121 -63

No files matched your search

+2
View File
@@ -4,9 +4,11 @@ import { number, t, unit } from "../core/format.js";
import { sightingText } from "../state/schema.js";
import { metrics, node, position, stationRows, tacticalEntries, yesNo } from "../views/dom.js";
import { DISPLAY_CLOCK_LAG_S, displaySimNow } from "../state/display-clock.js";
import { renderCrew } from "../views/crew.js";
export function renderBridgeStation(payload) {
const navigation = payload.navigation;
renderCrew($("bridge-crew"), $("bridge-crew-actions"), payload.crew, {actionStations: "crew_action_stations"});
metrics($("bridge-navigation"), [["position", position(navigation)], ["course", unit(navigation.course, "\u00b0", 0)],
["speed", unit(navigation.speed, "kn")], ["ordered_course", unit(navigation.target_course, "\u00b0", 0)],
["ordered_speed", unit(navigation.target_speed, "kn")], ["rudder_angle", unit(navigation.rudder_angle, "\u00b0")],
+3
View File
@@ -1,6 +1,7 @@
import { $, damageStates } from "../core/base.js";
import { enumText, number, t, unit } from "../core/format.js";
import { actionButton, metrics, node, stationRows, yesNo } from "../views/dom.js";
import { renderCrew } from "../views/crew.js";
function compartmentName(payload, key) {
return payload.compartments.find((room) => room.key === key)?.name || key;
@@ -8,6 +9,8 @@ function compartmentName(payload, key) {
export function renderDamageStation(payload) {
metrics($("damage-summary"), [["damage_total", unit(payload.total, "%")], ["sunk", yesNo(payload.sunk)]]);
renderCrew($("damage-crew"), $("damage-crew-actions"), payload.crew,
{actionStations: "crew_action_stations", watchChange: "crew_watch_change"});
const stability = payload.stability;
metrics($("damage-stability"), [["damage_list", unit(stability.list_deg, "\u00b0")],
["damage_trim", unit(stability.trim_deg, "\u00b0")],
+3
View File
@@ -2,6 +2,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 { renderCrew } from "../views/crew.js";
import { drawBoatBallast, drawBoatDamage, drawBoatDepth, drawBoatEsm, drawBoatScope } from "./uboot-graphics.js";
// Alarm age with the boat's own measured bearing (never the source's truth).
@@ -193,6 +194,8 @@ function renderDamage(dc) {
teams.length ? teams.join(", ") : "\u2013"].map((text) => node("td", text)), switchCell);
return line;
}));
renderCrew($("uboot-crew"), $("uboot-crew-actions"), dc.crew,
{actionStations: "uboot_action_stations", watchChange: "uboot_watch_change"});
metrics($("uboot-dc-teams"), [["uboot_dc_power", t(dc.power ? "uboot_dc_power_on" : "uboot_dc_power_off")],
...dc.teams.map((team) => [`uboot_dc_team_${team.team + 1}`, team.transit_s > 0
? t("uboot_dc_team_transit", {compartment: t(`uboot_compartment_${team.compartment}`), seconds: number(team.transit_s, 0)})