Files
655b66bdd0 Adds automatic GAGS icon generation for mapping and the loadout menu (#90940)
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>

---

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

No more error icons in SDMM and loadout.

🆑
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>
2025-05-29 16:14:43 -04:00

96 lines
3.1 KiB
Plaintext

//BeanieStation13 Redux
//Plus a bobble hat, lets be inclusive!!
/obj/item/clothing/head/beanie
name = "beanie"
desc = "A stylish beanie. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their heads."
icon = 'icons/map_icons/clothing/head/_head.dmi'
worn_icon = 'icons/mob/clothing/head/beanie.dmi'
icon_state = "/obj/item/clothing/head/beanie"
post_init_icon_state = "beanie"
custom_price = PAYCHECK_CREW * 1.2
greyscale_config = /datum/greyscale_config/beanie
greyscale_config_worn = /datum/greyscale_config/beanie/worn
greyscale_colors = "#EEEEEE#EEEEEE"
flags_1 = IS_PLAYER_COLORABLE_1
/obj/item/clothing/head/beanie/black
name = "black beanie"
icon_state = "/obj/item/clothing/head/beanie/black"
greyscale_colors = "#4A4A4B#4A4A4B"
/obj/item/clothing/head/beanie/red
name = "red beanie"
icon_state = "/obj/item/clothing/head/beanie/red"
greyscale_colors = "#D91414#D91414"
/obj/item/clothing/head/beanie/darkblue
name = "dark blue beanie"
icon_state = "/obj/item/clothing/head/beanie/darkblue"
greyscale_colors = "#1E85BC#1E85BC"
/obj/item/clothing/head/beanie/yellow
name = "yellow beanie"
icon_state = "/obj/item/clothing/head/beanie/yellow"
greyscale_colors = "#E0C14F#E0C14F"
/obj/item/clothing/head/beanie/orange
name = "orange beanie"
icon_state = "/obj/item/clothing/head/beanie/orange"
greyscale_colors = "#C67A4B#C67A4B"
/obj/item/clothing/head/beanie/christmas
name = "christmas beanie"
icon_state = "/obj/item/clothing/head/beanie/christmas"
greyscale_colors = "#038000#960000"
/obj/item/clothing/head/beanie/durathread
name = "durathread beanie"
desc = "A beanie made from durathread, its resilient fibres provide some protection to the wearer."
icon_state = "/obj/item/clothing/head/beanie/durathread"
greyscale_colors = "#8291A1#8291A1"
armor_type = /datum/armor/beanie_durathread
/obj/item/clothing/head/rasta
name = "rastacap"
desc = "Perfect for tucking in those dreadlocks."
icon = 'icons/obj/clothing/head/beanie.dmi'
worn_icon = 'icons/mob/clothing/head/beanie.dmi'
icon_state = "beanierasta"
/obj/item/clothing/head/waldo
name = "red striped bobble hat"
desc = "If you're going on a worldwide hike, you'll need some cold protection."
icon = 'icons/obj/clothing/head/beanie.dmi'
worn_icon = 'icons/mob/clothing/head/beanie.dmi'
icon_state = "waldo_hat"
//No dog fashion sprites yet :( poor Ian can't be dope like the rest of us yet
/obj/item/clothing/head/beanie/black/dboy
name = "test subject beanie"
desc = "A dingy and torn black beanie. Is that slime or grease?"
/// Used for the extra flavor text the d-boy himself sees
var/datum/weakref/beanie_owner = null
/datum/armor/beanie_durathread
melee = 15
bullet = 5
laser = 15
energy = 25
bomb = 10
fire = 30
acid = 5
/obj/item/clothing/head/beanie/black/dboy/equipped(mob/user, slot)
. = ..()
if(iscarbon(user) && !beanie_owner)
beanie_owner = WEAKREF(user)
/obj/item/clothing/head/beanie/black/dboy/examine(mob/user)
. = ..()
if(IS_WEAKREF_OF(user, beanie_owner))
. += span_purple("It's covered in otherworldly debris only your eyes have been ruined enough to see.")