Firelock fixes

Fixes firelocks producing intact electronics when broken.
Allows firelocks to be damaged by melee weapons and repaired.
Swaps anchored and unanchored assembly icons, so that the
assembly starts to look progressively more like the final
product as it is constructed.
This commit is contained in:
mwerezak
2015-01-14 14:08:42 -05:00
parent 4489b272cf
commit c99df46d70
2 changed files with 12 additions and 5 deletions

View File

@@ -186,13 +186,14 @@
add_fingerprint(user)
if(operating)
return//Already doing something.
if(istype(C, /obj/item/weapon/weldingtool))
if(istype(C, /obj/item/weapon/weldingtool) && !repairing)
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(0, user))
blocked = !blocked
user.visible_message("<span class='danger'>\The [user] [blocked ? "welds" : "unwelds"] \the [src] with \a [W].</span>",\
"You [blocked ? "weld" : "unweld"] \the [src] with \the [W].",\
"You hear something being welded.")
playsound(src, 'sound/items/Welder.ogg', 100, 1)
update_icon()
return
@@ -203,7 +204,7 @@
update_icon()
return
if(blocked && istype(C, /obj/item/weapon/crowbar))
if(blocked && istype(C, /obj/item/weapon/crowbar) && !repairing)
if(!hatch_open)
user << "<span class='danger'>You must open the maintenance hatch first!</span>"
else
@@ -215,7 +216,11 @@
user.visible_message("<span class='danger'>[user] has removed the electronics from \the [src].</span>",
"You have removed the electronics from [src].")
new/obj/item/weapon/airalarm_electronics(src.loc)
if (stat & BROKEN)
new /obj/item/weapon/circuitboard/broken(src.loc)
else
new/obj/item/weapon/airalarm_electronics(src.loc)
var/obj/structure/firedoor_assembly/FA = new/obj/structure/firedoor_assembly(src.loc)
FA.anchored = 1
FA.density = 1
@@ -225,10 +230,10 @@
return
if(blocked)
user << "<span class='danger'>\The [src] is welded solid!</span>"
user << "<span class='danger'>\The [src] is welded shut!</span>"
return
if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/melee/energy/blade) || istype(C,/obj/item/weapon/twohanded/fireaxe))
if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/twohanded/fireaxe))
if(operating)
return
@@ -263,6 +268,8 @@
spawn(0)
close()
return
return ..()
// CHECK PRESSURE
/obj/machinery/door/firedoor/process()