From 7243fdb2845f1c23b9a1388924d4ea30ab4dda7e Mon Sep 17 00:00:00 2001 From: Akai Alonkai Date: Wed, 5 Nov 2014 00:24:56 -0500 Subject: [PATCH] Add Window Dismantling Enables dismantling of a window (100% return) with a wrench, if the window is fully unsecured. Windows which cannot be dismantled will return a message saying so for clarity. Dismantling displays a visible message for clarity. --- code/game/objects/structures/window.dm | 20 ++++++++++++++++++++ html/changelog.html | 9 +++++++++ 2 files changed, 29 insertions(+) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 1279ac52612..028f95ac624 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -14,6 +14,7 @@ var/reinf = 0 var/basestate var/shardtype = /obj/item/weapon/shard + var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass. // var/silicate = 0 // number of units of silicate // var/icon/silicateIcon = null // the silicated icon @@ -218,6 +219,20 @@ state = 1 - state playsound(loc, 'sound/items/Crowbar.ogg', 75, 1) user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.") + else if(istype(W, /obj/item/weapon/wrench) && !anchored && (!state || !reinf)) + if(!glasstype) + user << "You're not sure how to dismantle \the [src] properly." + else + visible_message("[user] dismantles \the [src].") + if(dir == SOUTHWEST) + var/index = null + index = 0 + while(index < 2) + new glasstype(loc) + index++ + else + new glasstype(loc) + del(src) else if(W.damtype == BRUTE || W.damtype == BURN) hit(W.force) @@ -373,6 +388,8 @@ desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it." icon_state = "window" basestate = "window" + glasstype = /obj/item/stack/sheet/glass + /obj/structure/window/phoronbasic name = "phoron window" @@ -380,6 +397,7 @@ basestate = "phoronwindow" icon_state = "phoronwindow" shardtype = /obj/item/weapon/shard/phoron + glasstype = /obj/item/stack/sheet/glass/phoronglass maxhealth = 120 /obj/structure/window/phoronbasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) @@ -393,6 +411,7 @@ basestate = "phoronrwindow" icon_state = "phoronrwindow" shardtype = /obj/item/weapon/shard/phoron + glasstype = /obj/item/stack/sheet/glass/phoronrglass reinf = 1 maxhealth = 160 @@ -406,6 +425,7 @@ basestate = "rwindow" maxhealth = 40 reinf = 1 + glasstype = /obj/item/stack/sheet/rglass /obj/structure/window/reinforced/tinted name = "tinted window" diff --git a/html/changelog.html b/html/changelog.html index bbc7657a9c1..2c0e9d05e87 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,15 @@ should be listed in the changelog upon commit though. Thanks. --> +
+

4 November 2014

+

TwistedAkai updated:

+ +
+ +

1 november 2014

PsiOmegaDelta updated: