Makes building on chasms take a screwdriver (#22221)

* building on chasms needs tools

* Henri review

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Contrabang review

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
Coolrune206
2023-09-13 10:51:58 +01:00
committed by GitHub
co-authored by Henri215
parent c588bc461a
commit 4d78a65e67
+9 -5
View File
@@ -54,13 +54,17 @@
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(R.use(1))
to_chat(user, "<span class='notice'>You construct a lattice.</span>")
playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
ReplaceWithLattice()
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
to_chat(user, "<span class='warning'>You need one rod to build a lattice.</span>")
to_chat(user, "<span class='warning'>You need to hold a screwdriver in your other hand to secure this lattice.</span>")
return
if(istype(C, /obj/item/stack/tile/plasteel))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)