mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-29 03:32:28 +00:00
* Adds the check components * Adds in trailing newlines * Converts all CRLF to LF * Post merge EOF * Post merge line endings * Final commit
34 lines
957 B
Plaintext
34 lines
957 B
Plaintext
/hook/startup/proc/setup_title_screen()
|
|
var/list/provisional_title_screens = flist("config/title_screens/images/")
|
|
var/list/title_screens = list()
|
|
var/use_rare_screens = prob(1)
|
|
|
|
for(var/S in provisional_title_screens)
|
|
var/list/L = splittext(S,"+")
|
|
if(L.len == 1 && L[1] != "blank.png")
|
|
title_screens += S
|
|
|
|
else if(L.len > 1)
|
|
if(use_rare_screens && lowertext(L[1]) == "rare")
|
|
title_screens += S
|
|
else if(using_map && (lowertext(L[1]) == lowertext(using_map.name)))
|
|
title_screens += S
|
|
|
|
if(!isemptylist(title_screens))
|
|
if(length(title_screens) > 1)
|
|
for(var/S in title_screens)
|
|
var/list/L = splittext(S,".")
|
|
if(L.len != 2 || L[1] != "default")
|
|
continue
|
|
title_screens -= S
|
|
break
|
|
|
|
var/file_path = "config/title_screens/images/[pick(title_screens)]"
|
|
|
|
var/icon/icon = new(fcopy_rsc(file_path))
|
|
|
|
for(var/turf/unsimulated/wall/splashscreen/splash in world)
|
|
splash.icon = icon
|
|
return TRUE
|
|
return FALSE
|