Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactors transit tubes #22452

Merged
merged 8 commits into from
Oct 17, 2023
Merged

Refactors transit tubes #22452

merged 8 commits into from
Oct 17, 2023

Conversation

lewcc
Copy link
Contributor

@lewcc lewcc commented Sep 17, 2023

What Does This PR Do

Refactors transit tubes to a pretty significant degree. Player-wise, they may be a tad slower, but they're gonna hopefully be a lot easier to work with map-wise and hopefully code-wise.

On the mapping side, mapping in transit tubes becomes significantly easier. I don't even want to think about how much fun it would have been in the past to map a new set of transit tubes, since you had to do all kinds of weird icon state stuff. Every directional icon was baked into an icon file, and you even had to add corners yourselves on diagonals.
Now, you just set the right dir for tubes, of which there are now plenty of helper subtypes for curves, diagonals, reversed pipes, etc. Code will automatically add the junction bits/decorations for corners and joints on init, even though they may not be immediately visible in a map editor.

On the coding side, transit tubes now no longer use sleeps or timers during their main movement loop, and instead use a small subsystem that fires once per tick. I've tried to be clever with usage so things are only added to the processing queue if they're actively moving, which should save a fair amount of processing time since tubes spend a lot of their time at stations.

A significant amount of the heavy structural improvements to icons and code came from /tg/'s implementation.

Why It's Good For The Game

Transit tube code is pretty crusty and old (most of it hasn't been touched for the past 9 years or so). This should hopefully bring it up to slightly more modern standards, and hopefully make things more performant going forward.

This should also hopefully make transit tubes easier to interact with on the mapping side, and possibly make them justifiable for use on the coding side (such as possibly adding them to the RPD or something).

Images of changes

DvhyJHyX.mp4

Testing

Loaded in all maps, and verified that the transit tubes (as configured) worked from roundstart. Also built a few transit mechanisms from scratch and verified they worked as intended.

Changelog

🆑
tweak: Transit tubes are now slightly slower
tweak: You can now empty out a transit pod with a crowbar
/:cl:

@ParadiseSS13-Bot ParadiseSS13-Bot added DeltaStation This PR will edit the map DeltaStation (Kerberos) MetaStation This PR will edit the map MetaStation (Cerebron) BoxStation This PR will edit the map BoxStation (Cyberiad) -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally Map Edit This PR will modify a map Sprites This PR modifies the game sprites labels Sep 18, 2023
@hal9000PR hal9000PR added the Refactor This PR will clean up the code but have the same ingame outcome label Sep 19, 2023
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting review This PR is awaiting review from the review team and removed -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally labels Sep 19, 2023
@github-actions github-actions bot added the Merge Conflict This PR is merge conflicted label Oct 5, 2023
@lewcc lewcc force-pushed the better-transit-tubes branch 2 times, most recently from a810eac to b531b1a Compare October 17, 2023 00:38
@github-actions github-actions bot removed the Merge Conflict This PR is merge conflicted label Oct 17, 2023
@S34NW S34NW merged commit 744b6e3 into ParadiseSS13:master Oct 17, 2023
15 checks passed
BR54FF pushed a commit to BR54FF/Paradise-SS220 that referenced this pull request Oct 23, 2023
* Rework transit tube pods to not use timers

* please work

* yes

* henri review

* Fix mapping mishaps

* fix icon mishaps

* re-adds missing intercomm
Oyu07 pushed a commit to Oyu07/Paradise that referenced this pull request Jan 2, 2024
* Rework transit tube pods to not use timers

* please work

* yes

* henri review

* Fix mapping mishaps

* fix icon mishaps

* re-adds missing intercomm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting review This PR is awaiting review from the review team BoxStation This PR will edit the map BoxStation (Cyberiad) DeltaStation This PR will edit the map DeltaStation (Kerberos) Map Edit This PR will modify a map MetaStation This PR will edit the map MetaStation (Cerebron) Refactor This PR will clean up the code but have the same ingame outcome Sprites This PR modifies the game sprites
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants