From feaa27fff1491ca8cb1e73b0e34b978a2e3adb8f Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 23 Nov 2014 13:44:59 -0500 Subject: [PATCH] Cleans up monkey initialization --- code/__HELPERS/global_lists.dm | 2 +- code/modules/mob/living/carbon/monkey/monkey.dm | 12 ++---------- code/world.dm | 12 ++++++++++++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 0bc0cd986a..b4ae453e77 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -49,7 +49,7 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al /////Initial Building///// ////////////////////////// -/hook/startup/proc/makeDatumRefLists() +/proc/makeDatumRefLists() var/list/paths //Hair - Initialise all /datum/sprite_accessory/hair into an list indexed by hair-style name diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index d09d4fb4f9..876123542c 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -39,21 +39,13 @@ greaterform = "Unathi" uni_append = list(0x044,0xC5D) // 044C5D -/mob/living/carbon/monkey/initialize() - if (!species) - species = all_species[greaterform] - add_language(species.language) - /mob/living/carbon/monkey/New() var/datum/reagents/R = new/datum/reagents(1000) reagents = R R.my_atom = src - //Ensure that the all_species list has been initialized. - //If not then this must be round-start and initialize() will - //be called directly by the master controller, later. - if (ticker && ticker.current_state >= GAME_STATE_SETTING_UP) - initialize() + species = all_species[greaterform] + add_language(species.language) if(name == initial(name)) //To stop Pun-Pun becoming generic. name = "[name] ([rand(1, 1000)])" diff --git a/code/world.dm b/code/world.dm index 6cf0bb4f18..9515f33bb6 100644 --- a/code/world.dm +++ b/code/world.dm @@ -1,3 +1,15 @@ +var/global/datum/global_init/init = new () + +/* + Pre-map initialization stuff should go here. +*/ +/datum/global_init/New() + + makeDatumRefLists() + + del(src) + + /world mob = /mob/new_player turf = /turf/space