Skip to content

Commit

Permalink
grilles and windows. windows get broken and are dumb to break
Browse files Browse the repository at this point in the history
  • Loading branch information
Thera-Pissed committed Jun 24, 2024
1 parent 564c890 commit 25fac9e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/game/objects/structures/grille.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@
qdel(src)
..()

/obj/structure/grille/deconstruct_act(mob/living/user, obj/item/I)
if (I.use_tool(src, user, 1 SECONDS, volume=100))
to_chat(user, "<span class='warning'>You slice [src] apart.</span>")
deconstruct(FALSE)
return TRUE

/obj/structure/grille/obj_break()
if(!broken && !(flags_1 & NODECONSTRUCT_1))
new broken_type(src.loc)
Expand Down
18 changes: 18 additions & 0 deletions code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@
qdel(src)
update_nearby_icons()

/obj/structure/window/deconstruct_act(mob/living/user, obj/item/I)
if (I.use_tool(src, user, 5 SECONDS, volume=100))
to_chat(user, "<span class='warning'>You shatter [src] with the [I].</span>")
deconstruct(FALSE)
return TRUE

/obj/structure/window/proc/spawnDebris(location)
. = list()
. += new /obj/item/shard(location)
Expand Down Expand Up @@ -471,6 +477,12 @@
if(RWINDOW_BARS_CUT)
. += "<span class='notice'>The main pane can be easily moved out of the way to reveal some <b>bolts</b> holding the frame in.</span>"

/obj/structure/window/reinforced/deconstruct_act(mob/living/user, obj/item/I)
if (I.use_tool(src, user, 20 SECONDS, volume=100))
to_chat(user, "<span class='warning'>You shatter [src] with the [I].</span>")
deconstruct(FALSE)
return TRUE

/obj/structure/window/reinforced/spawner/east
dir = EAST

Expand Down Expand Up @@ -591,6 +603,12 @@
if(RWINDOW_BARS_CUT)
. += "<span class='notice'>The main pane can be easily moved out of the way to reveal some <b>bolts</b> holding the frame in.</span>"

/obj/structure/window/plasma/reinforced/deconstruct_act(mob/living/user, obj/item/I)
if (I.use_tool(src, user, 40 SECONDS, volume=100))
to_chat(user, "<span class='warning'>You shatter [src] with the [I].</span>")
deconstruct(FALSE)
return TRUE

/obj/structure/window/plasma/reinforced/spawner/east
dir = EAST

Expand Down

0 comments on commit 25fac9e

Please sign in to comment.