Files
Bubberstation/code/__HELPERS/global_lists.dm
GoldenAlpharex 90f19bed3c Fixed the screenshot tests, fixing a bunch of prefs menu species preview icons along the way (#14528)
* Fixes the MODsuit-related screenshot tests

* Fixes eye sprites not refreshing properly when they're meant to

* Fixed outfits calling too many update procs and pre/post_equip twice because of some silly code

* Fixes glass golems not being transparent

* Fixed the map compilation errors

* Added the screenshot for the vox primalis

* Updates the colors of the moth bodyparts to be easier to work with (making them whiter)

* Fixes the antag icon for blood brothers

* Fixes nightmares looking stupid in their antag icon and also failing the screenshot test

* Fixes the humanoid screenshot

* Updated the blood brother icon with the new colors for moths (because ours are greyscaled)

* Updates some of the randomization stuff for moths, making it possibly functional again

* Cleans up our moth species override a bit

* Updates the screenshot_humanoids test to allow for better control over the screenshots

* Updated the lizard, ashwalker and silverscale screenshots

* I totally didn't forget the .dm

* Moved the set_species before the prepare_human_for_preview()

* The moth's fixed, by the way! In the prefs menu too!

* The xenos are fixed too!

* Pink felinids, how 'bout that?

* Fixed the mush people (so they actually look like the icon that was there already!)

* Snails are fixed too, splitting the .dmi edit in a different commit

* Added https://github.com/tgstation/tgstation/pull/68013 early

* Revert "Fixed the map compilation errors"

This reverts commit b7db0a1f507ed3721d88883338508c058ffb7804.

* Okay just Icebox this time

* Podpeople hair still is broken :(

* Turns out they weren't getting their snouts and frills properly... Now they do!

* Possibly fixes that issue with Tram making compile maps fail
2022-06-27 15:42:43 -07:00

161 lines
6.7 KiB
Plaintext

//////////////////////////
/////Initial Building/////
//////////////////////////
/proc/make_datum_references_lists()
//hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hairstyles_list, GLOB.hairstyles_male_list, GLOB.hairstyles_female_list)
//facial hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hairstyles_list, GLOB.facial_hairstyles_male_list, GLOB.facial_hairstyles_female_list)
//underwear
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
//undershirt
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
//socks
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
//bodypart accessories (blizzard intensifies)
//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION
/*
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails, GLOB.tails_list, add_blank = TRUE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human, add_blank = TRUE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard, add_blank = TRUE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns,GLOB.horns_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, GLOB.wings_open_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, GLOB.animated_spines_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae, GLOB.moth_antennae_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings, GLOB.moth_markings_list)
*/ //SKYRAT EDIT REMOVAL END
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings/moth, GLOB.moth_wings_list) // SKYRAT EDIT ADDITION - Customization
init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, GLOB.pod_hair_list)
//SKYRAT EDIT ADDITION BEGIN
//Scream types
for(var/spath in subtypesof(/datum/scream_type))
var/datum/scream_type/S = new spath()
GLOB.scream_types[S.name] = spath
sort_list(GLOB.scream_types, /proc/cmp_typepaths_asc)
//Laugh types
for(var/spath in subtypesof(/datum/laugh_type))
var/datum/laugh_type/L = new spath()
GLOB.laugh_types[L.name] = spath
sort_list(GLOB.laugh_types, /proc/cmp_typepaths_asc)
//SKYRAT EDIT END
//Species
for(var/spath in subtypesof(/datum/species))
var/datum/species/S = new spath()
GLOB.species_list[S.id] = spath
sort_list(GLOB.species_list, /proc/cmp_typepaths_asc)
//Surgeries
for(var/path in subtypesof(/datum/surgery))
GLOB.surgeries_list += new path()
sort_list(GLOB.surgeries_list, /proc/cmp_typepaths_asc)
// Hair Gradients - Initialise all /datum/sprite_accessory/hair_gradient into an list indexed by gradient-style name
for(var/path in subtypesof(/datum/sprite_accessory/gradient))
var/datum/sprite_accessory/gradient/gradient = new path()
if(gradient.gradient_category & GRADIENT_APPLIES_TO_HAIR)
GLOB.hair_gradients_list[gradient.name] = gradient
if(gradient.gradient_category & GRADIENT_APPLIES_TO_FACIAL_HAIR)
GLOB.facial_hair_gradients_list[gradient.name] = gradient
// Keybindings
init_keybindings()
GLOB.emote_list = init_emote_list()
make_skyrat_datum_references() //SKYRAT EDIT ADDITION - CUSTOMIZATION
init_crafting_recipes(GLOB.crafting_recipes)
/// Inits the crafting recipe list, sorting crafting recipe requirements in the process.
/proc/init_crafting_recipes(list/crafting_recipes)
for(var/path in subtypesof(/datum/crafting_recipe))
var/datum/crafting_recipe/recipe = new path()
recipe.reqs = sort_list(recipe.reqs, /proc/cmp_crafting_req_priority)
crafting_recipes += recipe
return crafting_recipes
//creates every subtype of prototype (excluding prototype) and adds it to list L.
//if no list/L is provided, one is created.
/proc/init_subtypes(prototype, list/L)
if(!istype(L))
L = list()
for(var/path in subtypesof(prototype))
L += new path()
return L
//returns a list of paths to every subtype of prototype (excluding prototype)
//if no list/L is provided, one is created.
/proc/init_paths(prototype, list/L)
if(!istype(L))
L = list()
for(var/path in subtypesof(prototype))
L+= path
return L
/// Functions like init_subtypes, but uses the subtype's path as a key for easy access
/proc/init_subtypes_w_path_keys(prototype, list/L)
if(!istype(L))
L = list()
for(var/path as anything in subtypesof(prototype))
L[path] = new path()
return L
/**
* Checks if that loc and dir has an item on the wall
**/
// Wall mounted machinery which are visually on the wall.
GLOBAL_LIST_INIT(WALLITEMS_INTERIOR, typecacheof(list(
/obj/item/radio/intercom,
/obj/item/storage/secure/safe,
/obj/machinery/airalarm,
/obj/machinery/bluespace_vendor,
/obj/machinery/newscaster,
/obj/machinery/button,
/obj/machinery/computer/security/telescreen,
/obj/machinery/computer/security/telescreen/entertainment,
/obj/machinery/defibrillator_mount,
/obj/machinery/door_timer,
/obj/machinery/embedded_controller/radio/simple_vent_controller,
/obj/machinery/firealarm,
/obj/machinery/flasher,
/obj/machinery/keycard_auth,
/obj/machinery/light_switch,
/obj/machinery/newscaster,
/obj/machinery/power/apc,
/obj/machinery/requests_console,
/obj/machinery/status_display,
/obj/machinery/ticket_machine,
/obj/machinery/turretid,
/obj/structure/extinguisher_cabinet,
/obj/structure/fireaxecabinet,
/obj/structure/mirror,
/obj/structure/noticeboard,
/obj/structure/reagent_dispensers/wall,
/obj/structure/sign,
/obj/structure/sign/picture_frame,
/obj/structure/sign/poster/random,
/obj/structure/sign/poster/contraband/random,
/obj/structure/sign/poster/official/random,
)))
// Wall mounted machinery which are visually coming out of the wall.
// These do not conflict with machinery which are visually placed on the wall.
GLOBAL_LIST_INIT(WALLITEMS_EXTERIOR, typecacheof(list(
/obj/machinery/camera,
/obj/machinery/light,
/obj/structure/camera_assembly,
/obj/structure/light_construct
)))