From 91f05d1a21e1e6908f641e3dbf858cdbe3c33075 Mon Sep 17 00:00:00 2001 From: phil235 Date: Thu, 18 Jun 2015 14:57:24 +0200 Subject: [PATCH] Fixes windoor not being damaged by fires. Fixes not being to attack windows with a welder on harm intent. --- code/game/machinery/doors/windowdoor.dm | 5 +++++ code/game/objects/structures/window.dm | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index c679e37cd4c..d0f2dcf92cc 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -183,6 +183,11 @@ take_damage(round(Proj.damage / 2)) ..() +/obj/machinery/door/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(exposed_temperature > T0C + 800) + take_damage(round(exposed_volume / 200)) + ..() + //When an object is thrown at the window /obj/machinery/door/window/hitby(AM as mob|obj) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 131844894c1..69afe443b05 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -219,18 +219,17 @@ state = (state == 0 ? 1 : 0) user << (state == 1 ? "You pry the window into the frame." : "You pry the window out of the frame.") - else if(istype(I, /obj/item/weapon/weldingtool)) + else if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == "help") var/obj/item/weapon/weldingtool/WT = I - if(user.a_intent == "help") //so you can still break windows with welding tools - if(health < maxhealth) - if(WT.remove_fuel(0,user)) - user << "You begin repairing [src]..." - playsound(loc, 'sound/items/Welder.ogg', 40, 1) - if(do_after(user, 40)) - health = maxhealth - playsound(loc, 'sound/items/Welder2.ogg', 50, 1) - else - user << "[src] is already in good condition!" + if(health < maxhealth) + if(WT.remove_fuel(0,user)) + user << "You begin repairing [src]..." + playsound(loc, 'sound/items/Welder.ogg', 40, 1) + if(do_after(user, 40)) + health = maxhealth + playsound(loc, 'sound/items/Welder2.ogg', 50, 1) + else + user << "[src] is already in good condition!" update_nearby_icons() else if(istype(I, /obj/item/weapon/wrench) && !anchored)