Skip to content

Commit

Permalink
Fix lesser banishment (#8172)
Browse files Browse the repository at this point in the history
# About the pull request

This PR ensures all usages of joining as a lesser drone properly does
banishment check. `can_spawn_as_hugger` already does this, but for
whatever reason `can_spawn_as_lesser_drone` did not and instead was only
checked in the verb. I also fixed the incorrect cooldown message since
the cooldown was changed at some point but messages not updated to
reflect the change.

# Explain why it's good for the game

Fixes #8159 

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


https://github.com/user-attachments/assets/e67b53ab-10cf-49f2-a316-238ddb904dc1

</details>


# Changelog
:cl: Drathek
fix: Fixed joining as lesser drone not always performing banishment
check
spellcheck: Fixed cooldown message for lesser drone having the wrong
duration
/:cl:
Drulikar authored Jan 21, 2025
1 parent a964859 commit de01d4e
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 1 addition & 6 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
@@ -748,11 +748,6 @@ Additional game mode variables.
else
hive = GLOB.hive_datum[last_active_hive]

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 FALSE

var/list/selection_list = list()
var/list/selection_list_structure = list()

@@ -768,7 +763,7 @@ Additional game mode variables.
var/pylon_selection_name = pylon_name
while(pylon_selection_name in selection_list)
pylon_selection_name = "[pylon_name] ([pylon_number])"
pylon_number ++
pylon_number++
selection_list += pylon_selection_name
selection_list_structure += cycled_pylon

7 changes: 6 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/hive_status.dm
Original file line number Diff line number Diff line change
@@ -931,9 +931,14 @@
to_chat(user, SPAN_WARNING("You are banned from playing aliens and cannot spawn as a xenomorph."))
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 [src], you may not rejoin unless the Queen re-admits you or dies."))
return FALSE

if(world.time - user.timeofdeath < JOIN_AS_LESSER_DRONE_DELAY)
var/time_left = floor((user.timeofdeath + JOIN_AS_LESSER_DRONE_DELAY - world.time) / 10)
to_chat(user, SPAN_WARNING("You ghosted too recently. You cannot become a lesser drone until 30 seconds have passed ([time_left] seconds remaining)."))
to_chat(user, SPAN_WARNING("You ghosted too recently. You cannot become a lesser drone until [JOIN_AS_LESSER_DRONE_DELAY / 10] seconds have passed ([time_left] seconds remaining)."))
return FALSE

if(length(totalXenos) <= 0)

0 comments on commit de01d4e

Please sign in to comment.