mirror of
https://github.com/db9979/tidefront.git
synced 2026-12-05 12:24:13 +01:00
Karte: Warnring eines bedrohten Felds hängt an keinem Stapel (führt die eigene Besatzung den Stapel, blieb er unsichtbar); E2E 22-vertraege gibt der KI Taler (H-7)
This commit is contained in:
1 parent
c93be7949d
commit
1daa28328d
2 files changed
+5
-2
No files matched your search
@@ -14,6 +14,8 @@ test("Verträge: Angebot der Reederei annehmen, Liste mit Status, Kündigung", a
|
||||
const { playerId: botId, name } = bot as { playerId: number; name: string };
|
||||
try {
|
||||
await seed.sql`update player set bot_state = jsonb_set(bot_state, '{nextActAt}', '99999999999999'::jsonb) where id = ${botId}`;
|
||||
// „Du lieferst“: die KI zahlt in Treuhand – ohne Taler wäre ihr Kontingent 0 (H-7).
|
||||
await seed.sql`update player set trader = jsonb_set(trader, '{credits}', '100000'::jsonb) where id = ${botId}`;
|
||||
const [kb] = await seed.sql`select id from base where player_id = ${botId}`;
|
||||
await updateState(seed.sql, kb.id as number, (s) => {
|
||||
s.buildings.lagerkomplex = 8;
|
||||
|
||||
@@ -101,11 +101,12 @@ export function buildFieldLayer(fields: MapField[], linkKm: number): { root: Con
|
||||
const label = `Rohstofffeld: ${FIELD_TEXT[f.kind] ?? "Elektronik-Wrack"} (Stufe ${f.tier})`;
|
||||
const threats = f.threats ?? [];
|
||||
const hex = () => ({ col: f.col, row: f.row });
|
||||
// Bedrohtes Feld führt seinen Stapel (wie ein Weltereignis), damit Ring und Schild nie darunter verschwinden.
|
||||
// Bedrohtes Feld führt seinen Stapel (wie ein Weltereignis). Der Warnring hängt an keinem Stapel: führt ein eigenes
|
||||
// Zeichen (z. B. die Besatzung am Feld) den Stapel, bliebe er sonst unsichtbar. Das Schild reiht sich ein (Liste: „Bedrohung: …“).
|
||||
const ent = stackEntity(`feld:${f.id}`, threats.length > 0 ? STACK_PRIO.event : STACK_PRIO.field,
|
||||
[{ label, hex }, ...threats.map((t) => ({ label: `Bedrohung: ${threatText(t)}`, hex }))]);
|
||||
pinned.push(attachPin(ent, { obj: s, min: 0.08 }));
|
||||
for (const t of threatPins(threats, p, zones)) { root.addChild(t.obj); pinned.push(attachPin(ent, t)); }
|
||||
for (const t of threatPins(threats, p, zones)) { root.addChild(t.obj); pinned.push(t.obj.label === "feld-bedrohung" ? t : attachPin(ent, t)); }
|
||||
}
|
||||
return { root, pinned };
|
||||
}
|
||||
Reference in new issue
Block a user