Skip to content

Exterior turf and shuttle fixes#3563

Merged
comma merged 5 commits into
NebulaSS13:stagingfrom
NataKilar:exterior-turf-shuttle-fixes
Jan 9, 2024
Merged

Exterior turf and shuttle fixes#3563
comma merged 5 commits into
NebulaSS13:stagingfrom
NataKilar:exterior-turf-shuttle-fixes

Conversation

@NataKilar
Copy link
Copy Markdown
Contributor

Description of changes

Adjustments and fixes to ZAS and exterior/open turf logic. Also fixes some issues with shuttles while I'm in the area.

ZAS

  • Unsimulated connection edges now keep track of the connecting turfs in the simulated zone in their inner_turfs list
  • inner_turfs are now marked for update on zone merges. This fixes an issue where unsimulated connection edges were not retained post zone merge

Exterior turf logic

  • update_external_atmos_participation should now be called whenever the external status of a turf may change. Currently, this is when set_outside is called directly, when the area of the turf changes, or if a turf above changes
  • In most situations, turfs' air variable will be updated with the exterior mix when changing from exterior to ZAS participating
  • Fixes issue where turfs on planets were automatically becoming pressurized when a non-external area was set

Open turf logic

  • The open_turf_type variable on the bottom most turf in a Z-stack will now determine the type of open turf created when a turf above it is destroyed in most situations. The open_turf variable on the area will still take precedence if present.
  • When the turf at the bottom of a Z-stack is changed, it will attempt to update all open turfs of its previous open_turf_type to its new open_turf_type

Shuttle fixes

  • Shuttles now have a force_ceiling_on_init variable which will overwrite any ceiling directly above it on Initialization. This is necessary because space turfs automatically create plating above the shuttle when they see non-dense spaces below them in LateInitialize, which then must be overwritten
  • Shuttles no longer create ceilings over background turfs (e.g. the catwalk tiles on the Bee)
  • Fixes shuttle walls magically becoming reinforced when moving

Why and what will this PR improve

Makes exterior and ZAS-participating turfs behave as expected. Holes in ceilings into space now act properly, and buildings on planets should not become magically pressurized.

The shuttle ceiling issue is mostly a pet peeve, since currently the Bee leaves behind an ugly plating outline above it when it takes off. I set force_ceiling_on_init to be TRUE by default, so any shuttles which are mapped to have ceilings immediately above them need to be adjusted. This isn't a perfect solution. Ideally I would simply have space turfs not turn into plating if they are above a shuttle, but I can't think of a clean way to do this currently due to init order

The open turf changes are mostly to make creation and removal of space turfs more consistent. Space turfs are set to have themselves as their open_turf_type, so as long as there is space at the bottom, there will be space through the entire Z-stack. On the other hand, plating will always have /turf/simulated/open above it, rather than space, unless it has been mapped otherwise. In the short future, we should be able to unify /turf/exterior/open and /turf/simulated/open, so this change shouldn't have much of an effect on multi-Z planets. In the event that a turf cannot find an open turf type from the bottom of its Z-stack or its area, it will still fall back on its own open_turf_type. Overall, I believe this is a better solution than having every turf deciding its own open turf type, as this can lead to inconsistencies in the Z-stack. Happy to discuss this change further though if more flexibility is needed or I'm missing an edge case.

Targeting staging for this, since these are mostly fixes

Authorship

Myself. Thanks to Loaf for helpful discussions

/turf/space/ChangeTurf(var/turf/N, var/tell_universe = TRUE, var/force_lighting_update = FALSE, var/keep_air = FALSE)
return ..(N, tell_universe, TRUE, keep_air)
/turf/space/ChangeTurf(var/turf/N, var/tell_universe = TRUE, var/force_lighting_update = FALSE, var/keep_air = FALSE, var/keep_air_below = FALSE, var/update_open_turfs_above = TRUE)
return ..(N, tell_universe, TRUE, keep_air, keep_air_below, update_open_turfs_above)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could just be return ..(force_lighting_update = FALSE) if I'm reading correctly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

force_lighting_update = TRUE I think, but sounds good

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this seemed to not pass the arguments up correctly when I tried it.

Copy link
Copy Markdown
Contributor

@MistakeNot4892 MistakeNot4892 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per Discord, it seems to work fine in Wrench, so unsure.
EDIT: turns out it drops all other arguments, rip.

Comment thread code/game/base_turf.dm Outdated
Comment thread code/game/turfs/turf.dm
@MistakeNot4892 MistakeNot4892 added the awaiting author This PR is awaiting action from the author before it can be merged. label Jan 7, 2024
@MistakeNot4892 MistakeNot4892 added ready for review This PR is ready for review and merge. and removed awaiting author This PR is awaiting action from the author before it can be merged. labels Jan 9, 2024
@comma comma merged commit ea34880 into NebulaSS13:staging Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review This PR is ready for review and merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants