From 6981ca52f46d720bdfae15f14567d921c3f98492 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 12 Jul 2014 10:35:31 +0930 Subject: [PATCH] Trying to fix the loadout spawn issue, at least this will make it more informative. --- code/game/jobs/job_controller.dm | 22 ++++++++++++++-------- code/modules/client/preferences_gear.dm | 3 +++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index c8be3a2351a..d0600b4cca9 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -377,6 +377,8 @@ var/global/datum/controller/occupations/job_master if(G.slot) H.equip_to_slot_or_del(new G.path(H), G.slot) + H << "\blue Equipping you with [thing]!" + else spawn_in_storage += thing @@ -462,15 +464,19 @@ var/global/datum/controller/occupations/job_master H.equip_to_slot_or_del(BPK, slot_back,1) //Deferred item spawning. - var/obj/item/weapon/storage/B = locate(/obj/item/weapon/storage/backpack) in H.contents + if(spawn_in_storage && spawn_in_storage.len) + var/obj/item/weapon/storage/B + for(var/obj/item/weapon/storage/S in H.contents) + B = S + break - if(isnull(B) || istype(B)) - B = locate(/obj/item/weapon/storage/box) in H.contents - - if(!isnull(B)) - for(var/thing in spawn_in_storage) - var/datum/gear/G = gear_datums[thing] - new G.path(B) + if(!isnull(B)) + for(var/thing in spawn_in_storage) + H << "\blue Placing [thing] in your [B]!" + var/datum/gear/G = gear_datums[thing] + new G.path(B) + else + H << "\red Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug." //TODO: Generalize this by-species if(H.species) diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index e8df54ddfd8..aee6547694a 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -367,6 +367,7 @@ proc/populate_gear_list() display_name = "engineering bandana" path = /obj/item/clothing/head/helmet/greenbandana/fluff/taryn_kifer_1 cost = 2 + slot = slot_head allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer") //Science @@ -381,12 +382,14 @@ proc/populate_gear_list() display_name = "Zhan-Khazan furs" path = /obj/item/clothing/suit/tajaran/furs cost = 3 + slot = slot_wear_suit whitelisted = "Tajaran" /datum/gear/zhan_scarf display_name = "Zhan-Khazan headscarf" path = /obj/item/clothing/head/tajaran/scarf cost = 2 + slot = slot_head whitelisted = "Tajaran" /datum/gear/unathi_robe