From 75e9f619fa32b8d6e2ccc7429161b7c43fa5ed0e Mon Sep 17 00:00:00 2001 From: Leshana Date: Mon, 15 May 2017 23:14:34 -0400 Subject: [PATCH] Fix runtime in air_traffic.dm due to bad organizations in loremaster. * Loremaster was loading all subtypes of /datum/lore/organization, but some intermediate subtypes are never meant to be used (such as /datum/lore/organization/mil) * These intermediate subtypes have no names, and no ship_prefixes, so crash the ATC. * Fix by not loading ones not meant to be loaded. Detected by checking if they have a non-null name. --- code/modules/busy_space/loremaster.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/busy_space/loremaster.dm b/code/modules/busy_space/loremaster.dm index 30bd04402d..28dca0055b 100644 --- a/code/modules/busy_space/loremaster.dm +++ b/code/modules/busy_space/loremaster.dm @@ -9,5 +9,8 @@ var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization for(var/path in paths) - var/datum/lore/organization/instance = new path() - organizations[path] = instance \ No newline at end of file + // Some intermediate paths are not real organizations (ex. /datum/lore/organization/mil). Only do ones with names + var/datum/lore/organization/instance = path + if(initial(instance.name)) + instance = new path() + organizations[path] = instance