Merge pull request #2275 from Crazylemon64/no_giving_nodrops

Fixes putting NODROP items onto humans
This commit is contained in:
Mark van Alphen
2015-10-04 02:50:18 +02:00
4 changed files with 14 additions and 6 deletions

View File

@@ -725,9 +725,9 @@
unEquip(pocket_item)
usr.put_in_hands(pocket_item)
else
if(place_item)
if(place_item && !(place_item.flags & NODROP))
usr.unEquip(place_item)
equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
// Update strip window
if(usr.machine == src && in_range(src, usr))
@@ -1786,4 +1786,4 @@
/mob/living/carbon/human/proc/get_full_print()
if(!dna || !dna.uni_identity)
return
return md5(dna.uni_identity)
return md5(dna.uni_identity)

View File

@@ -362,6 +362,10 @@
/obj/effect/equip_e/human/process()
if (item)
item.add_fingerprint(source)
if (item.flags & NODROP)
source << "<span class='warning'>\The [item] is stuck to you!</span>"
qdel(src)
return
else
switch(place)
if("mask")

View File

@@ -129,6 +129,9 @@
switch(remove_from)
if("head")
if(inventory_head)
if(inventory_head.flags & NODROP)
usr << "<span = 'warning'>\The [inventory_head] is stuck too hard to [src] for you to remove!</span>"
return
name = real_name
desc = initial(desc)
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
@@ -145,6 +148,9 @@
return
if("back")
if(inventory_back)
if(inventory_back.flags & NODROP)
usr << "<span = 'warning'>\The [inventory_back] is stuck too hard to [src] for you to remove!</span>"
return
inventory_back.loc = src.loc
inventory_back = null
regenerate_icons()
@@ -669,4 +675,4 @@
s.start()
respawnable_list += src
qdel(src)
return
return

View File

@@ -792,8 +792,6 @@ var/list/slot_equipment_priority = list( \
if(href_list["flavor_change"])
update_flavor_text()
// ..()
return