From 1cbe8821997ec01ada05778084e8d8dc39d2c99a Mon Sep 17 00:00:00 2001 From: VerySoft Date: Wed, 7 Sep 2022 20:59:16 -0400 Subject: [PATCH] Tunnel Snakes Rule Makes it so that certain squiggly mobs can go into mouse holes even though they fall outside what's usually allowed! These mobs also get the option to eat anything else that might be in the tunnel with them! The special mobs include: catslugs morphs protean blobs slimes (which promethean slimes are a subtype of) The thinking is these are squishy things that could reasonably be made to fit, or otherwise fit thematically! I would like to make it so snakes could do this too, but we should get some vore enabled snakes first! --- code/game/objects/micro_structures.dm | 47 ++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/code/game/objects/micro_structures.dm b/code/game/objects/micro_structures.dm index 32955ed7720..7f911d249d4 100644 --- a/code/game/objects/micro_structures.dm +++ b/code/game/objects/micro_structures.dm @@ -10,6 +10,13 @@ var/magic = FALSE //For events and stuff, if true, this tunnel will show up in the list regardless of whether it's in valid range, of if you're in a tunnel with this var, all tunnels of the same faction will show up redardless of range micro_target = TRUE + var/static/non_micro_types = list( + /mob/living/simple_mob/vore/alienanimals/catslug, + /mob/living/simple_mob/vore/hostile/morph, + /mob/living/simple_mob/protean_blob, + /mob/living/simple_mob/slime + ) + /obj/structure/micro_tunnel/Initialize() . = ..() if(name == initial(name)) @@ -47,11 +54,19 @@ if(8) pixel_x = -32 -/obj/structure/micro_tunnel/attack_hand(mob/user) +/obj/structure/micro_tunnel/attack_hand(mob/living/user) if(!isliving(user)) return ..() if(user.loc == src) - var/choice = tgui_alert(user,"It's dark and gloomy in here. What would you like to do?","Tunnel",list("Exit", "Move", "Cancel")) + var/list/our_options = list("Exit", "Move") + + if(is_type_in_list(user, non_micro_types)) + if(src.contents.len > 1) + our_options |= "Eat" + + our_options |= "Cancel" + + var/choice = tgui_alert(user,"It's dark and gloomy in here. What would you like to do?","Tunnel",our_options) switch(choice) if("Exit") if(user.loc != src) @@ -114,6 +129,28 @@ var/obj/structure/micro_tunnel/da_oddawun = choice da_oddawun.tunnel_notify(user) return + if("Eat") + var/list/our_targets = list() + for(var/mob/living/L in src.contents) + if(L == user) + continue + our_targets |= L + if(!our_targets.len) + to_chat(user, "There is no one in here except for you!") + return + var/mob/our_choice + if(our_targets.len == 1) + our_choice = pick(our_targets) + else + our_choice = tgui_input_list(user, "Who would you like to eat?", "Pick a target to eat", our_targets) + if(user.loc != src) + to_chat(user, "You are no longer inside \the [src], and so cannot eat \the [our_choice].") + return + if(our_choice.loc != src) + to_chat(user, "\The [our_choice] is no longer inside \the [src], and so cannot be eaten.") + return + user.feed_grabbed_to_self(user,our_choice) + return if("Cancel") return @@ -157,8 +194,6 @@ user.visible_message("\The [user] pulls \the [grabbed] out of \the [src]! ! !") return - if(tgui_alert(user,"Do you want to go into the tunnel?","Enter Tunnel",list("Yes", "No")) != "Yes") - return user.visible_message("\The [user] begins climbing into \the [src]!") if(!do_after(user, 10 SECONDS, exclusive = TRUE)) to_chat(user, "You didn't go into \the [src]!") @@ -170,6 +205,10 @@ if(user.mob_size <= MOB_TINY || user.get_effective_size(TRUE) <= micro_accepted_scale) return TRUE + if(is_type_in_list(user, non_micro_types)) + if(tgui_alert(user, "Would you like to enter the tunnel, or reach inside it?", "Enter or reach", list("Enter","Reach")) == "Enter") + return TRUE + return FALSE /obj/structure/micro_tunnel/attack_generic(mob/user, damage, attack_verb)