Refactors posters to use decls (#8128)

* poster

* Moves decls_repo init forward

* Moves decl_repository init even further forwards
This commit is contained in:
Atermonera
2021-06-18 19:14:49 -07:00
committed by GitHub
parent a1327676d8
commit beaf109060
19 changed files with 356 additions and 410 deletions

View File

@@ -31,10 +31,6 @@ GLOBAL_LIST_EMPTY(closet_appearances)
// Times that players are allowed to respawn ("ckey" = world.time)
GLOBAL_LIST_EMPTY(respawn_timers)
// Posters
var/global/list/poster_designs = list()
var/global/list/NT_poster_designs = list()
// Holomaps
var/global/list/holomap_markers = list()
var/global/list/mapping_units = list()
@@ -212,18 +208,6 @@ var/global/list/string_slot_flags = list(
if(S.spawn_flags & SPECIES_IS_WHITELISTED)
GLOB.whitelisted_species += S.name
//Posters
paths = typesof(/datum/poster) - /datum/poster
paths -= typesof(/datum/poster/nanotrasen)
for(var/T in paths)
var/datum/poster/P = new T
poster_designs += P
paths = typesof(/datum/poster/nanotrasen)
for(var/T in paths)
var/datum/poster/P = new T
NT_poster_designs += P
//Ores
paths = typesof(/ore)-/ore
for(var/oretype in paths)
@@ -235,10 +219,7 @@ var/global/list/string_slot_flags = list(
GLOB.alloy_data += new alloytype()
//Closet appearances
paths = typesof(/decl/closet_appearance)
for(var/T in paths)
var/decl/closet_appearance/app = new T()
GLOB.closet_appearances[T] = app
GLOB.closet_appearances = decls_repository.get_decls_of_type(/decl/closet_appearance)
paths = typesof(/datum/sprite_accessory/ears) - /datum/sprite_accessory/ears
for(var/path in paths)