refactor: GM + targeting feedback to the string catalog (#73) #127
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!127
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/gm-strings-catalog"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #73 — the last freeform user-facing
SystemMessage(string)is gone. GM command feedback and targeting errors are now catalogued cues (SystemMessageId+ args); the wording lives only in the client'sSystemMessageCatalog(cliloc-style), so game logic holds no presentation copy and it's localization-ready.CommandResult:Feedback/InventoryChangedcarry(SystemMessageId Id, string[] Args)instead of a raw string. Every command returns catalogued ids — the dynamic bits (target name, coords, counts, the usage syntax) are passed as args.TargetValidatorreturns aSystemMessageId?, reusing the existingInvalidTarget/OutOfRange/NoLineOfSightthe spell path already reports.GameSessionHandlersendsSystemNotice(id, args)for command feedback, the/saveoutcome, and the "target cancelled" / validator errors — noSystemMessageliterals left.SystemMessageIdvalues + catalog templates; the existing catalog-completeness test enforces every id has a template.SystemMessage(string)stays as a wire type for any genuinely-dynamic future text, but nothing in game logic emits one now.Screenshots / recording
No visible change — the on-screen text is identical; only its source moved server→catalog.
How it was tested
SystemMessageCatalogTestsiterates everySystemMessageIdand asserts a template exists — so the 23 new ids are covered.CommandTests/TargetValidatorTestsupdated to assert the returnedSystemMessageIdinstead of the old strings.dotnet testgreen (340).Checklist
just lintpasses (CSharpier + analyzers, zero warnings)just testis greenSystemMessage(...)user-facing literal remains;TargetValidatorreportsSystemMessageId; catalog covers every id (test-enforced)