Skip to content

Keep the base-map return point in a component - #2967

Merged
erwan-joly merged 1 commit into
masterfrom
claude/project-thread-suoro3-basemap
Nov 13, 2026
Merged

erwan-joly merged 1 commit into
masterfrom
claude/project-thread-suoro3-basemap

Conversation

@erwan-joly

@erwan-joly erwan-joly commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Erwan · project thread

Fifth ECS cleanup, after #2951, #2955, #2958 and #2962.

What changed

  • The character's MapId/MapX/MapY (the last base-map spot, where leaving an instance or a miniland puts them back) were hand-written bundle properties reading and writing CharacterDto directly, the only character state that bypassed the components. They now live in a BaseMapPositionComponent, and the bundle properties are generated, so no call site changes.
  • CreatePlayer takes the map id and seeds the component from the character row; ClonePlayer carries it across a map change.
  • SaveService copies the component into the row with the other fields. On a base map it first moves the return point to the current position, as before.

No behaviour change is intended.

Verification

  • dotnet test NosCore.sln: all green except NosCore.Parser.Tests EveryDeclaredEffectIsNamed, which fails the same way on master locally. The existing SavingOnBaseMapPersistsPositionAsMapXY, SavingInsideMinilandKeepsPreviousMapXYValue, map change and movement exit tests cover the moved state.
  • Client, master and branch: Tester stands on Chicken Farm Path at (24,30), rings the Bell of Sweet Home into the miniland, quits there and logs back in. The saved row reads map 2550 at (24,30) on both, and the relog lands back on Chicken Farm Path at the same spot.

Screenshots

Each image, left to right: Tester on Chicken Farm Path, in the miniland after the bell, and back on Chicken Farm Path at the same spot after quitting inside the miniland and logging in again.

Master:

master miniland relog

Branch:

branch miniland relog

Manual test plan checks still worth a human pass

From documentation/manual-test-plan.md: leave a miniland through its exit and land where you entered; leave a time-space or arena and return to the base map; relog inside an instance.


Generated by Claude Code

The last base-map position a character returns to after an instance or a
miniland was read and written straight through CharacterDto. It now lives
in a BaseMapPositionComponent like the rest of the character's state, and
the save copies it into the row with the other fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkTzR51DzhJwrXVqDmS
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5a06ad2 and 70992f6.

Files selected for processing: 7

  • src/NosCore.GameObject/Ecs/Components/BaseMapPositionComponent.cs
  • src/NosCore.GameObject/Ecs/MapWorld.cs
  • src/NosCore.GameObject/Ecs/PlayerComponentBundle.cs
  • src/NosCore.GameObject/Services/MapChangeService/MapChangeService.cs
  • src/NosCore.GameObject/Services/SaveService/SaveService.cs
  • src/NosCore.PacketHandlers/CharacterScreen/SelectPacketHandler.cs
  • test/NosCore.Tests.Shared/TestWorld.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@erwan-joly erwan-joly self-assigned this Nov 13, 2026
@erwan-joly

Copy link
Copy Markdown
Collaborator Author

Client screenshots: on Chicken Farm Path, in the miniland after the bell, and after relogging from the miniland; first image master, second branch.

8-master-miniland-relog

9-branch-miniland-relog

@erwan-joly
erwan-joly merged commit 42eed47 into master Nov 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants