Files
DGamerL bad8b31afa Changes all .len to length() where applicable (#25174)
* Globals work

* Double access works

* All other things

* Revert "All other things"

This reverts commit 6574442eb6.

* More changes that compile and work

* IT WORKS AAAAAA

* Changes even more .len to length()

* Apply suggestions from code review

* Update code/datums/mind.dm

* Update code/__HELPERS/sorts/InsertSort.dm

Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>

* Update code/__HELPERS/sanitize_values.dm

Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>

---------

Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
2024-04-19 17:32:09 +00:00

37 lines
1.1 KiB
Plaintext

SUBSYSTEM_DEF(title)
name = "Title Screen"
flags = SS_NO_FIRE
init_order = INIT_ORDER_TITLE
/datum/controller/subsystem/title/Initialize()
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(length(L) == 1 && L[1] != "blank.png")
title_screens += S
else if(length(L) > 1)
if(use_rare_screens && lowertext(L[1]) == "rare")
title_screens += S
if(!isemptylist(title_screens))
if(length(title_screens) > 1)
for(var/S in title_screens)
var/list/L = splittext(S,".")
if(length(L) != 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))
GLOB.title_splash.icon = icon
// Below operations are needed to centrally place the new splashscreen on the lobby area
GLOB.title_splash.pixel_x = -((icon.Width() - world.icon_size) / 2)
GLOB.title_splash.pixel_y = -((icon.Height() - world.icon_size) / 2)