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:
Tad Hardesty
2018-01-13 03:35:54 -08:00
parent 2322156782
commit 7377951ae4
2 changed files with 3 additions and 10 deletions
+2 -9
View File
@@ -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))