Skip to content

Commit

Permalink
add support for GAGS to design asset list generation (tgstation#60366)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbah authored Jul 22, 2021
1 parent 6c8c797 commit 7b5bdfd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,15 @@
if (machine)
item = machine

icon_file = initial(item.icon)
icon_state = initial(item.icon_state)
// Check for GAGS support where necessary
var/greyscale_config = initial(item.greyscale_config)
var/greyscale_colors = initial(item.greyscale_colors)
if (greyscale_config && greyscale_colors)
icon_file = SSgreyscale.GetColoredIconByType(greyscale_config, greyscale_colors)
else
icon_file = initial(item.icon)

icon_state = initial(item.icon_state)
if(!(icon_state in icon_states(icon_file)))
warning("design [D] with icon '[icon_file]' missing state '[icon_state]'")
continue
Expand Down

0 comments on commit 7b5bdfd

Please sign in to comment.