mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Fix title screen selection skipping most files
Any filename with only one dot "." in it was being skipped. Turns out this is most filenames.
This commit is contained in:
@@ -26,19 +26,12 @@ SUBSYSTEM_DEF(title)
|
||||
if((L.len == 1 && L[1] != "blank.png")|| (L.len > 1 && ((use_rare_screens && lowertext(L[1]) == "rare") || (lowertext(L[1]) == lowertext(SSmapping.config.map_name)))))
|
||||
title_screens += S
|
||||
|
||||
for(var/S in title_screens)
|
||||
var/list/L = splittext(S,".")
|
||||
if(L.len != 2)
|
||||
continue
|
||||
title_screens -= S
|
||||
break
|
||||
|
||||
if(length(title_screens))
|
||||
file_path = "config/title_screens/images/[pick(title_screens)]"
|
||||
|
||||
|
||||
if(!file_path)
|
||||
file_path = "icons/default_title.dmi"
|
||||
|
||||
|
||||
ASSERT(fexists(file_path))
|
||||
|
||||
icon = new(fcopy_rsc(file_path))
|
||||
|
||||
Reference in New Issue
Block a user