Migrate remaining freeform SystemMessage (GM feedback, targeting) to the string catalog #73

Closed
opened 2026-07-19 08:23:52 +02:00 by marco · 0 comments
Owner

The rule (CLAUDE.md): all user-facing text goes through the string catalog (SystemMessageId + SystemNotice / SystemMessageCatalog), never loose literals.

#72 migrated the gameplay cues (spell + skill gain). This tracks migrating the remaining freeform SystemMessage(string) so no loose user-facing string remains:

  • GM command feedback (SpawnCommand, TeleportCommand, KillCommand, ResurrectCommand, CommandRegistry, SaveCommand) — usage strings, "Spawned …", "Cannot spawn there", "Unknown command", "You are not allowed to do that", etc. Many are dynamic → SystemMessageId + args.
  • Targeting errors (TargetValidator returns strings: "Out of range", "No line of sight", "Invalid target") — these already have catalog ids; make TargetValidator return a SystemMessageId (or map at the send site) and send SystemNotice.
  • "Target cancelled." in the handler.

Definition of Done

  • No new SystemMessage(...) with a user-facing literal remains; all cues are SystemNotice(id, args).
  • TargetValidator reports failures as SystemMessageId, reused by both GM targeting and (already) the spell path where they overlap.
  • The catalog covers every id (test-enforced, as today).
The rule (CLAUDE.md): **all user-facing text goes through the string catalog** (`SystemMessageId` + `SystemNotice` / `SystemMessageCatalog`), never loose literals. #72 migrated the gameplay cues (spell + skill gain). This tracks migrating the **remaining freeform `SystemMessage(string)`** so no loose user-facing string remains: - **GM command feedback** (`SpawnCommand`, `TeleportCommand`, `KillCommand`, `ResurrectCommand`, `CommandRegistry`, `SaveCommand`) — usage strings, "Spawned …", "Cannot spawn there", "Unknown command", "You are not allowed to do that", etc. Many are dynamic → `SystemMessageId` + args. - **Targeting errors** (`TargetValidator` returns strings: "Out of range", "No line of sight", "Invalid target") — these already have catalog ids; make `TargetValidator` return a `SystemMessageId` (or map at the send site) and send `SystemNotice`. - "Target cancelled." in the handler. ## Definition of Done - No `new SystemMessage(...)` with a user-facing literal remains; all cues are `SystemNotice(id, args)`. - `TargetValidator` reports failures as `SystemMessageId`, reused by both GM targeting and (already) the spell path where they overlap. - The catalog covers every id (test-enforced, as today).
marco closed this issue 2026-07-22 07:17:55 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo#73
No description provided.