Skip to content

Commit

Permalink
Fix banishing huggers and lesser drones (#4031)
Browse files Browse the repository at this point in the history
# 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
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/c207f552-a8ba-4607-8ca3-173583bb2c69)

</details>


# Changelog
:cl: Drathek
fix: Fix joining as facehugger or lesser drone not checking banishment.
/:cl:
  • Loading branch information
Drulikar committed Jul 29, 2023
1 parent f560472 commit 5ee56c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 5ee56c3

Please sign in to comment.