Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Jul 19, 2023
1 parent a9ff811 commit 8f124ec
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
8 changes: 0 additions & 8 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -576,14 +576,6 @@ Additional game mode variables.
to_chat(xeno_candidate, SPAN_WARNING("The selected hive does not have a hive core to spawn from!"))
return

if(!hive.living_xeno_queen)
to_chat(xeno_candidate, SPAN_WARNING("The selected hive does not have a Queen!"))
return

if(!hive.living_xeno_queen.ovipositor)
to_chat(xeno_candidate, SPAN_WARNING("The selected hive does not have a Queen on Ovipositor!"))
return

hive.hive_location.spawn_lesser_drone(xeno_candidate)

return TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ Works together with spawning an observer, noted above.

// Larva queue: We use the larger of their existing queue time or the new timeofdeath except for facehuggers
// We don't change facehugger timeofdeath because they are still on cooldown if they died as a hugger
var/new_tod = isfacehugger(src) ? 1 : ghost.timeofdeath
var/new_tod = (isfacehugger(src) || islesserdrone(src)) ? 1 : ghost.timeofdeath
ghost.client.player_details.larva_queue_time = max(ghost.client.player_details.larva_queue_time, new_tod)

ghost.set_huds_from_prefs()
Expand Down
12 changes: 12 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,23 +1057,35 @@
/datum/hive_status/proc/can_spawn_as_lesser_drone(mob/dead/observer/user)
if(!GLOB.hive_datum || ! GLOB.hive_datum[hivenumber])
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 - user.timeofdeath < JOIN_AS_LESSER_DRONE_DELAY)
var/time_left = round((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 3 minutes have passed ([time_left] seconds remaining)."))
return FALSE

if(totalXenos.len <= 0)
to_chat(user, SPAN_WARNING("The hive has fallen, you can't join it!"))
return FALSE

if(!living_xeno_queen)
to_chat(user, SPAN_WARNING("The selected hive does not have a Queen!"))
return FALSE

if(!living_xeno_queen.ovipositor)
to_chat(user, SPAN_WARNING("The selected hive does not have a Queen on Ovipositor!"))
return FALSE

update_lesser_drone_limit()

var/current_lesser_drone_count = 0
for(var/mob/mob as anything in totalXenos)
if(islesserdrone(mob))
current_lesser_drone_count++

if(lesser_drone_limit <= current_lesser_drone_count)
to_chat(user, SPAN_WARNING("\The [GLOB.hive_datum[hivenumber]] cannot support more lesser drones! Limit: <b>[current_lesser_drone_count]/[lesser_drone_limit]</b>"))
return FALSE
Expand Down

0 comments on commit 8f124ec

Please sign in to comment.