[MIRROR] Makes the GAS system only update the icon when it has changed (#4924)

* Makes the GAS system only update the icon when it has changed (#58337)

* Makes the GAS system only update the icon when it has changed

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
This commit is contained in:
SkyratBot
2021-04-15 16:22:45 +01:00
committed by GitHub
co-authored by Emmett Gaines
parent e7dd23768e
commit acdbc8a6c4
7 changed files with 57 additions and 44 deletions
+2 -9
View File
@@ -22,13 +22,6 @@ SUBSYSTEM_DEF(greyscale)
/datum/controller/subsystem/greyscale/proc/GetColoredIconByType(type, list/colors)
type = "[type]"
if(istext(colors)) // It's the color string format for map edits/type values etc
colors = ParseColorString(colors)
if(istype(colors)) // It's the color list format
colors = colors.Join()
return configurations[type].Generate(colors)
/datum/controller/subsystem/greyscale/proc/ParseColorString(colors)
var/list/split_colors = splittext(colors, "#")
var/list/output = list()
for(var/i in 2 to length(split_colors))
output += "#[split_colors[i]]"
return output