[MIRROR] Fixes mirror var desync (#5883)
* Fixes mirror var desync (#36251) * Fixes mirror var desync
This commit is contained in:
committed by
Poojawa
parent
2aa4fef8e1
commit
a999863e5c
@@ -24,7 +24,7 @@
|
||||
/area/ruin/unpowered)
|
||||
"f" = (
|
||||
/obj/structure/mirror{
|
||||
desc = "Oh no, seven years of bad luck!";
|
||||
desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!";
|
||||
icon_state = "mirror_broke";
|
||||
pixel_x = 28;
|
||||
broken = 1
|
||||
@@ -56,6 +56,7 @@
|
||||
/area/ruin/unpowered)
|
||||
"k" = (
|
||||
/obj/structure/mirror{
|
||||
desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!";
|
||||
icon_state = "mirror_broke";
|
||||
pixel_y = 28;
|
||||
broken = 1
|
||||
@@ -65,7 +66,7 @@
|
||||
/area/ruin/unpowered)
|
||||
"l" = (
|
||||
/obj/structure/mirror{
|
||||
desc = "Oh no, seven years of bad luck!";
|
||||
desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!";
|
||||
icon_state = "mirror_broke";
|
||||
pixel_x = 28;
|
||||
broken = 1
|
||||
|
||||
@@ -4078,10 +4078,8 @@
|
||||
pixel_x = 11
|
||||
},
|
||||
/obj/structure/mirror{
|
||||
desc = "Oh no, seven years of bad luck!";
|
||||
icon_state = "mirror_broke";
|
||||
pixel_x = 28;
|
||||
broken = 1
|
||||
pixel_x = 28
|
||||
},
|
||||
/turf/open/floor/plasteel/freezer{
|
||||
heat_capacity = 1e+006
|
||||
|
||||
@@ -8216,8 +8216,7 @@
|
||||
"auX" = (
|
||||
/obj/structure/mirror{
|
||||
icon_state = "mirror_broke";
|
||||
pixel_y = 28;
|
||||
broken = 1
|
||||
pixel_y = 28
|
||||
},
|
||||
/obj/machinery/iv_drip,
|
||||
/turf/open/floor/plating,
|
||||
@@ -8225,8 +8224,7 @@
|
||||
"auY" = (
|
||||
/obj/structure/mirror{
|
||||
icon_state = "mirror_broke";
|
||||
pixel_y = 28;
|
||||
broken = 1
|
||||
pixel_y = 28
|
||||
},
|
||||
/obj/item/shard{
|
||||
icon_state = "medium"
|
||||
@@ -33249,7 +33247,7 @@
|
||||
department = "Medbay";
|
||||
departmentType = 1;
|
||||
name = "Medbay RC";
|
||||
pixel_w = 30
|
||||
pixel_x = 30
|
||||
},
|
||||
/turf/open/floor/plasteel/white,
|
||||
/area/medical/sleeper)
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user