mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fixes #1144
Parses text rather than saving icon strings. Might be better to save the strings in the future into variables, done at the toggle level for custom items.
This commit is contained in:
@@ -192,12 +192,14 @@
|
||||
if(!istype(usr, /mob/living)) return
|
||||
if(usr.stat) return
|
||||
|
||||
var/base_icon = copytext(icon_state,1,(length(icon_state) - 3 + headphones_on))
|
||||
|
||||
if(headphones_on)
|
||||
icon_state = "headphones_off"
|
||||
icon_state = "[base_icon]_off"
|
||||
headphones_on = 0
|
||||
usr << "<span class='notice'>You turn the music off.</span>"
|
||||
else
|
||||
icon_state = "headphones_on"
|
||||
icon_state = "[base_icon]_on"
|
||||
headphones_on = 1
|
||||
usr << "<span class='notice'>You turn the music on.</span>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user