This commit is contained in:
kevinz000
2017-05-14 14:00:51 -07:00
parent 25024432fe
commit d15b0b9606
4 changed files with 26 additions and 17 deletions
+16 -11
View File
@@ -48,15 +48,20 @@
var/path = text2path(item) var/path = text2path(item)
if(!path) if(!path)
continue continue
var/atom/movable/loaded_atom = new path var/amount = itemlist[item]
if(!istype(loaded_atom)) for(var/i in 1 to amount)
QDEL_NULL(loaded_atom) var/atom/movable/loaded_atom = new path
continue if(!istype(loaded_atom))
if(!istype(loaded_atom, /obj/item)) QDEL_NULL(loaded_atom)
loaded_atom.forceMove(T) continue
continue if(!istype(loaded_atom, /obj/item))
var/obj/item/loaded = loaded_atom loaded_atom.forceMove(T)
if(!loaded.equip_to_best_slot(H, TRUE)) continue
if(!H.put_in_hands(loaded)) var/obj/item/loaded = loaded_atom
loaded.forceMove(T) 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 return TRUE
@@ -21,9 +21,11 @@ GLOBAL_LIST(custom_item_list) //Assoc list in form of ckey = delimited paramlist
GLOB.custom_item_list[key] = list() GLOB.custom_item_list[key] = list()
var/list/item_separation = splittext(items, ";") var/list/item_separation = splittext(items, ";")
for(var/item_string in item_separation) for(var/item_string in item_separation)
world << "itemstring [item_string]"
var/list/amount_separation = splittext(item_string, "=") var/list/amount_separation = splittext(item_string, "=")
world << "separated [item_string] == [english_list(amount_separation)]"
var/path_to_item = amount_separation[1] var/path_to_item = amount_separation[1]
if(!ispath(path_to_item)) if(!ispath(text2path(path_to_item)))
GLOB.custom_item_list[key] += "ERROR" GLOB.custom_item_list[key] += "ERROR"
var/amount_of_item = amount_separation[2] var/amount_of_item = amount_separation[2]
if(!amount_of_item) if(!amount_of_item)
+2
View File
@@ -75,6 +75,8 @@
H.dna.features["ears"] = "None" H.dna.features["ears"] = "None"
H.regenerate_icons() H.regenerate_icons()
handle_roundstart_items(H)
/datum/job/proc/get_access() /datum/job/proc/get_access()
if(!config) //Needed for robots. if(!config) //Needed for robots.
return src.minimal_access.Copy() return src.minimal_access.Copy()
@@ -24,10 +24,10 @@
loc = pick(GLOB.newplayer_start) loc = pick(GLOB.newplayer_start)
else else
loc = locate(1,1,1) loc = locate(1,1,1)
. = ..() . = ..()
/mob/dead/new_player/prepare_huds() /mob/dead/new_player/prepare_huds()
return return
/mob/dead/new_player/proc/new_player_panel() /mob/dead/new_player/proc/new_player_panel()
@@ -146,7 +146,7 @@
return 1 return 1
if(href_list["late_join"]) if(href_list["late_join"])
if(!SSticker || !SSticker.IsRoundInProgress()) if(!SSticker || !SSticker.IsRoundInProgress())
to_chat(usr, "<span class='danger'>The round is either not ready, or has already finished...</span>") to_chat(usr, "<span class='danger'>The round is either not ready, or has already finished...</span>")
return return