From c14de908f93bc60c23aa80d63a77fd89f4b78811 Mon Sep 17 00:00:00 2001 From: Contrabang <91113370+Contrabang@users.noreply.github.com> Date: Thu, 28 Sep 2023 19:34:06 -0400 Subject: [PATCH] Fixes borgs not being able to build over chasms (#22599) * snowflake check * almost forgot --- code/game/turfs/simulated/floor/chasm.dm | 27 +++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm index 64db0b8a50e..971620ac10c 100644 --- a/code/game/turfs/simulated/floor/chasm.dm +++ b/code/game/turfs/simulated/floor/chasm.dm @@ -52,19 +52,26 @@ /turf/simulated/floor/chasm/attackby(obj/item/C, mob/user, params, area/area_restriction) ..() if(istype(C, /obj/item/stack/rods)) - var/obj/item/stack/rods/R = C var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - var/obj/item/O = user.get_inactive_hand() if(!L) - if(O?.tool_behaviour == TOOL_SCREWDRIVER) - if(R.use(1)) - to_chat(user, "You construct a lattice.") - playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE) - ReplaceWithLattice() - else - to_chat(user, "You need one rod to build a lattice.") - else + var/obj/item/inactive = user.get_inactive_hand() + + if(isrobot(user)) + for(var/obj/item/thing in user.get_all_slots()) + if(thing.tool_behaviour == TOOL_SCREWDRIVER) + inactive = thing + break + + if(!inactive || inactive.tool_behaviour != TOOL_SCREWDRIVER) to_chat(user, "You need to hold a screwdriver in your other hand to secure this lattice.") + return + var/obj/item/stack/rods/R = C + if(R.use(1)) + to_chat(user, "You construct a lattice.") + playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE) + ReplaceWithLattice() + else + to_chat(user, "You need one rod to build a lattice.") return if(istype(C, /obj/item/stack/tile/plasteel)) var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)