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
+2 -2
View File
@@ -23,10 +23,10 @@
if(!M.restrained() && !M.stat)
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)
+8 -8
View File
@@ -39,7 +39,7 @@
..()
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
spawn(2)
update_icon()
updateinfolinks()
@@ -293,7 +293,7 @@
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
if(user.get_inactive_hand() == src)
user.drop_from_inventory(src)
user.unEquip(src)
new /obj/effect/decal/cleanable/ash(get_turf(src))
del(src)
@@ -366,29 +366,29 @@
B.name = name
else if (P.name != "paper" && P.name != "photo")
B.name = P.name
user.drop_from_inventory(P)
user.unEquip(P)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/h_user = user
if (h_user.r_hand == src)
h_user.drop_from_inventory(src)
h_user.unEquip(src)
h_user.put_in_r_hand(B)
else if (h_user.l_hand == src)
h_user.drop_from_inventory(src)
h_user.unEquip(src)
h_user.put_in_l_hand(B)
else if (h_user.l_store == src)
h_user.drop_from_inventory(src)
h_user.unEquip(src)
B.loc = h_user
B.layer = 20
h_user.l_store = B
h_user.update_inv_pockets()
else if (h_user.r_store == src)
h_user.drop_from_inventory(src)
h_user.unEquip(src)
B.loc = h_user
B.layer = 20
h_user.r_store = B
h_user.update_inv_pockets()
else if (h_user.head == src)
h_user.u_equip(src)
h_user.unEquip(src)
h_user.put_in_hands(B)
else if (!istype(src.loc, /turf))
src.loc = get_turf(h_user)
+6 -6
View File
@@ -32,7 +32,7 @@
if(screen == 2)
screen = 1
user << "<span class='notice'>You add [(P.name == "paper") ? "the paper" : P.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
user.drop_from_inventory(P)
user.unEquip(P)
P.loc = src
if(istype(user,/mob/living/carbon/human))
user:update_inv_l_hand()
@@ -42,12 +42,12 @@
if(screen == 2)
screen = 1
user << "<span class='notice'>You add [(W.name == "photo") ? "the photo" : W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
user.drop_from_inventory(W)
user.unEquip(W)
W.loc = src
else if(istype(W, /obj/item/weapon/lighter))
burnpaper(W, user)
else if(istype(W, /obj/item/weapon/paper_bundle))
user.drop_from_inventory(W)
user.unEquip(W)
for(var/obj/O in W)
O.loc = src
O.add_fingerprint(usr)
@@ -85,7 +85,7 @@
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
if(user.get_inactive_hand() == src)
user.drop_from_inventory(src)
user.unEquip(src)
new /obj/effect/decal/cleanable/ash(get_turf(src))
del(src)
@@ -166,7 +166,7 @@
usr << "<span class='notice'>You remove the [W.name] from the bundle.</span>"
if(amount == 1)
var/obj/item/weapon/paper/P = src[1]
usr.drop_from_inventory(src)
usr.unEquip(src)
usr.put_in_hands(P)
del(src)
else if(page == amount)
@@ -206,7 +206,7 @@
O.loc = usr.loc
O.layer = initial(O.layer)
O.add_fingerprint(usr)
usr.drop_from_inventory(src)
usr.unEquip(src)
del(src)
return
+3 -3
View File
@@ -61,7 +61,7 @@
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
if(user.get_inactive_hand() == src)
user.drop_from_inventory(src)
user.unEquip(src)
new /obj/effect/decal/cleanable/ash(get_turf(src))
del(src)
@@ -118,10 +118,10 @@
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)
return