Closet appearance decls correctly use the repository (#8154)

* Closet appearance decls correctly use the repository

* GET_DECL
This commit is contained in:
Atermonera
2021-06-27 22:45:23 -07:00
committed by GitHub
parent f97d1b884b
commit 671b5e7ea4
4 changed files with 2 additions and 10 deletions

View File

@@ -25,9 +25,6 @@ var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
var/list/mannequins_
// Closets have magic appearances
GLOBAL_LIST_EMPTY(closet_appearances)
// Times that players are allowed to respawn ("ckey" = world.time)
GLOBAL_LIST_EMPTY(respawn_timers)
@@ -218,9 +215,6 @@ var/global/list/string_slot_flags = list(
for(var/alloytype in paths)
GLOB.alloy_data += new alloytype()
//Closet appearances
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)
var/obj/item/clothing/head/instance = new path()

View File

@@ -14,8 +14,7 @@
// III. Thou shalt not write a decl that relies on arguments supplied to New().
// IV. Thou shalt not call Initialize() on a /decl.
var/repository/decls/decls_repository // Initialiozed in /datum/global_init/New()
var/repository/decls/decls_repository = new()
/repository/decls
var/list/fetched_decls
var/list/fetched_decl_types

View File

@@ -59,7 +59,7 @@
storage_capacity = content_size + 5
if(ispath(closet_appearance))
var/decl/closet_appearance/app = GLOB.closet_appearances[closet_appearance]
var/decl/closet_appearance/app = GET_DECL(closet_appearance)
if(app)
icon = app.icon
color = null

View File

@@ -21,7 +21,6 @@ var/global/datum/global_init/init = new ()
error_log = file("[log_path]-error.log")
debug_log = file("[log_path]-debug.log")
debug_log << "[log_end]\n[log_end]\nStarting up. [time_stamp()][log_end]\n---------------------[log_end]"
decls_repository = new()
load_configuration()
makeDatumRefLists()