Merge pull request #3208 from Citadel-Station-13/upstream-merge-31386

[MIRROR] Remove drop_item, drop_item_v, put_in_hands_or_del
This commit is contained in:
LetterJay
2017-10-08 16:18:18 -04:00
committed by GitHub
154 changed files with 2047 additions and 2234 deletions
+1 -1
View File
@@ -90,7 +90,7 @@
if("healing")
M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(null))
M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/forcewall(null))
M.put_in_hands_or_del(new /obj/item/gun/magic/staff/healing(M))
M.put_in_hands(new /obj/item/gun/magic/staff/healing(M), TRUE)
to_chat(M, "<B>Your service has not gone unrewarded, however. Studying under [wizard_name], you have learned livesaving survival spells. You are able to cast charge and forcewall.")
if("robeless")
M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
@@ -37,8 +37,9 @@
return 1
/obj/effect/proc_holder/changeling/weapon/sting_action(mob/living/user)
if(!user.drop_item())
to_chat(user, "<span class='warning'>The [user.get_active_held_item()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!</span>")
var/obj/item/held = user.get_active_held_item()
if(held && !user.dropItemToGround(held))
to_chat(user, "<span class='warning'>[held] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!</span>")
return
var/limb_regen = 0
if(user.active_hand_index % 2 == 0) //we regen the arm before changing it into the weapon
@@ -338,7 +339,7 @@
if(INTENT_DISARM)
var/obj/item/I = C.get_active_held_item()
if(I)
if(C.drop_item())
if(C.dropItemToGround(I))
C.visible_message("<span class='danger'>[I] is yanked off [C]'s hand by [src]!</span>","<span class='userdanger'>A tentacle pulls [I] away from you!</span>")
on_hit(I) //grab the item as if you had hit it directly with the tentacle
return 1
@@ -127,8 +127,9 @@
/obj/effect/proc_holder/changeling/sting/false_armblade/sting_action(mob/user, mob/target)
add_logs(user, target, "stung", object="falso armblade sting")
if(!target.drop_item())
to_chat(user, "<span class='warning'>The [target.get_active_held_item()] is stuck to their hand, you cannot grow a false armblade over it!</span>")
var/obj/item/held = target.get_active_held_item()
if(held && !target.dropItemToGround(held))
to_chat(user, "<span class='warning'>[held] is stuck to their hand, you cannot grow a false armblade over it!</span>")
return
if(ismonkey(target))
@@ -88,7 +88,7 @@
if(istype(I, /obj/item/clockwork/slab))
to_chat(user, "<span class='heavy_brass'>\"I don't think you want to drop your slab into that.\"\n\"If you really want to, try throwing it.\"</span>")
return TRUE
if(user.drop_item() && uses)
if(uses && user.dropItemToGround(I))
user.visible_message("<span class='warning'>[user] drops [I] into [src]!</span>", "<span class='danger'>You drop [I] into [src]!</span>")
pass_through_gateway(I, TRUE)
return TRUE
@@ -20,7 +20,6 @@
"<span class='alloy'>You crush [src], capturing its escaping energy for use as power.</span>")
playsound(user, 'sound/effects/pop_expl.ogg', 50, TRUE)
adjust_clockwork_power(POWER_WALL_TOTAL)
user.drop_item()
qdel(src)
/obj/item/clockwork/component/pickup(mob/living/user)
@@ -28,7 +28,6 @@
if(weapon.loc == owner)
owner.visible_message("<span class='danger'>[owner]'s [weapon.name] flickers and disappears!</span>")
to_chat(owner, "<span class='brass'>You dismiss [weapon].</span>")
owner.drop_item()
QDEL_NULL(weapon)
weapon_reset(RATVARIAN_SPEAR_COOLDOWN * 0.5)
return
@@ -136,7 +136,7 @@
to_chat(user, "<span class='heavy_brass'>\"You reek of blood. You've got a lot of nerve to even look at that slab.\"</span>")
user.visible_message("<span class='warning'>A sizzling sound comes from [user]'s hands!</span>", "<span class='userdanger'>[src] suddenly grows extremely hot in your hands!</span>")
playsound(get_turf(user), 'sound/weapons/sear.ogg', 50, 1)
user.drop_item()
user.dropItemToGround(src)
user.emote("scream")
user.apply_damage(5, BURN, "l_arm")
user.apply_damage(5, BURN, "r_arm")
+2 -5
View File
@@ -21,7 +21,6 @@
if(invoke(user))
uses--
if(uses <= 0)
user.drop_item()
qdel(src)
/obj/item/paper/talisman/proc/invoke(mob/living/user, successfuluse = 1)
@@ -182,7 +181,6 @@
C.Jitter(15)
if(is_servant_of_ratvar(target))
target.adjustBruteLoss(15)
user.drop_item()
qdel(src)
return
..()
@@ -204,13 +202,13 @@
user.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), slot_wear_suit)
user.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult/alt(user), slot_shoes)
user.equip_to_slot_or_del(new /obj/item/storage/backpack/cultpack(user), slot_back)
user.drop_item()
user.dropItemToGround(src)
user.put_in_hands(new /obj/item/melee/cultblade(user))
user.put_in_hands(new /obj/item/restraints/legcuffs/bola/cult(user))
/obj/item/paper/talisman/armor/attack(mob/living/target, mob/living/user)
if(iscultist(user) && iscultist(target))
user.drop_item()
user.temporarilyRemoveItemFromInventory(src)
invoke(target)
qdel(src)
return
@@ -335,7 +333,6 @@
else
to_chat(user, "<span class='warning'>[C] is already bound.</span>")
if(uses <= 0)
user.drop_item()
qdel(src)
/obj/item/restraints/handcuffs/energy/cult //For the talisman of shackling
@@ -184,7 +184,7 @@
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
if (prob(25))
drop_item()
dropItemToGround(get_active_held_item())
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
"<span class='userdanger'>[M] has disarmed [src]!</span>")
@@ -49,7 +49,7 @@
/datum/surgery_step/gland_insert/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] inserts [tool] into [target].", "<span class ='notice'>You insert [tool] into [target].</span>")
user.drop_item()
user.temporarilyRemoveItemFromInventory(tool, TRUE)
var/obj/item/organ/heart/gland/gland = tool
gland.Insert(target, 2)
return 1
@@ -353,7 +353,7 @@
return ..()
user.visible_message("<span class='notice'>[user] scatters [src] in all directions.</span>", \
"<span class='notice'>You scatter [src] across the area. The particles slowly fade away.</span>")
user.drop_item()
user.dropItemToGround(src)
scatter()
/obj/item/ectoplasm/revenant/throw_impact(atom/hit_atom)
@@ -97,7 +97,7 @@
return
user.visible_message("<span class='warning'>[user]'s eyes flare a deep crimson!</span>", \
"<span class='userdanger'>You feel a strange power seep into your body... you have absorbed the demon's blood-travelling powers!</span>")
user.drop_item()
user.temporarilyRemoveItemFromInventory(src, TRUE)
src.Insert(user) //Consuming the heart literally replaces your heart with a demon heart. H A R D C O R E
/obj/item/organ/heart/demon/Insert(mob/living/carbon/M, special = 0)
+2 -3
View File
@@ -91,7 +91,7 @@
to_chat(synd_mind.current, "<B>In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.</B>")
var/obj/item/device/nuclear_challenge/challenge = new /obj/item/device/nuclear_challenge
synd_mind.current.put_in_hands_or_del(challenge)
synd_mind.current.put_in_hands(challenge, TRUE)
var/list/foundIDs = synd_mind.current.search_contents_for(/obj/item/card/id)
if(foundIDs.len)
@@ -110,8 +110,7 @@
P.info = "The nuclear authorization code is: <b>[nuke_code]</b>"
P.name = "nuclear bomb code"
var/mob/living/carbon/human/H = synd_mind.current
P.forceMove(H.drop_location())
H.put_in_hands_or_del(P)
H.put_in_hands(P, TRUE)
H.update_icons()
else
nuke_code = "code will be provided later"
+3 -6
View File
@@ -105,9 +105,8 @@
/obj/machinery/nuclearbomb/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/disk/nuclear))
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
I.forceMove(src)
auth = I
add_fingerprint(user)
return
@@ -309,10 +308,8 @@
. = TRUE
if("insert_disk")
if(!auth)
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/disk/nuclear))
usr.drop_item()
I.forceMove(src)
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/disk/nuclear)
if(I && usr.transferItemToLoc(I, src))
auth = I
. = TRUE
if("keypad")
+2 -2
View File
@@ -193,8 +193,8 @@
H.equip_to_slot_or_del(new hat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/under/roman(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(H), slot_shoes)
H.put_in_hands_or_del(new /obj/item/shield/riot/roman(H))
H.put_in_hands_or_del(new /obj/item/claymore(H))
H.put_in_hands(new /obj/item/shield/riot/roman(H), TRUE)
H.put_in_hands(new /obj/item/claymore(H), TRUE)
H.equip_to_slot_or_del(new /obj/item/twohanded/spear(H), slot_back)
+1 -1
View File
@@ -159,7 +159,7 @@
wizard_mob.equip_to_slot_or_del(new /obj/item/teleportation_scroll(wizard_mob), slot_r_store)
var/obj/item/spellbook/spellbook = new /obj/item/spellbook(wizard_mob)
spellbook.owner = wizard_mob
wizard_mob.put_in_hands_or_del(spellbook)
wizard_mob.put_in_hands(spellbook, TRUE)
to_chat(wizard_mob, "You will find a list of available spells in your spell book. Choose your magic arsenal carefully.")
to_chat(wizard_mob, "The spellbook is bound to you, and others cannot use it.")