From aa82321e2a84edee016d16e4bde5e65263884147 Mon Sep 17 00:00:00 2001 From: Arkatos1 Date: Wed, 17 Apr 2019 20:20:33 +0200 Subject: [PATCH] Sanity checks --- .../mob/living/simple_animal/bot/construction.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index e13aa995c25..7edd98726ef 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -219,9 +219,18 @@ var/robot_arm = /obj/item/robot_parts/l_arm icon_state = "toolbox_tiles_sensor" /obj/item/storage/toolbox/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) + var/list/allowed_toolbox = list(/obj/item/storage/toolbox/emergency, //which toolboxes can be made into floorbots + /obj/item/storage/toolbox/electrical, + /obj/item/storage/toolbox/mechanical, + /obj/item/storage/toolbox/green, + /obj/item/storage/toolbox/syndicate, + /obj/item/storage/toolbox/fakesyndi) + if(!istype(T, /obj/item/stack/tile/plasteel)) ..() return + if(!is_type_in_list(src, allowed_toolbox)) + return if(contents.len >= 1) to_chat(user, "They won't fit in, as there is already stuff inside.") return @@ -237,7 +246,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm B.toolbox_color = "y" if(/obj/item/storage/toolbox/green) B.toolbox_color = "g" - if(/obj/item/storage/toolbox/syndicate) + if(/obj/item/storage/toolbox/syndicate || /obj/item/storage/toolbox/fakesyndi) B.toolbox_color = "s" B.icon_state = "[B.toolbox_color]toolbox_tiles" user.put_in_hands(B)