From d976152653ee4e602d6cfd981c71c11d841738db Mon Sep 17 00:00:00 2001 From: Morrow Date: Tue, 29 Aug 2023 09:12:39 -0400 Subject: [PATCH] and a big yikes --- code/modules/cm_aliens/structures/special/pylon_core.dm | 4 ++-- code/modules/mob/living/carbon/xenomorph/xeno_defines.dm | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/modules/cm_aliens/structures/special/pylon_core.dm b/code/modules/cm_aliens/structures/special/pylon_core.dm index fd12080cbf5f..adf42cdaa3b1 100644 --- a/code/modules/cm_aliens/structures/special/pylon_core.dm +++ b/code/modules/cm_aliens/structures/special/pylon_core.dm @@ -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) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index b8e23e9a0938..e9f30fbffc3e 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -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 @@ -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