Trying to fix the loadout spawn issue, at least this will make it more informative.

This commit is contained in:
Zuhayr
2014-07-12 10:35:31 +09:30
parent 6632cf7be0
commit 6981ca52f4
2 changed files with 17 additions and 8 deletions

View File

@@ -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)

View File

@@ -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