From 5ee56c3e3efb40b0967cf7825e908bcb4934e697 Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Fri, 28 Jul 2023 21:59:44 -0700 Subject: [PATCH] Fix banishing huggers and lesser drones (#4031) # About the pull request This PR makes it so huggers and lesser drones cannot join a hive they are currently banished from. # Explain why it's good for the game Rejoining as a different mob should not circumvent banishment. # Testing Photographs and Procedure
Screenshots & Videos ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/c207f552-a8ba-4607-8ca3-173583bb2c69)
# Changelog :cl: Drathek fix: Fix joining as facehugger or lesser drone not checking banishment. /:cl: --- code/game/gamemodes/cm_initialize.dm | 5 +++++ code/modules/mob/living/carbon/xenomorph/xeno_defines.dm | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/code/game/gamemodes/cm_initialize.dm b/code/game/gamemodes/cm_initialize.dm index a7e8ab612bb4..efb92dd1678e 100644 --- a/code/game/gamemodes/cm_initialize.dm +++ b/code/game/gamemodes/cm_initialize.dm @@ -576,6 +576,11 @@ Additional game mode variables. to_chat(xeno_candidate, SPAN_WARNING("The selected hive does not have a hive core to spawn from!")) return + for(var/mob_name in hive.banished_ckeys) + if(hive.banished_ckeys[mob_name] == xeno_candidate.ckey) + to_chat(xeno_candidate, SPAN_WARNING("You are banished from the [hive], you may not rejoin unless the Queen re-admits you or dies.")) + return + hive.hive_location.spawn_lesser_drone(xeno_candidate) return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index bb58d2cf2a03..894dd757cb51 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -1020,6 +1020,10 @@ //This is to prevent people from joining as Forsaken Huggers on the pred ship to_chat(user, SPAN_WARNING("The hive has fallen, you can't join it!")) return FALSE + for(var/mob_name in banished_ckeys) + if(banished_ckeys[mob_name] == user.ckey) + to_chat(user, SPAN_WARNING("You are banished from the [name], you may not rejoin unless the Queen re-admits you or dies.")) + return FALSE update_hugger_limit()