mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
* 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.
17 lines
554 B
Plaintext
17 lines
554 B
Plaintext
//I AM THE LOREMASTER, ARE YOU THE GATEKEEPER?
|
|
|
|
var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster
|
|
|
|
/datum/lore/loremaster
|
|
var/list/organizations = list()
|
|
|
|
/datum/lore/loremaster/New()
|
|
|
|
var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization
|
|
for(var/path in paths)
|
|
// 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
|