Remove drop_item, drop_item_v, put_in_hands_or_del

This commit is contained in:
Jordan Brown
2017-10-07 12:37:06 -05:00
committed by CitadelStationBot
parent 5f4b3594d0
commit 075cb673c0
152 changed files with 1778 additions and 425 deletions
@@ -846,9 +846,8 @@ Pass a positive integer as an argument to override a bot's default speed.
else if(allow_pai && !key)
if(!locked && !open)
if(card.pai && card.pai.mind)
if(!user.drop_item())
if(!user.transferItemToLoc(card, src))
return
card.forceMove(src)
paicard = card
user.visible_message("[user] inserts [card] into [src]!","<span class='notice'>You insert [card] into [src].</span>")
paicard.pai.mind.transfer_to(src)
@@ -223,10 +223,9 @@
if(!isnull(reagent_glass))
to_chat(user, "<span class='warning'>There is already a beaker loaded!</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(W, src))
return
W.loc = src
reagent_glass = W
to_chat(user, "<span class='notice'>You insert [W].</span>")
show_controls(user)
@@ -84,11 +84,9 @@
if(open)
on = FALSE
else if(istype(I, /obj/item/stock_parts/cell) && open && !cell)
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
var/obj/item/stock_parts/cell/C = I
C.loc = src
cell = C
cell = I
visible_message("[user] inserts a cell into [src].",
"<span class='notice'>You insert the new cell into [src].</span>")
else if(istype(I, /obj/item/crowbar) && open && cell)
@@ -174,7 +174,7 @@
usr.visible_message("[usr] pets [src].","<span class='notice'>You rest your hand on [src]'s back for a moment.</span>")
return
if(!usr.drop_item())
if(!usr.temporarilyRemoveItemFromInventory(item_to_add))
to_chat(usr, "<span class='warning'>\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s back!</span>")
return
@@ -189,7 +189,7 @@
if(!allowed)
to_chat(usr, "<span class='warning'>You set [item_to_add] on [src]'s back, but it falls off!</span>")
item_to_add.loc = loc
item_to_add.forceMove(drop_location())
if(prob(25))
step_rand(item_to_add)
for(var/i in list(1,2,4,8,4,8,4,dir))
@@ -197,8 +197,7 @@
sleep(1)
return
usr.drop_item()
item_to_add.loc = src
item_to_add.forceMove(src)
src.inventory_back = item_to_add
update_corgi_fluff()
regenerate_icons()
@@ -226,7 +225,7 @@
user.visible_message("[user] pets [src].","<span class='notice'>You rest your hand on [src]'s head for a moment.</span>")
return
if(user && !user.drop_item())
if(user && !user.temporarilyRemoveItemFromInventory(item_to_add))
to_chat(user, "<span class='warning'>\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s head!</span>")
return 0
@@ -243,13 +242,13 @@
user.visible_message("[user] puts [item_to_add] on [real_name]'s head. [src] looks at [user] and barks once.",
"<span class='notice'>You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags [p_their()] tail once and barks.</span>",
"<span class='italics'>You hear a friendly-sounding bark.</span>")
item_to_add.loc = src
item_to_add.forceMove(src)
src.inventory_head = item_to_add
update_corgi_fluff()
regenerate_icons()
else
to_chat(user, "<span class='warning'>You set [item_to_add] on [src]'s head, but it falls off!</span>")
item_to_add.loc = loc
item_to_add.forceMove(drop_location())
if(prob(25))
step_rand(item_to_add)
for(var/i in list(1,2,4,8,4,8,4,dir))
@@ -275,7 +275,6 @@
if(!stat && eggsleft < 8)
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
user.visible_message(feedmsg)
user.drop_item()
qdel(O)
eggsleft += rand(1, 4)
else
@@ -246,8 +246,8 @@
var/obj/item/device/radio/headset/headset_to_add = item_to_add
usr.drop_item()
headset_to_add.loc = src
if(!usr.transferItemToLoc(headset_to_add, src))
return
src.ears = headset_to_add
to_chat(usr, "<span class='notice'>You fit the headset onto [src].</span>")
@@ -340,7 +340,6 @@
drop_held_item(0)
else if(istype(O, /obj/item/reagent_containers/food/snacks/cracker)) //Poly wants a cracker.
qdel(O)
user.drop_item()
if(health < maxHealth)
adjustBruteLoss(-10)
speak_chance *= 1.27 // 20 crackers to go from 1% to 100%