Merge pull request #7823 from mwerezak/fixes

Emergency shutter and airlock fixes
This commit is contained in:
PsiOmegaDelta
2015-01-15 14:00:30 +01:00
4 changed files with 38 additions and 7 deletions

View File

@@ -876,6 +876,7 @@ About the new airlock wires panel:
src.welded = 1
else
src.welded = null
playsound(src, 'sound/items/Welder.ogg', 100, 1)
src.update_icon()
return
else
@@ -924,7 +925,7 @@ About the new airlock wires panel:
da.created_name = src.name
da.update_state()
if(operating == -1)
if(operating == -1 || (stat & BROKEN))
new /obj/item/weapon/circuitboard/broken(src.loc)
operating = 0
else

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,19 +216,24 @@
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
FA.wired = 1
FA.update_icon()
del(src)
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
@@ -262,6 +268,8 @@
spawn(0)
close()
return
return ..()
// CHECK PRESSURE
/obj/machinery/door/firedoor/process()

View File

@@ -6,6 +6,7 @@ obj/structure/firedoor_assembly
anchored = 0
opacity = 0
density = 0
var/wired = 0
obj/structure/firedoor_assembly/update_icon()
if(anchored)
@@ -14,7 +15,28 @@ obj/structure/firedoor_assembly/update_icon()
icon_state = "door_construction"
obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
if(istype(C, /obj/item/weapon/airalarm_electronics))
if(istype(C, /obj/item/stack/cable_coil) && !wired && anchored)
var/obj/item/stack/cable_coil/cable = C
if (cable.get_amount() < 1)
user << "<span class='warning'>You need one length of coil to wire \the [src].</span>"
return
user.visible_message("[user] wires \the [src].", "You start to wire \the [src].")
if(do_after(user, 40) && !wired && anchored)
if (cable.use(1))
wired = 1
user << "<span class='notice'>You wire \the [src].</span>"
else if(istype(C, /obj/item/weapon/wirecutters) && wired )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].")
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You cut the wires!</span>"
new/obj/item/stack/cable_coil(src.loc, 1)
wired = 0
else if(istype(C, /obj/item/weapon/airalarm_electronics) && wired)
if(anchored)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB