mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 15:45:05 +01:00
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.  <details><summary>Mappers rejoice!</summary>   </details> <details><summary>Uses iconforge so it does not take up much time during init</summary>  </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:
@@ -121,6 +121,9 @@
|
||||
*/
|
||||
var/datum/component/shell/shell
|
||||
|
||||
/// This is where our overlays reside
|
||||
var/overlays_icon = 'icons/obj/machines/computer.dmi'
|
||||
|
||||
/datum/armor/item_modular_computer
|
||||
bullet = 20
|
||||
laser = 20
|
||||
@@ -443,15 +446,11 @@
|
||||
|
||||
/obj/item/modular_computer/update_overlays()
|
||||
. = ..()
|
||||
var/init_icon = initial(icon)
|
||||
if(!init_icon)
|
||||
return
|
||||
|
||||
if(enabled)
|
||||
. += active_program ? mutable_appearance(init_icon, active_program.program_open_overlay) : mutable_appearance(init_icon, icon_state_menu)
|
||||
. += active_program ? mutable_appearance(overlays_icon, active_program.program_open_overlay) : mutable_appearance(overlays_icon, icon_state_menu)
|
||||
if(atom_integrity <= integrity_failure * max_integrity)
|
||||
. += mutable_appearance(init_icon, "bsod")
|
||||
. += mutable_appearance(init_icon, "broken")
|
||||
. += mutable_appearance(overlays_icon, "bsod")
|
||||
. += mutable_appearance(overlays_icon, "broken")
|
||||
|
||||
/obj/item/modular_computer/Exited(atom/movable/gone, direction)
|
||||
if(internal_cell == gone)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/obj/item/modular_computer/pda
|
||||
name = "pda"
|
||||
icon = 'icons/obj/devices/modular_pda.dmi'
|
||||
icon_state = "pda"
|
||||
icon = 'icons/map_icons/items/pda.dmi'
|
||||
icon_state = "/obj/item/modular_computer/pda"
|
||||
post_init_icon_state = "pda"
|
||||
worn_icon_state = "nothing"
|
||||
base_icon_state = "tablet"
|
||||
greyscale_config = /datum/greyscale_config/tablet
|
||||
@@ -11,6 +12,8 @@
|
||||
righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi'
|
||||
inhand_icon_state = "electronic"
|
||||
|
||||
overlays_icon = 'icons/obj/devices/modular_pda.dmi'
|
||||
|
||||
steel_sheet_cost = 2
|
||||
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass=SMALL_MATERIAL_AMOUNT, /datum/material/plastic=SMALL_MATERIAL_AMOUNT)
|
||||
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_ALLOW_USER_LOCATION | INTERACT_ATOM_IGNORE_MOBILITY
|
||||
@@ -74,11 +77,11 @@
|
||||
/obj/item/modular_computer/pda/update_overlays()
|
||||
. = ..()
|
||||
if(computer_id_slot)
|
||||
. += mutable_appearance(initial(icon), "id_overlay")
|
||||
. += mutable_appearance(overlays_icon, "id_overlay")
|
||||
if(light_on)
|
||||
. += mutable_appearance(initial(icon), "light_overlay")
|
||||
. += mutable_appearance(overlays_icon, "light_overlay")
|
||||
if(inserted_pai)
|
||||
. += mutable_appearance(initial(icon), "pai_inserted")
|
||||
. += mutable_appearance(overlays_icon, "pai_inserted")
|
||||
|
||||
/obj/item/modular_computer/pda/interact(mob/user)
|
||||
. = ..()
|
||||
@@ -261,6 +264,7 @@
|
||||
*/
|
||||
/obj/item/modular_computer/pda/nukeops
|
||||
name = "nuclear pda"
|
||||
icon_state = "/obj/item/modular_computer/pda/nukeops"
|
||||
device_theme = PDA_THEME_SYNDICATE
|
||||
comp_light_luminosity = 6.3 //matching a flashlight
|
||||
light_color = COLOR_RED
|
||||
@@ -280,8 +284,9 @@
|
||||
|
||||
/obj/item/modular_computer/pda/syndicate_contract_uplink
|
||||
name = "contractor tablet"
|
||||
device_theme = PDA_THEME_SYNDICATE
|
||||
icon_state = "/obj/item/modular_computer/pda/syndicate_contract_uplink"
|
||||
icon_state_menu = "contractor-assign"
|
||||
device_theme = PDA_THEME_SYNDICATE
|
||||
comp_light_luminosity = 6.3
|
||||
has_pda_programs = FALSE
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_double
|
||||
@@ -299,7 +304,9 @@
|
||||
*/
|
||||
/obj/item/modular_computer/pda/silicon
|
||||
name = "modular interface"
|
||||
icon = 'icons/obj/devices/modular_pda.dmi'
|
||||
icon_state = "tablet-silicon"
|
||||
post_init_icon_state = null
|
||||
base_icon_state = "tablet-silicon"
|
||||
greyscale_config = null
|
||||
greyscale_colors = null
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
/obj/item/modular_computer/pda/heads
|
||||
icon_state = "/obj/item/modular_computer/pda/heads"
|
||||
greyscale_config = /datum/greyscale_config/tablet/head
|
||||
greyscale_colors = "#67A364#a92323"
|
||||
max_capacity = parent_type::max_capacity * 2
|
||||
@@ -21,6 +22,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/heads/captain
|
||||
name = "captain PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/heads/captain"
|
||||
greyscale_config = /datum/greyscale_config/tablet/captain
|
||||
greyscale_colors = "#2C7CB2#FF0000#FFFFFF#FFD55B"
|
||||
inserted_item = /obj/item/pen/fountain/captain
|
||||
@@ -37,6 +39,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/heads/hop
|
||||
name = "head of personnel PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/heads/hop"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#374f7e#a52f29#a52f29"
|
||||
starting_programs = list(
|
||||
@@ -46,6 +49,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/heads/hos
|
||||
name = "head of security PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/heads/hos"
|
||||
greyscale_config = /datum/greyscale_config/tablet/head
|
||||
greyscale_colors = "#EA3232#0000CC"
|
||||
inserted_item = /obj/item/pen/red/security
|
||||
@@ -55,6 +59,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/heads/ce
|
||||
name = "chief engineer PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/heads/ce"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#D99A2E#69DBF3#FAFAFA"
|
||||
starting_programs = list(
|
||||
@@ -65,6 +70,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/heads/cmo
|
||||
name = "chief medical officer PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/heads/cmo"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#FAFAFA#000099#3F96CC"
|
||||
starting_programs = list(
|
||||
@@ -74,6 +80,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/heads/rd
|
||||
name = "research director PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/heads/rd"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#FAFAFA#000099#B347BC"
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
@@ -85,6 +92,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/heads/quartermaster
|
||||
name = "quartermaster PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/heads/quartermaster"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
|
||||
greyscale_colors = "#c4b787#18191e#8b4c31"
|
||||
inserted_item = /obj/item/pen/survival
|
||||
@@ -118,6 +126,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/warden
|
||||
name = "warden PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/warden"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_double
|
||||
greyscale_colors = "#EA3232#0000CC#363636"
|
||||
inserted_item = /obj/item/pen/red/security
|
||||
@@ -132,6 +141,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/engineering
|
||||
name = "engineering PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/engineering"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#D99A2E#69DBF3#E3DF3D"
|
||||
starting_programs = list(
|
||||
@@ -142,6 +152,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/atmos
|
||||
name = "atmospherics PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/atmos"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#EEDC43#00E5DA#727272"
|
||||
starting_programs = list(
|
||||
@@ -156,6 +167,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/science
|
||||
name = "scientist PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/science"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#FAFAFA#000099#B347BC"
|
||||
starting_programs = list(
|
||||
@@ -167,6 +179,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/roboticist
|
||||
name = "roboticist PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/roboticist"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_double
|
||||
greyscale_colors = "#484848#0099CC#D94927"
|
||||
starting_programs = list(
|
||||
@@ -177,6 +190,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/geneticist
|
||||
name = "geneticist PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/geneticist"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_double
|
||||
greyscale_colors = "#FAFAFA#000099#0097CA"
|
||||
starting_programs = list(
|
||||
@@ -189,6 +203,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/medical
|
||||
name = "medical PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/medical"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#FAFAFA#000099#3F96CC"
|
||||
starting_programs = list(
|
||||
@@ -198,6 +213,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/medical/paramedic
|
||||
name = "paramedic PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/medical/paramedic"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_double
|
||||
greyscale_colors = "#28334D#000099#3F96CC"
|
||||
starting_programs = list(
|
||||
@@ -207,11 +223,13 @@
|
||||
|
||||
/obj/item/modular_computer/pda/chemist
|
||||
name = "chemist PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/chemist"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#FAFAFA#355FAC#EA6400"
|
||||
|
||||
/obj/item/modular_computer/pda/coroner
|
||||
name = "coroner PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/coroner"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#FAFAFA#000099#1f2026"
|
||||
starting_programs = list(
|
||||
@@ -224,6 +242,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/cargo
|
||||
name = "cargo technician PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/cargo"
|
||||
greyscale_colors = "#8b4c31#2c2e32"
|
||||
stored_paper = 20
|
||||
starting_programs = list(
|
||||
@@ -235,6 +254,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/shaftminer
|
||||
name = "shaft miner PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/shaftminer"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#927444#8b4c31#4c202d"
|
||||
starting_programs = list(
|
||||
@@ -243,6 +263,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/bitrunner
|
||||
name = "bit runner PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/bitrunner"
|
||||
greyscale_colors = "#D6B328#6BC906"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/arcade,
|
||||
@@ -255,6 +276,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/janitor
|
||||
name = "janitor PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/janitor"
|
||||
greyscale_colors = "#933ea8#235AB2"
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/skill_tracker,
|
||||
@@ -263,6 +285,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/chaplain
|
||||
name = "chaplain PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/chaplain"
|
||||
greyscale_config = /datum/greyscale_config/tablet/chaplain
|
||||
greyscale_colors = "#333333#D11818"
|
||||
|
||||
@@ -281,22 +304,27 @@
|
||||
|
||||
/obj/item/modular_computer/pda/botanist
|
||||
name = "botanist PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/botanist"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#50E193#E26F41#71A7CA"
|
||||
|
||||
/obj/item/modular_computer/pda/cook
|
||||
name = "cook PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/botanist"
|
||||
greyscale_colors = "#FAFAFA#A92323"
|
||||
|
||||
/obj/item/modular_computer/pda/bar
|
||||
name = "bartender PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/bar"
|
||||
greyscale_colors = "#333333#C7C7C7"
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
|
||||
/obj/item/modular_computer/pda/clown
|
||||
name = "clown PDA"
|
||||
inserted_disk = /obj/item/computer_disk/virus/clown
|
||||
icon = 'icons/obj/devices/modular_pda.dmi'
|
||||
icon_state = "pda-clown"
|
||||
post_init_icon_state = null
|
||||
inserted_disk = /obj/item/computer_disk/virus/clown
|
||||
greyscale_config = null
|
||||
greyscale_colors = null
|
||||
inserted_item = /obj/item/toy/crayon/rainbow
|
||||
@@ -339,6 +367,7 @@
|
||||
/obj/item/modular_computer/pda/mime
|
||||
name = "mime PDA"
|
||||
inserted_disk = /obj/item/computer_disk/virus/mime
|
||||
icon_state = "/obj/item/modular_computer/pda/mime"
|
||||
greyscale_config = /datum/greyscale_config/tablet/mime
|
||||
greyscale_colors = "#FAFAFA#EA3232"
|
||||
inserted_item = /obj/item/toy/crayon/mime
|
||||
@@ -355,9 +384,11 @@
|
||||
/obj/item/modular_computer/pda/curator
|
||||
name = "curator PDA"
|
||||
desc = "A small experimental microcomputer."
|
||||
icon = 'icons/obj/devices/modular_pda.dmi'
|
||||
icon_state = "pda-library"
|
||||
post_init_icon_state = null
|
||||
greyscale_config = null
|
||||
greyscale_colors = null
|
||||
icon_state = "pda-library"
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
long_ranged = TRUE
|
||||
starting_programs = list(
|
||||
@@ -372,6 +403,7 @@
|
||||
|
||||
/obj/item/modular_computer/pda/psychologist
|
||||
name = "psychologist PDA"
|
||||
icon_state = "/obj/item/modular_computer/pda/psychologist"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#333333#000099#3F96CC"
|
||||
starting_programs = list(
|
||||
@@ -384,6 +416,7 @@
|
||||
*/
|
||||
/obj/item/modular_computer/pda/assistant
|
||||
name = "assistant PDA"
|
||||
flags_1 = parent_type::flags_1 | NO_NEW_GAGS_PREVIEW_1
|
||||
starting_programs = list(
|
||||
/datum/computer_file/program/bounty_board,
|
||||
)
|
||||
@@ -407,7 +440,9 @@
|
||||
|
||||
/obj/item/modular_computer/pda/human_ai
|
||||
name = "modular interface"
|
||||
icon = 'icons/obj/devices/modular_pda.dmi'
|
||||
icon_state = "pda-silicon-human"
|
||||
post_init_icon_state = null
|
||||
base_icon_state = "pda-silicon-human"
|
||||
greyscale_config = null
|
||||
greyscale_colors = null
|
||||
@@ -451,7 +486,9 @@
|
||||
|
||||
/obj/item/modular_computer/pda/clear
|
||||
name = "clear PDA"
|
||||
icon = 'icons/obj/devices/modular_pda.dmi'
|
||||
icon_state = "pda-clear"
|
||||
post_init_icon_state = null
|
||||
greyscale_config = null
|
||||
greyscale_colors = null
|
||||
long_ranged = TRUE
|
||||
|
||||
Reference in New Issue
Block a user