Fixes mirror var desync (#36251)

This commit is contained in:
ShizCalev
2018-03-10 03:20:38 -05:00
committed by duncathan salt
parent b752a3b401
commit bfd724e12d
4 changed files with 17 additions and 14 deletions
+10 -4
View File
@@ -9,6 +9,10 @@
max_integrity = 200
integrity_failure = 100
/obj/structure/mirror/Initialize(mapload)
. = ..()
if(icon_state == "mirror_broke" && !broken)
obj_break(null, mapload)
/obj/structure/mirror/attack_hand(mob/user)
if(broken || !Adjacent(user))
@@ -46,12 +50,14 @@
return // no message spam
..()
/obj/structure/mirror/obj_break(damage_flag)
/obj/structure/mirror/obj_break(damage_flag, mapload)
if(!broken && !(flags_1 & NODECONSTRUCT_1))
icon_state = "mirror_broke"
playsound(src, "shatter", 70, 1)
desc = "Oh no, seven years of bad luck!"
broken = 1
if(!mapload)
playsound(src, "shatter", 70, 1)
if(desc == initial(desc))
desc = "Oh no, seven years of bad luck!"
broken = TRUE
/obj/structure/mirror/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))