mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-16 21:22:40 +00:00
Closet appearance decls correctly use the repository (#8154)
* Closet appearance decls correctly use the repository * GET_DECL
This commit is contained in:
@@ -25,9 +25,6 @@ var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
|
|||||||
|
|
||||||
var/list/mannequins_
|
var/list/mannequins_
|
||||||
|
|
||||||
// Closets have magic appearances
|
|
||||||
GLOBAL_LIST_EMPTY(closet_appearances)
|
|
||||||
|
|
||||||
// Times that players are allowed to respawn ("ckey" = world.time)
|
// Times that players are allowed to respawn ("ckey" = world.time)
|
||||||
GLOBAL_LIST_EMPTY(respawn_timers)
|
GLOBAL_LIST_EMPTY(respawn_timers)
|
||||||
|
|
||||||
@@ -218,9 +215,6 @@ var/global/list/string_slot_flags = list(
|
|||||||
for(var/alloytype in paths)
|
for(var/alloytype in paths)
|
||||||
GLOB.alloy_data += new alloytype()
|
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
|
paths = typesof(/datum/sprite_accessory/ears) - /datum/sprite_accessory/ears
|
||||||
for(var/path in paths)
|
for(var/path in paths)
|
||||||
var/obj/item/clothing/head/instance = new path()
|
var/obj/item/clothing/head/instance = new path()
|
||||||
|
|||||||
@@ -14,8 +14,7 @@
|
|||||||
// III. Thou shalt not write a decl that relies on arguments supplied to New().
|
// III. Thou shalt not write a decl that relies on arguments supplied to New().
|
||||||
// IV. Thou shalt not call Initialize() on a /decl.
|
// 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
|
/repository/decls
|
||||||
var/list/fetched_decls
|
var/list/fetched_decls
|
||||||
var/list/fetched_decl_types
|
var/list/fetched_decl_types
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
storage_capacity = content_size + 5
|
storage_capacity = content_size + 5
|
||||||
|
|
||||||
if(ispath(closet_appearance))
|
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)
|
if(app)
|
||||||
icon = app.icon
|
icon = app.icon
|
||||||
color = null
|
color = null
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ var/global/datum/global_init/init = new ()
|
|||||||
error_log = file("[log_path]-error.log")
|
error_log = file("[log_path]-error.log")
|
||||||
debug_log = file("[log_path]-debug.log")
|
debug_log = file("[log_path]-debug.log")
|
||||||
debug_log << "[log_end]\n[log_end]\nStarting up. [time_stamp()][log_end]\n---------------------[log_end]"
|
debug_log << "[log_end]\n[log_end]\nStarting up. [time_stamp()][log_end]\n---------------------[log_end]"
|
||||||
decls_repository = new()
|
|
||||||
load_configuration()
|
load_configuration()
|
||||||
makeDatumRefLists()
|
makeDatumRefLists()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user