Merge pull request #5493 from Anewbe/largecrate_tweak

Cleans up some largecrate code
This commit is contained in:
Atermonera
2018-08-15 21:11:47 -07:00
committed by GitHub
@@ -17,15 +17,20 @@
I.forceMove(src)
/obj/structure/largecrate/attack_hand(mob/user as mob)
user << "<span class='notice'>You need a crowbar to pry this open!</span>"
to_chat(user, "<span class='notice'>You need a crowbar to pry this open!</span>")
return
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/turf/T = get_turf(src)
if(!T)
to_chat(user, "<span class='notice'>You can't open this here!</span>")
if(W.is_crowbar())
new /obj/item/stack/material/wood(src)
var/turf/T = get_turf(src)
for(var/atom/movable/AM in contents)
if(AM.simulated) AM.forceMove(T)
if(AM.simulated)
AM.forceMove(T)
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")