Skip to content

Commit

Permalink
and a big yikes
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Aug 29, 2023
1 parent adb6e78 commit d976152
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/modules/cm_aliens/structures/special/pylon_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@
return pylon_node

/obj/effect/alien/resin/special/pylon/proc/spawn_lesser_drone(mob/xeno_candidate)
if(!linked_hive.can_spawn_as_lesser_drone(xeno_candidate))
if(!linked_hive.can_spawn_as_lesser_drone(xeno_candidate, src))
return FALSE

if(tgui_alert(xeno_candidate, "Are you sure you want to become a lesser drone?", "Confirmation", list("Yes", "No")) != "Yes")
return FALSE

if(!linked_hive.can_spawn_as_lesser_drone(xeno_candidate))
if(!linked_hive.can_spawn_as_lesser_drone(xeno_candidate, src))
return FALSE

var/mob/living/carbon/xenomorph/lesser_drone/new_drone = new(loc, null, linked_hive.hivenumber)
Expand Down
6 changes: 5 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@

lesser_drone_limit = max(lesser_drone_limit, lesser_drone_minimum)

/datum/hive_status/proc/can_spawn_as_lesser_drone(mob/dead/observer/user)
/datum/hive_status/proc/can_spawn_as_lesser_drone(mob/dead/observer/user, /obj/effect/alien/resin/special/pylon/spawning_pylon)
if(!GLOB.hive_datum || ! GLOB.hive_datum[hivenumber])
return FALSE

Expand All @@ -1127,6 +1127,10 @@
to_chat(user, SPAN_WARNING("The selected hive does not have a Queen!"))
return FALSE

if(spawning_pylon.lesser_drone_spawns < 1)
to_chat(xeno_candidate, SPAN_WARNING("The selected core or pylon does not have enough power for a lesser drone!"))
return FALSE

update_lesser_drone_limit()

var/current_lesser_drone_count = 0
Expand Down

0 comments on commit d976152

Please sign in to comment.