Merge pull request #6547 from VOREStation/upstream-merge-6676

[MIRROR] Fix frame deconstruction bugs
This commit is contained in:
Novacat
2020-02-08 15:55:59 -05:00
committed by GitHub

View File

@@ -429,6 +429,7 @@
circuit = null circuit = null
if(frame_type.frame_class == FRAME_CLASS_MACHINE) if(frame_type.frame_class == FRAME_CLASS_MACHINE)
req_components = null req_components = null
update_desc()
else if(state == FRAME_WIRED) else if(state == FRAME_WIRED)
if(frame_type.frame_class == FRAME_CLASS_MACHINE) if(frame_type.frame_class == FRAME_CLASS_MACHINE)
@@ -498,27 +499,21 @@
else if(P.is_wirecutter()) else if(P.is_wirecutter())
if(state == FRAME_WIRED) if(state == FRAME_WIRED)
if(frame_type.frame_class == FRAME_CLASS_COMPUTER) if( \
playsound(src, P.usesound, 50, 1) frame_type.frame_class == FRAME_CLASS_COMPUTER || \
to_chat(user, "<span class='notice'>You remove the cables.</span>") frame_type.frame_class == FRAME_CLASS_DISPLAY || \
state = FRAME_FASTENED frame_type.frame_class == FRAME_CLASS_ALARM || \
new /obj/item/stack/cable_coil(src.loc, 5) frame_type.frame_class == FRAME_CLASS_MACHINE \
)
else if(frame_type.frame_class == FRAME_CLASS_DISPLAY)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = FRAME_FASTENED
new /obj/item/stack/cable_coil(src.loc, 5)
else if(frame_type.frame_class == FRAME_CLASS_ALARM)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = FRAME_FASTENED
new /obj/item/stack/cable_coil(src.loc, 5)
else if(frame_type.frame_class == FRAME_CLASS_MACHINE)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
if (components.len == 0)
to_chat(user, "<span class='notice'>You remove the cables.</span>") to_chat(user, "<span class='notice'>You remove the cables.</span>")
else
to_chat(user, "<span class='notice'>You remove the cables and components.</span>")
for(var/obj/item/weapon/W in components)
W.forceMove(src.loc)
check_components()
update_desc()
state = FRAME_FASTENED state = FRAME_FASTENED
new /obj/item/stack/cable_coil(src.loc, 5) new /obj/item/stack/cable_coil(src.loc, 5)