Curtain and Flap (De)construction (#7503)

This commit is contained in:
Doxxmedearly
2019-11-30 16:47:18 +01:00
committed by Werner
parent 98350ae658
commit a6715f0175
4 changed files with 105 additions and 0 deletions
@@ -7,6 +7,7 @@
anchored = 1
layer = 4
explosion_resistance = 5
var/manipulating = FALSE //Prevents queueing up a ton of deconstructs
var/list/mobs_can_pass = list(
/mob/living/carbon/slime,
/mob/living/simple_animal/rat,
@@ -46,6 +47,20 @@
if (prob(5))
qdel(src)
/obj/structure/plasticflaps/attackby(obj/item/W, mob/user)
if(manipulating) return
manipulating = TRUE
if(W.iswirecutter() || W.sharp && !W.noslice)
visible_message(span("notice", "[user] begins cutting down \the [src]."),
span("notice", "You begin cutting down \the [src]."))
if(!do_after(user, 30/W.toolspeed))
manipulating = FALSE
return
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
visible_message(span("notice", "[user] cuts down \the [src]."),
span("notice", "You cut down \the [src]."))
qdel(src)
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
name = "airtight plastic flaps"
desc = "Heavy duty, airtight, plastic flaps."