From 7377951ae40cfdf7698b4055251bb101a0ff6b40 Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Sat, 13 Jan 2018 03:33:22 -0800 Subject: [PATCH] Fix title screen selection skipping most files Any filename with only one dot "." in it was being skipped. Turns out this is most filenames. --- code/controllers/subsystem/title.dm | 11 ++--------- tgstation.dme | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/code/controllers/subsystem/title.dm b/code/controllers/subsystem/title.dm index 4cdde58d330..6445ea2fbc1 100644 --- a/code/controllers/subsystem/title.dm +++ b/code/controllers/subsystem/title.dm @@ -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)) diff --git a/tgstation.dme b/tgstation.dme index e9861942155..7776590369f 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -40,7 +40,6 @@ #include "code\__DEFINES\flags.dm" #include "code\__DEFINES\food.dm" #include "code\__DEFINES\forensics.dm" -#include "code\__HELPERS\heap.dm" #include "code\__DEFINES\hud.dm" #include "code\__DEFINES\integrated_electronics.dm" #include "code\__DEFINES\inventory.dm" @@ -97,6 +96,7 @@ #include "code\__HELPERS\files.dm" #include "code\__HELPERS\game.dm" #include "code\__HELPERS\global_lists.dm" +#include "code\__HELPERS\heap.dm" #include "code\__HELPERS\icon_smoothing.dm" #include "code\__HELPERS\icons.dm" #include "code\__HELPERS\level_traits.dm"