refactor(gameserver): World is a pure lock+delegate facade (HARD GATE) #49
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!49
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/world-thin-facade"
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?
Closes the HARD-GATE finding from the code review:
World.csstill held inlined domain logic (PlayersWithinloop, the move ruleset inTick, theStepCreaturesswitch,PlayerAt). Root cause: players lived in a raw dictionary with no registry, so player-domain logic had nowhere to go.PlayerRegistry— owns the players + AoI/occupancy/snapshot/persist projections.MovementSystem— the pending-move ruleset (cooldown/walkability/creature-occupancy) + GM teleport.CreatureSystem— creature stepping (the AI switch + move/attack validation).CorpseRegistry.SpawnFor— the per-death corpse loop;ItemRegistry.EquippedWeapon— the catalog lookupApplyEquippedWeaponused to inline.GridPosition.ChebyshevDistanceTo— the shared in-range metric (also dedups other call sites in the next batch).World.csnow onlylocks and delegates — every rule is in a component; it also unblocks the spell systems cast-walk (an effective-move-cooldown the movement component can own). Behaviour unchanged: whole suite green (GameServer 113), 0 warnings, csharpier clean.Definition of Done
if/loop/formula/switch remains in aWorldmethod beyond lock+delegate (players now have a registry like creatures/items/corpses).GridPosition.