From 9383e8f7cf2beac6ad5fd65df084c094344bf2af Mon Sep 17 00:00:00 2001 From: fira Date: Fri, 22 Dec 2023 22:07:20 +0100 Subject: [PATCH] Fix Xmas barricade decorator not working (#5270) # About the pull request Decorator changed the main icon of barricades. Not only this is bad due to the file not being up to date, but also wiring doesn't care and reuses the builtin icon file. # Explain why it's good for the game Event code not working # Testing Photographs and Procedure Spawn in, test # Changelog :cl: fix: Fixed X-mas barricade wiring not applying properly. /:cl: --------- Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/game/objects/structures/barricade/barricade.dm | 5 +++-- code/modules/decorators/christmas.dm | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/barricade/barricade.dm b/code/game/objects/structures/barricade/barricade.dm index 5a72ec33ea2a..b23e07f707f2 100644 --- a/code/game/objects/structures/barricade/barricade.dm +++ b/code/game/objects/structures/barricade/barricade.dm @@ -19,6 +19,7 @@ var/force_level_absorption = 5 //How much force an item needs to even damage it at all. var/barricade_hitsound var/barricade_type = "barricade" //"metal", "plasteel", etc. + var/wire_icon = 'icons/obj/structures/barricades.dmi' //! Icon file used for the wiring var/can_change_dmg_state = TRUE var/damage_state = BARRICADE_DMG_NONE var/closed = FALSE @@ -102,9 +103,9 @@ if(is_wired) if(!closed) - overlays += image('icons/obj/structures/barricades.dmi', icon_state = "[src.barricade_type]_wire") + overlays += image(wire_icon, icon_state = "[barricade_type]_wire") else - overlays += image('icons/obj/structures/barricades.dmi', icon_state = "[src.barricade_type]_closed_wire") + overlays += image(wire_icon, icon_state = "[barricade_type]_closed_wire") ..() diff --git a/code/modules/decorators/christmas.dm b/code/modules/decorators/christmas.dm index 6d3f52ffc0f6..290ac6302448 100644 --- a/code/modules/decorators/christmas.dm +++ b/code/modules/decorators/christmas.dm @@ -66,7 +66,7 @@ /datum/decorator/christmas/barricade/decorate(obj/structure/barricade/barricade) if(!istype(barricade)) return - barricade.icon = 'icons/obj/structures/barricades_christmas.dmi' + barricade.wire_icon = 'icons/obj/structures/barricades_christmas.dmi' barricade.update_icon()