From e93bb49994c8de5df04b9707432b64e6ec62ec90 Mon Sep 17 00:00:00 2001 From: coiax Date: Mon, 18 Dec 2017 01:27:17 +0000 Subject: [PATCH 1/2] Spinning resin or laying eggs on vents prompts the user if they're sure (#33302) add: Aliens (and humans with alien organs) are unable to create resin structures or lay eggs atop vents or scrubbers. This stops stupid aliens from obscuring entrances to the very helpful and useful atmospheric piping system. --- .../carbon/alien/humanoid/alien_powers.dm | 22 ++++++++++++++----- .../mob/living/carbon/alien/humanoid/queen.dm | 12 ++++++---- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index eb17ecc40a..a15e952bcf 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -59,6 +59,14 @@ Doesn't work on other aliens/AI.*/ return 0 return 1 +/obj/effect/proc_holder/alien/proc/check_vent_block(mob/living/user) + var/obj/machinery/atmospherics/components/unary/atmos_thing = locate() in user.loc + if(atmos_thing) + var/rusure = alert(user, "Laying eggs and shaping resin here would block access to [atmos_thing]. Do you want to continue?", "Blocking Atmospheric Component", "Yes", "No") + if(rusure != "No") + return FALSE + return TRUE + /obj/effect/proc_holder/alien/plant name = "Plant Weeds" desc = "Plants some alien weeds." @@ -243,7 +251,7 @@ Doesn't work on other aliens/AI.*/ name = "Secrete Resin" desc = "Secrete tough malleable resin." plasma_cost = 55 - check_turf = 1 + check_turf = TRUE var/list/structures = list( "resin wall" = /obj/structure/alien/resin/wall, "resin membrane" = /obj/structure/alien/resin/membrane, @@ -254,18 +262,22 @@ Doesn't work on other aliens/AI.*/ /obj/effect/proc_holder/alien/resin/fire(mob/living/carbon/user) if(locate(/obj/structure/alien/resin) in user.loc) to_chat(user, "There is already a resin structure there.") - return 0 + return FALSE + + if(!check_vent_block(user)) + return FALSE + var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in structures if(!choice) - return 0 + return FALSE if (!cost_check(check_turf,user)) - return 0 + return FALSE to_chat(user, "You shape a [choice].") user.visible_message("[user] vomits up a thick purple substance and begins to shape it.") choice = structures[choice] new choice(user.loc) - return 1 + return TRUE /obj/effect/proc_holder/alien/regurgitate name = "Regurgitate" diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 4f79ed7d25..5a48e1c6d1 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -79,16 +79,20 @@ name = "Lay Egg" desc = "Lay an egg to produce huggers to impregnate prey with." plasma_cost = 75 - check_turf = 1 + check_turf = TRUE action_icon_state = "alien_egg" /obj/effect/proc_holder/alien/lay_egg/fire(mob/living/carbon/user) if(locate(/obj/structure/alien/egg) in get_turf(user)) - to_chat(user, "There's already an egg here.") - return 0 + to_chat(user, "There's already an egg here.") + return FALSE + + if(!check_vent_block(user)) + return FALSE + user.visible_message("[user] has laid an egg!") new /obj/structure/alien/egg(user.loc) - return 1 + return TRUE //Button to let queen choose her praetorian. /obj/effect/proc_holder/alien/royal/queen/promote