Skip to content

Commit

Permalink
Fixes borgs not being able to build over chasms (#22599)
Browse files Browse the repository at this point in the history
* snowflake check

* almost forgot
  • Loading branch information
Contrabang authored Sep 28, 2023
1 parent 846301b commit c14de90
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions code/game/turfs/simulated/floor/chasm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='notice'>You construct a lattice.</span>")
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
ReplaceWithLattice()
else
to_chat(user, "<span class='warning'>You need one rod to build a lattice.</span>")
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, "<span class='warning'>You need to hold a screwdriver in your other hand to secure this lattice.</span>")
return
var/obj/item/stack/rods/R = C
if(R.use(1))
to_chat(user, "<span class='notice'>You construct a lattice.</span>")
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
ReplaceWithLattice()
else
to_chat(user, "<span class='warning'>You need one rod to build a lattice.</span>")
return
if(istype(C, /obj/item/stack/tile/plasteel))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
Expand Down

0 comments on commit c14de90

Please sign in to comment.