Skip to content

Fixes level order#466

Merged
PsyCommando merged 1 commit intoPersistentSS13:devfrom
NataKilar:level-ordering-fix
Sep 19, 2023
Merged

Fixes level order#466
PsyCommando merged 1 commit intoPersistentSS13:devfrom
NataKilar:level-ordering-fix

Conversation

@NataKilar
Copy link
Collaborator

Description of changes

Adjusts the level ordering code so that mapped levels are offset in case that world.maxz is greater than the minimum mapped z-index in the database. This solves an issue that was occurring with templates that are spawned pre-load (like the supply shuttle) getting overridden. Also makes it so that levels are always spawned with the correct level data, since the game doesn't like having duplicates of the Kleibkhar level datas, since they have a static ID.

@PsyCommando
Copy link
Collaborator

I guess this will do for now. But assigning z-levels will have to be revisited at one point. It's not reliable across saves to refer directly to z-indices instead of zlevel ids. Especially if anything z-level ordering related changes.
We'll need a way to store z-stacks and z-ids in the db. I've been investigating a few ways, but I might need to introduce the concept of z-stacks and like a "world_location" encompassing horizontally and vertically linked z-levels upstream.

@PsyCommando PsyCommando added 🪲 bug Something isn't working 💾 serialization A bug or feature linked to serialization/deserialization 🌌 Map/Map Gen Things related to maps, map generation, layouts, etc.. labels Sep 19, 2023
@PsyCommando PsyCommando added this to the Outreach Map Pre-Release milestone Sep 19, 2023
@PsyCommando PsyCommando merged commit e990be4 into PersistentSS13:dev Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪲 bug Something isn't working 💾 serialization A bug or feature linked to serialization/deserialization 🌌 Map/Map Gen Things related to maps, map generation, layouts, etc..

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants