From bb2d28fe987a2923135164694dad9a6f51752093 Mon Sep 17 00:00:00 2001 From: Morrow Date: Thu, 20 Jul 2023 04:33:29 -0400 Subject: [PATCH 1/2] Initial --- code/modules/mob/living/carbon/xenomorph/xeno_defines.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 8b25cf07d14b..841e5f1dd5cf 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -1036,8 +1036,17 @@ to_chat(user, SPAN_WARNING("\The [GLOB.hive_datum[hivenumber]] cannot support more facehuggers! Limit: [current_hugger_count]/[playable_hugger_limit]")) return FALSE + if(user.action_busy) + to_chat(user, SPAN_WARNING("You are already attempting to join the game!")) + return + + user.action_busy = TRUE + if(alert(user, "Are you sure you want to become a facehugger?", "Confirmation", "Yes", "No") != "Yes") + user.action_busy = FALSE return FALSE + + user.action_busy = FALSE return TRUE /datum/hive_status/proc/spawn_as_hugger(mob/dead/observer/user, atom/A) From 4485cf3e6032e20cc5089206cb4f517d75b3d287 Mon Sep 17 00:00:00 2001 From: Morrow Date: Sun, 23 Jul 2023 02:08:04 -0400 Subject: [PATCH 2/2] review --- .../mob/living/carbon/xenomorph/xeno_defines.dm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 841e5f1dd5cf..0689169b0caa 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -1036,17 +1036,12 @@ to_chat(user, SPAN_WARNING("\The [GLOB.hive_datum[hivenumber]] cannot support more facehuggers! Limit: [current_hugger_count]/[playable_hugger_limit]")) return FALSE - if(user.action_busy) - to_chat(user, SPAN_WARNING("You are already attempting to join the game!")) - return - - user.action_busy = TRUE + if(tgui_alert(user, "Are you sure you want to become a facehugger?", "Confirmation", list("Yes", "No")) != "Yes") + return FALSE - if(alert(user, "Are you sure you want to become a facehugger?", "Confirmation", "Yes", "No") != "Yes") - user.action_busy = FALSE + if(!user.client) return FALSE - user.action_busy = FALSE return TRUE /datum/hive_status/proc/spawn_as_hugger(mob/dead/observer/user, atom/A)