From a8a369411410612ddfd529186efdb39974da0b51 Mon Sep 17 00:00:00 2001 From: FloFluoro <3611705+FloFluoro@users.noreply.github.com> Date: Fri, 21 Oct 2022 14:40:10 -0400 Subject: [PATCH] Sentience Potions now violently explode if overused (#19356) * Sentience Potions now violently explode if overused * Early returns * Removed redundant return, split cooldown behavior into two procs * Removed redundant proc --- .../research/xenobiology/xenobiology.dm | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 2ca3dffe6de..72e63a19808 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -188,6 +188,21 @@ origin_tech = "biotech=6" var/list/not_interested = list() var/sentience_type = SENTIENCE_ORGANIC + var/heat_stage = 0 //When used at stage 2 or above, the Sentience Potion explodes. Stop bugging ghosts + +/obj/item/slimepotion/sentience/examine(mob/user) + . = ..() + if(!user.Adjacent(src)) + return + + switch(heat_stage) + if(1) + . += "The vial is hot to the touch." + if(2) + . += "The vial is scalding hot! Is it really a good idea to use this..?" + +/obj/item/slimepotion/sentience/attack() + return /obj/item/slimepotion/sentience/afterattack(mob/living/M, mob/user, proximity_flag) if(!proximity_flag) @@ -205,6 +220,14 @@ to_chat(user, "The potion won't work on [SM].") return ..() + if(heat_stage >= 2) + to_chat(user, "[src] violently explodes!") + var/turf/T = get_turf(loc) + if(T) + T.hotspot_expose(700, 125) + explosion(T, -1, -1, 2, 3) + qdel(src) + return to_chat(user, "You offer [src] sentience potion to [SM]...") being_used = TRUE @@ -231,9 +254,23 @@ qdel(src) else to_chat(user, "[M] looks interested for a moment, but then looks back down. Maybe you should try again later.") + heat_stage += 1 + addtimer(CALLBACK(src, .proc/cooldown_potion), 60 SECONDS) + if(user.Adjacent(src)) + switch(heat_stage) + if(1) + to_chat(user, "An intense heat emanates from [src]. It might need to cool off for awhile.") + if(2) + to_chat(user, "[src] is boiling hot! You shudder to think what would happen if you used it again...") being_used = FALSE ..() +/obj/item/slimepotion/sentience/proc/cooldown_potion() + if(!heat_stage) + return + + heat_stage -= 1 + /obj/item/slimepotion/sentience/proc/after_success(mob/living/user, mob/living/simple_animal/SM) return