Skip to content

Commit

Permalink
Tunnels are converted to forsaken on evac (#5394)
Browse files Browse the repository at this point in the history
# About the pull request
the other half of #5340, fixes #4376 
Tunnels are now forsaken!
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game

Forsaken xenos should be able to use tunnels

# Testing Photographs and Procedure
<details>
<summary>Open me for testing</summary>


https://github.com/cmss13-devs/cmss13/assets/54422837/25f7ce72-0773-4bce-896a-800054d6b232



https://github.com/cmss13-devs/cmss13/assets/54422837/e4954940-f39e-4bda-9756-5f8da3dcc6a0



</details>


# Changelog
:cl:
fix: Tunnels are now converted to forsaken on evac.
/:cl:
  • Loading branch information
private-tristan authored Jan 8, 2024
1 parent 2d26ea2 commit 5525c2b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/modules/cm_aliens/structures/tunnel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@
if(resin_trap)
qdel(resin_trap)

if(hivenumber == XENO_HIVE_NORMAL)
RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling))

/obj/structure/tunnel/proc/forsaken_handling()
SIGNAL_HANDLER
if(is_ground_level(z))
hive.tunnels -= src
hivenumber = XENO_HIVE_FORSAKEN
set_hive_data(src, XENO_HIVE_FORSAKEN)
hive = GLOB.hive_datum[XENO_HIVE_FORSAKEN]
hive.tunnels += src

UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING)

SSminimaps.add_marker(src, z, get_minimap_flag_for_faction(hivenumber), "xenotunnel")

/obj/structure/tunnel/Destroy()
Expand Down

0 comments on commit 5525c2b

Please sign in to comment.