Skip to content

Commit

Permalink
Fix Xmas barricade decorator not working (#5270)
Browse files Browse the repository at this point in the history
# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->
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 <[email protected]>
  • Loading branch information
fira and Drulikar committed Dec 22, 2023
1 parent 01c730d commit 9383e8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions code/game/objects/structures/barricade/barricade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

..()

Expand Down
2 changes: 1 addition & 1 deletion code/modules/decorators/christmas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down

0 comments on commit 9383e8f

Please sign in to comment.