Add Multi-Z handling to get_line - #13027
Conversation
Test merge deployment history:Test Merge Deployed @ 08/25/2026 22:53:59 +00:00:Server InstanceRevisionTest Merge Updated @ 08/26/2026 01:55:37 +00:00:Server InstanceCM13 Live RevisionOrigin: 517b3b1 Test Merge Updated @ 08/26/2026 04:42:46 +00:00:Server InstanceRevisionTest Merge Updated @ 08/26/2026 07:57:58 +00:00:Server InstanceRevisionTest Merge Updated @ 08/26/2026 18:34:17 +00:00:Server InstanceRevisionTest Merge Updated @ 08/27/2026 01:03:51 +00:00:Server InstanceCM13 Live RevisionOrigin: c3894cb Test Merge Updated @ 08/27/2026 08:36:56 +00:00:Server InstanceCM13 Live RevisionOrigin: d55f214 Test Merge Updated @ 08/27/2026 20:11:02 +00:00:Server InstanceCM13 Live RevisionOrigin: acefcda Test Merge Updated @ 08/28/2026 02:43:33 +00:00:Server InstanceCM13 Live RevisionOrigin: d87b77d Test Merge Updated @ 08/28/2026 07:15:32 +00:00:Server InstanceCM13 Live RevisionOrigin: bf948a9 Test Merge Updated @ 08/28/2026 07:46:23 +00:00:Server InstanceCM13 Live RevisionOrigin: 560667c Test Merge Updated @ 08/28/2026 08:47:21 +00:00:Server InstanceRevisionTest Merge Updated @ 08/28/2026 09:18:11 +00:00:Server InstanceRevisionTest Merge Updated @ 08/28/2026 10:49:19 +00:00:Server InstanceCM13 Live RevisionOrigin: 426f900 Test Merge Updated @ 08/28/2026 13:50:54 +00:00:Server InstanceRevisionTest Merge Updated @ 08/28/2026 17:20:20 +00:00:Server InstanceRevisionTest Merge Updated @ 08/29/2026 03:25:11 +00:00:Server InstanceRevisionTest Merge Updated @ 08/29/2026 03:35:57 +00:00:Server InstanceRevisionTest Merge Updated @ 08/29/2026 03:56:04 +00:00:Server InstanceCM13 Live RevisionOrigin: af5b429 Test Merge Updated @ 08/29/2026 05:57:17 +00:00:Server InstanceRevisionTest Merge Updated @ 08/29/2026 06:28:08 +00:00:Server InstanceCM13 Live RevisionOrigin: 0e026b2 Test Merge Updated @ 08/29/2026 06:58:59 +00:00:Server InstanceCM13 Live RevisionOrigin: 309b015 Test Merge Updated @ 08/29/2026 07:35:09 +00:00:Server InstanceRevisionTest Merge Updated @ 08/29/2026 12:02:42 +00:00:Server InstanceRevisionTest Merge Updated @ 08/29/2026 15:14:44 +00:00:Server InstanceRevisionTest Merge Updated @ 08/29/2026 16:01:51 +00:00:Server InstanceCM13 Live RevisionOrigin: 407574d Test Merge Updated @ 08/29/2026 19:02:09 +00:00:Server InstanceRevisionTest Merge Updated @ 08/29/2026 22:34:01 +00:00:Server InstanceRevisionTest Merge Updated @ 08/30/2026 04:36:09 +00:00:Server InstanceCM13 Live RevisionOrigin: aadc18b Test Merge Updated @ 08/30/2026 08:07:48 +00:00:Server InstanceRevisionTest Merge Updated @ 08/30/2026 08:38:40 +00:00:Server InstanceCM13 Live RevisionOrigin: e38bed0 Test Merge Updated @ 08/30/2026 10:39:52 +00:00:Server InstanceRevisionTest Merge Updated @ 08/30/2026 11:54:14 +00:00:Server InstanceRevisionTest Merge Updated @ 08/30/2026 16:22:23 +00:00:Server InstanceRevisionTest Merge Updated @ 08/31/2026 02:14:25 +00:00:Server InstanceCM13 Live RevisionOrigin: 6bc71d6 Test Merge Updated @ 08/31/2026 04:15:42 +00:00:Server InstanceCM13 Live RevisionOrigin: 2ecc25f Test Merge Updated @ 08/31/2026 04:25:38 +00:00:Server InstanceRevisionTest Merge Updated @ 08/31/2026 04:46:33 +00:00:Server InstanceCM13 Live RevisionOrigin: b004c65 Test Merge Updated @ 08/31/2026 05:54:24 +00:00:Server InstanceRevisionTest Merge Updated @ 09/01/2026 22:01:17 +00:00:Server InstanceRevisionTest Merge Updated @ 09/02/2026 02:33:09 +00:00:Server InstanceCM13 Live RevisionOrigin: 47354be Test Merge Updated @ 09/02/2026 04:04:18 +00:00:Server InstanceCM13 Live RevisionOrigin: c12d521 Test Merge Updated @ 09/02/2026 07:05:37 +00:00:Server InstanceCM13 Live RevisionOrigin: f74475d Test Merge Updated @ 09/02/2026 08:06:33 +00:00:Server InstanceCM13 Live RevisionOrigin: 9d0564e Test Merge Updated @ 09/02/2026 20:40:02 +00:00:Server InstanceRevision |
| if(!istype(switching_cross_point, /turf/open_space)) | ||
| line.Cut(max(1, mutli_z_cross_points[crossing_point] + 1), length(line) + 1) //Hit a non open_space turf. Shouldn't go through anything else. Stop here. |
There was a problem hiding this comment.
Kinda the whole point. We shorten the line to the actual traversable tiles. We can't go any further because there is not an open_space that lets us do so.
So this stops get_line traversing Zs where it shouldn't be doing it. Because there's a tile to block it.
About the pull request
Both launch_atom and fire_at use get_line to pass up and down z levels.
This doesn't consider if something is in the way, or if the z levels are connected.
So add that to get_line, lord knows how anything else will react to that, so just limit it to the two cases above for now via an optional argument.
Basically what this does is find the cross over points where the atom is transitioning to the next z level. And make sure that we add the extra tile into consideration, and making sure it's an open_space rather than phasing through diagonally.
Resolves: #11904, Resolves: #13023
Explain why it's good for the game
Bugs bad. Phasing through stuff bad. Shooting xenos on the ground from the comfort of your CIC chair also bad.
Testing Photographs and Procedure
Screenshots & Videos
Put screenshots and videos here with an empty line between the screenshots and the
<details>tags.Changelog
🆑
code: Add an arugment to get_line to account for objects transitioning z levels. Currently used for throwing and shooting.
fix: Being able to throw people off the map on WARF. Being able to shoot xenos on the ground from CIC.
/:cl: