mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Merge pull request #7166 from tigercat2000/title_screens
Serverside titlescreen icons.
This commit is contained in:
@@ -16,10 +16,10 @@
|
||||
icon = 'icons/obj/doors/Doorele.dmi'
|
||||
icon_state = "door_closed"
|
||||
|
||||
turf/unsimulated/wall/splashscreen
|
||||
/turf/unsimulated/wall/splashscreen
|
||||
name = "Space Station 13"
|
||||
icon = 'icons/misc/fullscreen.dmi'
|
||||
icon_state = "title"
|
||||
icon = 'config/title_screens/images/blank.png'
|
||||
icon_state = ""
|
||||
layer = FLY_LAYER
|
||||
|
||||
/turf/unsimulated/wall/other
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/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(lowertext(L[1]) == lowertext(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
|
||||
Reference in New Issue
Block a user