Skip to content

Commit

Permalink
icon update
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuuhuuuu committed Apr 30, 2024
1 parent 271e299 commit cd74a52
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/game/objects/structures/fence.dm
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ GLOBAL_LIST_INIT(all_fences, list())
/obj/structure/fence/electrified
name = "electrified fence "
icon = 'icons/obj/structures/props/zenithrandomprops.dmi'
icon_state = "highvoltagegrille"
icon_state = "highvoltagegrille_off"
basestate = "highvoltagegrille"
var/electrified = FALSE
var/fswitch
Expand All @@ -256,13 +256,17 @@ GLOBAL_LIST_INIT(all_fences, list())
if(cut)
icon_state = "[basestate]_broken"
else
icon_state = "[basestate]"
if(electrified)
icon_state = "[basestate]"
else
icon_state = "[basestate]_off"

/obj/structure/fence/electrified/proc/toggle_power()
if(electrified)
electrified = FALSE
else
electrified = TRUE
src.update_icon()

/obj/structure/fence/electrified/Initialize()
..()
Expand Down

0 comments on commit cd74a52

Please sign in to comment.