Files
vgstation13/code/controllers/subsystem/init/more_init_stuff.dm
I-VAPE-VOX-CLOACA-EVERY-DAY-OF-MY-LIFE 2edde95469 [done][needs test merge][waiting for test merge since 3 weeks ago] curb your roundend 2: curb harder: return of curb (#20333)
* Working proof of concept

* Seems to be fully functional, yet ugly

* Beats me

* Perfect layout

* Looks great now

* Clear credits correctly

* Actually fix the rejoin situation

* Credits work when rebooting world manually

* Comments the debug out until I make a proper verb for it

* Adds credits panel & slight refactors

* Adds images to credits

* Adds more disclaimers and episode names

* Names

* Fixes prespawned corpses in the credits

Celt is an idiot and this did not actually work
2018-12-02 16:30:27 -08:00

92 lines
3.5 KiB
Plaintext

var/datum/subsystem/more_init/SSmore_init
/datum/subsystem/more_init
name = "Uncategorized Init"
init_order = SS_INIT_MORE_INIT
flags = SS_NO_FIRE
/datum/subsystem/more_init/New()
NEW_SS_GLOBAL(SSmore_init)
/datum/subsystem/more_init/Initialize(timeofday)
setup_economy()
var/watch=start_watch()
log_startup_progress("Caching damage icons...")
cachedamageicons()
log_startup_progress(" Finished caching damage icons in [stop_watch(watch)]s.")
watch=start_watch()
log_startup_progress("Caching space parallax simulation...")
create_global_parallax_icons()
log_startup_progress(" Finished caching space parallax simulation in [stop_watch(watch)]s.")
if (!config.skip_minimap_generation)
watch=start_watch()
log_startup_progress("Generating holominimaps...")
generateHoloMinimaps()
log_startup_progress(" Finished holominimaps in [stop_watch(watch)]s.")
else
holomaps_initialized = 1 //Assume holominimaps were prerendered, the worst thing that happens if they're missing is that the minimap consoles don't show a minimap
log_startup_progress("Not generating holominimaps - SKIP_HOLOMINIMAP_GENERATION found in config/config.txt")
..()
buildcamlist()
if(config.media_base_url)
watch = start_watch()
log_startup_progress("Caching jukebox playlists...")
load_juke_playlists()
log_startup_progress(" Finished caching jukebox playlists in [stop_watch(watch)]s.")
..()
camera_sort(cameranet.cameras)
for (var/obj/machinery/computer/security/S in tv_monitors)
S.init_cams()
/datum/subsystem/more_init/proc/buildcamlist()
adv_camera.camerasbyzlevel = list()
for(var/key in adv_camera.zlevels)
adv_camera.camerasbyzlevel["[key]"] = list()
//camerasbyzlevel = list("1" = list(), "5" = list())
if(!istype(cameranet) || !istype(cameranet.cameras) || !cameranet.cameras.len)
world.log << "cameranet has not been initialized before us, finding cameras manually."
for(var/obj/machinery/camera/C in world) //can't use machines list because cameras are removed from it.
if(C.z == map.zMainStation || C.z == map.zAsteroid)
var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"]
ourlist += C
else
for(var/obj/machinery/camera/C in cameranet.cameras) //can't use machines list because cameras are removed from it.
if(C.z == map.zMainStation || C.z == map.zAsteroid)
var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"]
ourlist += C
for(var/key in adv_camera.camerasbyzlevel)
var/list/keylist = adv_camera.camerasbyzlevel[key]
world.log << "[key] has [keylist.len] entries"
adv_camera.initialized = 1
/datum/subsystem/more_init/proc/cachedamageicons()
var/mob/living/carbon/human/H = new(locate(1,1,2))
var/datum/species/list/slist = list(new /datum/species/human, new /datum/species/vox, new /datum/species/diona)
var/icon/DI
var/species_blood
for(var/datum/species/S in slist)
species_blood = (S.blood_color == DEFAULT_BLOOD ? "" : S.blood_color)
// testing("Generating [S], Blood([species_blood])")
for(var/datum/organ/external/O in H.organs)
//testing("[O] part")
for(var/brute = 1 to 3)
for(var/burn = 1 to 3)
var/damage_state = "[brute][burn]"
DI = icon('icons/mob/dam_human.dmi', "[damage_state]") // the damage icon for whole human
DI.Blend(icon('icons/mob/dam_mask.dmi', O.icon_name), ICON_MULTIPLY)
if(species_blood)
DI.Blend(S.blood_color, ICON_MULTIPLY)
//testing("Completed [damage_state]/[O.icon_name]/[species_blood]")
damage_icon_parts["[damage_state]/[O.icon_name]/[species_blood]"] = DI
spawn(1)
qdel(H)