Adds automatic GAGS icon generation for mapping and the loadout menu (#90940)

## About The Pull Request

Revival of https://github.com/tgstation/tgstation/pull/86482, which is
even more doable now that we have rustg iconforge generation.

What this PR does:

- Sets up every single GAGS icon in the game to have their own preview
icon autogenerated during compile. This is configurable to not run
during live. The icons are created in `icons/map_icons/..`
- This also has the side effect of providing accurate GAGS icons for
things like the loadout menu. No more having to create your own
previews.


![FOuGL6ofxC](https://github.com/user-attachments/assets/e5414971-7f13-4883-9f7f-a8a212b46fe8)

<details><summary>Mappers rejoice!</summary>


![StrongDMM_1oeMSoRHXT](https://github.com/user-attachments/assets/83dcfe4c-31be-4953-98f3-dff90268bbc4)


![StrongDMM_uyqu3CggPn](https://github.com/user-attachments/assets/7896f99e-2656-40e1-a9da-3a513882365a)

</details>

<details><summary>Uses iconforge so it does not take up much time during
init</summary>


![dreamdaemon_u4Md3Dqwge](https://github.com/user-attachments/assets/17baaff8-5d5e-4a4d-ba8f-9dd548024155)

</details>

---

### Copied from https://github.com/tgstation/tgstation/pull/86482 as
this still applies:

Note for Spriters:

After you've assigned the correct values to vars, you must run the game
through init on your local machine and commit the changes to the map
icon dmi files. Unit tests should catch all cases of forgetting to
assign the correct vars, or not running through init.

Note for Server Operators:

In order to not generate these icons on live I've added a new config
entry which should be disabled on live called GENERATE_ASSETS_IN_INIT in
the config.txt


## Why It's Good For The Game

No more error icons in SDMM and loadout.

## Changelog

🆑
refactor: preview icons for greyscale items are now automatically
generated, meaning you can see GAGS as they actually appear ingame while
mapping or viewing the loadout menu.
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
Bloop
2025-05-24 15:21:02 -07:00
committed by GitHub
co-authored by LemonInTheDark
parent 57b964a484
commit cb51a652a9
143 changed files with 1198 additions and 444 deletions
+14 -3
View File
@@ -190,12 +190,13 @@
/obj/item/clothing/suit/armor/vest/ctf
name = "white shielded vest"
desc = "Standard issue vest for playing capture the flag."
icon = 'icons/mob/clothing/suits/ctf.dmi'
worn_icon = 'icons/mob/clothing/suits/ctf.dmi'
icon_state = "standard"
// Adding TRAIT_NODROP is done when the CTF spawner equips people
armor_type = /datum/armor/none
allowed = null
icon = 'icons/map_icons/clothing/suit/_suit.dmi'
icon_state = "/obj/item/clothing/suit/armor/vest/ctf"
post_init_icon_state = "standard"
greyscale_config = /datum/greyscale_config/ctf_standard
greyscale_config_worn = /datum/greyscale_config/ctf_standard/worn
greyscale_colors = "#ffffff"
@@ -227,7 +228,9 @@
/obj/item/clothing/suit/armor/vest/ctf/light
name = "light white shielded vest"
desc = "Lightweight vest for playing capture the flag."
icon_state = "light"
icon = 'icons/map_icons/clothing/suit/_suit.dmi'
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/light"
post_init_icon_state = "light"
greyscale_config = /datum/greyscale_config/ctf_light
greyscale_config_worn = /datum/greyscale_config/ctf_light/worn
slowdown = -0.25
@@ -484,6 +487,7 @@
// Regular
/obj/item/clothing/suit/armor/vest/ctf/red
name = "red shielded vest"
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/red"
inhand_icon_state = null
team_shield_icon = "shield-red"
greyscale_colors = COLOR_VIVID_RED
@@ -491,6 +495,7 @@
// Light
/obj/item/clothing/suit/armor/vest/ctf/light/red
name = "light red shielded vest"
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/light/red"
inhand_icon_state = null
team_shield_icon = "shield-red"
greyscale_colors = COLOR_VIVID_RED
@@ -500,6 +505,7 @@
// Regular
/obj/item/clothing/suit/armor/vest/ctf/blue
name = "blue shielded vest"
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/blue"
inhand_icon_state = null
team_shield_icon = "shield-old"
greyscale_colors = COLOR_DARK_CYAN
@@ -507,6 +513,7 @@
// Light
/obj/item/clothing/suit/armor/vest/ctf/light/blue
name = "light blue shielded vest"
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/light/blue"
inhand_icon_state = null
team_shield_icon = "shield-old"
greyscale_colors = COLOR_DARK_CYAN
@@ -516,6 +523,7 @@
// Regular
/obj/item/clothing/suit/armor/vest/ctf/green
name = "green shielded vest"
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/green"
inhand_icon_state = null
team_shield_icon = "shield-green"
greyscale_colors = COLOR_LIME
@@ -523,6 +531,7 @@
// Light
/obj/item/clothing/suit/armor/vest/ctf/light/green
name = "light green shielded vest"
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/light/green"
inhand_icon_state = null
team_shield_icon = "shield-green"
greyscale_colors = COLOR_LIME
@@ -532,6 +541,7 @@
// Regular
/obj/item/clothing/suit/armor/vest/ctf/yellow
name = "yellow shielded vest"
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/yellow"
inhand_icon_state = null
team_shield_icon = "shield-yellow"
greyscale_colors = COLOR_VIVID_YELLOW
@@ -539,6 +549,7 @@
// Light
/obj/item/clothing/suit/armor/vest/ctf/light/yellow
name = "light yellow shielded vest"
icon_state = "/obj/item/clothing/suit/armor/vest/ctf/light/yellow"
inhand_icon_state = null
team_shield_icon = "shield-yellow"
greyscale_colors = COLOR_VIVID_YELLOW
@@ -62,8 +62,9 @@
/obj/item/ctf_flag/blue/medisim
name = "\improper Bluesworth Hold Fair Maiden"
desc = "Protect your maiden, and capture theirs!"
icon = 'icons/obj/toys/plushes.dmi'
icon_state = "map_plushie_slime"
icon = 'icons/map_icons/items/_item.dmi'
icon_state = "/obj/item/ctf_flag/blue/medisim"
post_init_icon_state = "map_plushie_slime"
greyscale_config = /datum/greyscale_config/plush_slime
greyscale_colors = "#3399ff#000000"
force = 0