mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-20 11:40:07 +01:00
[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:
co-authored by
Emmett Gaines
parent
e7dd23768e
commit
acdbc8a6c4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user