Skip to content

Commit

Permalink
stops huggers/lesser drones
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Nov 17, 2023
1 parent c7a52db commit 5ad6fd8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1057,20 +1057,29 @@
/datum/hive_status/proc/can_spawn_as_hugger(mob/dead/observer/user)
if(!GLOB.hive_datum || ! GLOB.hive_datum[hivenumber])
return FALSE

if(MODE_HAS_TOGGLEABLE_FLAG(MODE_NO_JOIN_AS_XENO))
to_chat(user, SPAN_WARNING("Joining as xenos is currently disabled in this mode."))
return FALSE

if(jobban_isbanned(user, JOB_XENOMORPH)) // User is jobbanned
to_chat(user, SPAN_WARNING("You are banned from playing aliens and cannot spawn as a xenomorph."))
return FALSE

if(world.time < hugger_timelock)
to_chat(user, SPAN_WARNING("The hive cannot support facehuggers yet..."))
return FALSE

if(world.time - user.timeofdeath < JOIN_AS_FACEHUGGER_DELAY)
var/time_left = round((user.timeofdeath + JOIN_AS_FACEHUGGER_DELAY - world.time) / 10)
to_chat(user, SPAN_WARNING("You ghosted too recently. You cannot become a facehugger until 3 minutes have passed ([time_left] seconds remaining)."))
return FALSE

if(totalXenos.len <= 0)
//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."))
Expand All @@ -1082,6 +1091,7 @@
for(var/mob/mob as anything in totalXenos)
if(isfacehugger(mob))
current_hugger_count++

if(playable_hugger_limit <= current_hugger_count)
to_chat(user, SPAN_WARNING("\The [GLOB.hive_datum[hivenumber]] cannot support more facehuggers! Limit: <b>[current_hugger_count]/[playable_hugger_limit]</b>"))
return FALSE
Expand Down Expand Up @@ -1114,6 +1124,10 @@
if(!GLOB.hive_datum || ! GLOB.hive_datum[hivenumber])
return FALSE

if(MODE_HAS_TOGGLEABLE_FLAG(MODE_NO_JOIN_AS_XENO))
to_chat(user, SPAN_WARNING("Joining as xenos is currently disabled in this mode."))
return FALSE

if(jobban_isbanned(user, JOB_XENOMORPH)) // User is jobbanned
to_chat(user, SPAN_WARNING("You are banned from playing aliens and cannot spawn as a xenomorph."))
return FALSE
Expand Down

0 comments on commit 5ad6fd8

Please sign in to comment.