NODROP flag addition & handling

- Purges canremove
- Implements functionality for NODROP flag, replaces canremove
- Refactors mob inventory unequipping.
This commit is contained in:
DZD
2015-02-18 13:22:41 -05:00
parent 723dc2ad98
commit fbd9c367c0
128 changed files with 618 additions and 659 deletions
+3 -3
View File
@@ -440,7 +440,7 @@
usr << browse(null, "window=chemmaster")
usr.unset_machine()
return
if (href_list["print_p"])
if (!(src.printing))
src.printing = 1
@@ -465,7 +465,7 @@
P.info += "<br><br><b>Notes:</b><br>"
P.name = "Chemical Analysis - [href_list["name"]]"
src.printing = null
if(beaker)
var/datum/reagents/R = beaker:reagents
if (href_list["analyze"])
@@ -1069,7 +1069,7 @@
user << "Cannot refine into a reagent."
return 1
user.before_take_item(O)
user.unEquip(O)
O.loc = src
holdingitems += O
src.updateUsrDialog()
@@ -22,7 +22,7 @@
if(M == usr)
usr << "<span class='notice'>You finish eating \the [src].</span>"
usr.visible_message("<span class='notice'>[usr] finishes eating \the [src].</span>")
usr.drop_from_inventory(src) //so icons update :[
usr.unEquip(src) //so icons update :[
if(trash)
if(ispath(trash,/obj/item))
@@ -39,7 +39,7 @@
/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone)
if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
user << "\red None of [src] left, oh no!"
M.drop_from_inventory(src) //so icons update :[
M.unEquip(src) //so icons update :[
del(src)
return 0
@@ -194,7 +194,7 @@
if(!iscarbon(user))
return 1
user << "\red You slip [W] inside [src]."
user.u_equip(W)
user.unEquip(W)
if ((user.client && user.s_active != src))
user.client.screen -= W
W.dropped(user)
@@ -241,7 +241,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/weapon/rollingpaper))
user.u_equip(W)
user.unEquip(W)
var/obj/item/clothing/mask/cigarette/joint/J = new /obj/item/clothing/mask/cigarette/joint(user.loc)
J.chem_volume = src.reagents.total_volume
src.reagents.trans_to(J, J.chem_volume)
@@ -264,7 +264,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/weapon/rollingpaper))
user.u_equip(W)
user.unEquip(W)
var/obj/item/clothing/mask/cigarette/joint/deus/J = new /obj/item/clothing/mask/cigarette/joint/deus(user.loc)
J.chem_volume = src.reagents.total_volume
src.reagents.trans_to(J, J.chem_volume)
@@ -298,7 +298,7 @@
␍ user << "You add [D] to [src]."
␍ del(D)
␍ user.put_in_hands(new /obj/item/weapon/bucket_sensor)
␍ user.drop_from_inventory(src)
␍ user.unEquip(src)
␍ del(src)
␍/obj/item/weapon/reagent_containers/glass/beaker/vial
@@ -27,7 +27,7 @@
return
M << "\blue You swallow [src]."
M.drop_from_inventory(src) //icon update
M.unEquip(src) //icon update
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
@@ -49,7 +49,7 @@
if(!do_mob(user, M)) return
user.drop_from_inventory(src) //icon update
user.unEquip(src) //icon update
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] forces [M] to swallow [src].", 1)
@@ -195,7 +195,7 @@
New()
..()
reagents.add_reagent("paroxetine", 15)
/obj/item/weapon/reagent_containers/pill/inaprovaline
name = "Inaprovaline pill"
desc = "Used to stabilize patients."
@@ -294,7 +294,7 @@
if (target != user && target.getarmor(target_zone, "melee") > 5 && prob(50))
for(var/mob/O in viewers(world.view, user))
O.show_message(text("\red <B>[user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!</B>"), 1)
user.u_equip(src)
user.unEquip(src)
del(src)
return