Fixes floorbot construction (#17285)

This commit is contained in:
S34N
2022-01-01 20:44:08 +00:00
committed by GitHub
parent 741c10bc20
commit cfc339aa85
@@ -211,17 +211,10 @@
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/artistic,
/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))
if(!istype(src, /obj/item/storage/toolbox))
return
if(contents.len >= 1)
to_chat(user, "<span class='warning'>They won't fit in, as there is already stuff inside.</span>")