Skip to content

fix: make floor json round trip lossless - #123

Merged
Joltras merged 4 commits into
devfrom
fix/json-roundtrip
Nov 2, 2026
Merged

Joltras merged 4 commits into
devfrom
fix/json-roundtrip

Conversation

@Joltras

@Joltras Joltras commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Proposed changes

The floor JSON was built by concatenating strings, so seeds containing quotes produced invalid JSON, and it is now generated with json.dumps while keeping the same keys and structure. Loading a floor did not restore the floor grid or the room id counter, which broke neighbour checks and caused duplicate ids for new rooms, and both are now rebuilt from the loaded rooms. Teleport rooms now store their connected room id and are restored as teleport rooms, while older files without that field still load as before. Opening a floor in the UI also dropped all doors and teleport connections, which are now kept as well.

Types of changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

@Joltras
Joltras merged commit 32e920d into dev Nov 2, 2026
4 checks passed
@theEvilReaper
theEvilReaper deleted the fix/json-roundtrip branch November 3, 2026 11:09
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.

1 participant