diff --git a/code/game/objects/micro_structures.dm b/code/game/objects/micro_structures.dm
index 15bf9d13ae..8b10f31fa5 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)