Files
Bubberstation/code/game/objects
Sealed101 069962faf4 Fixes qdeleted hand tele portals hogging space in hand tele's active_portal_pairs, preventing use (#87040)
## About The Pull Request

969d7ba1cd/code/game/objects/items/teleportation.dm (L254-L265)

Creating a portal on an active teleporter hub would try to teleport the
portal to the hub's target, but since `do_teleport()` deletes
`/obj/effect`, i.e. portals, the portal pair immediately gets qdel'd.
This happens in the `try_move_adjacent()` in the above code snippet when
the user-side portal is made and is moved in front of the user. They
properly remove themselves from the hand tele's
`active_portal_pairs`(well, they try to, but since they aren't yet added
in that list, they don't get removed), global portal list and whatever
else. However, the next line then adds the new portal pair to the hand
tele's `active_portal_pairs` again, but since we don't actually have
those anymore, they will never get deleted. Not cool.
So this PR ensures that the portals are not qdel'd before assigning them
to the list. If it fails to do so, the hand tele will produce a relevant
message, so hopefully the user won't try to bash their head against the
teleporter hub or similar again.
Also dmdocs some procs/vars with varying degree of helpfulness.

## Why It's Good For The Game

Fixes #67251

## Changelog

🆑
fix: fixed hand tele portals that have been deleted in the process of
opening a new portal pair clogging up hand tele's portal pair list. If
you try to create portals that would end up like this (i.e. on an active
teleporter hub), the hand tele will indicate that.
/🆑
2024-10-06 06:42:55 +02:00
..