[MIRROR] Fixes mirror var desync (#5883)

* Fixes mirror var desync (#36251)

* Fixes mirror var desync
This commit is contained in:
CitadelStationBot
2018-03-10 07:17:52 -06:00
committed by Poojawa
parent 2aa4fef8e1
commit a999863e5c
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))