From d15b0b96060dcb58ed12da836d013aedbb77a8fa Mon Sep 17 00:00:00 2001 From: kevinz000 Date: Sun, 14 May 2017 14:00:51 -0700 Subject: [PATCH] stuff --- code/citadel/custom_loadout/load_to_mob.dm | 27 +++++++++++-------- code/citadel/custom_loadout/read_from_file.dm | 4 ++- code/modules/jobs/job_types/job.dm | 2 ++ .../modules/mob/dead/new_player/new_player.dm | 10 +++---- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/code/citadel/custom_loadout/load_to_mob.dm b/code/citadel/custom_loadout/load_to_mob.dm index 336f2a4630..830c1a4171 100644 --- a/code/citadel/custom_loadout/load_to_mob.dm +++ b/code/citadel/custom_loadout/load_to_mob.dm @@ -48,15 +48,20 @@ var/path = text2path(item) if(!path) continue - var/atom/movable/loaded_atom = new path - if(!istype(loaded_atom)) - QDEL_NULL(loaded_atom) - continue - if(!istype(loaded_atom, /obj/item)) - loaded_atom.forceMove(T) - continue - var/obj/item/loaded = loaded_atom - if(!loaded.equip_to_best_slot(H, TRUE)) - if(!H.put_in_hands(loaded)) - loaded.forceMove(T) + var/amount = itemlist[item] + for(var/i in 1 to amount) + var/atom/movable/loaded_atom = new path + if(!istype(loaded_atom)) + QDEL_NULL(loaded_atom) + continue + if(!istype(loaded_atom, /obj/item)) + loaded_atom.forceMove(T) + continue + var/obj/item/loaded = loaded_atom + var/obj/item/weapon/storage/S = H.get_item_by_slot(slot_back) + if(istype(S)) + S.handle_item_insertion(loaded, TRUE, H) //Force it into their backpack + continue + if(!H.put_in_hands(loaded)) //They don't have one/somehow that failed, put it in their hands + loaded.forceMove(T) //Guess we're just dumping it on the floor! return TRUE diff --git a/code/citadel/custom_loadout/read_from_file.dm b/code/citadel/custom_loadout/read_from_file.dm index fc37f6e7e8..8dc7eb29f2 100644 --- a/code/citadel/custom_loadout/read_from_file.dm +++ b/code/citadel/custom_loadout/read_from_file.dm @@ -21,9 +21,11 @@ GLOBAL_LIST(custom_item_list) //Assoc list in form of ckey = delimited paramlist GLOB.custom_item_list[key] = list() var/list/item_separation = splittext(items, ";") for(var/item_string in item_separation) + world << "itemstring [item_string]" var/list/amount_separation = splittext(item_string, "=") + world << "separated [item_string] == [english_list(amount_separation)]" var/path_to_item = amount_separation[1] - if(!ispath(path_to_item)) + if(!ispath(text2path(path_to_item))) GLOB.custom_item_list[key] += "ERROR" var/amount_of_item = amount_separation[2] if(!amount_of_item) diff --git a/code/modules/jobs/job_types/job.dm b/code/modules/jobs/job_types/job.dm index 4d5d4eb80c..9b5876c239 100644 --- a/code/modules/jobs/job_types/job.dm +++ b/code/modules/jobs/job_types/job.dm @@ -75,6 +75,8 @@ H.dna.features["ears"] = "None" H.regenerate_icons() + handle_roundstart_items(H) + /datum/job/proc/get_access() if(!config) //Needed for robots. return src.minimal_access.Copy() diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index e3943d07e6..4effac371d 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -24,10 +24,10 @@ loc = pick(GLOB.newplayer_start) else loc = locate(1,1,1) - . = ..() - -/mob/dead/new_player/prepare_huds() - return + . = ..() + +/mob/dead/new_player/prepare_huds() + return /mob/dead/new_player/proc/new_player_panel() @@ -146,7 +146,7 @@ return 1 if(href_list["late_join"]) - if(!SSticker || !SSticker.IsRoundInProgress()) + if(!SSticker || !SSticker.IsRoundInProgress()) to_chat(usr, "The round is either not ready, or has already finished...") return