stuff
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user