Merge pull request #1243 from Kelenius/cleanupTwo

Mob inventory cleanup, part 2
This commit is contained in:
Neerti
2016-04-21 21:07:22 -04:00
152 changed files with 295 additions and 422 deletions
@@ -27,7 +27,7 @@
if(istype(W, /obj/item/organ/external))
continue
//don't strip organs
H.drop_from_inventory(W)
H.removeItem(W)
//teleport person to cell
H.loc = pick(prisonwarp)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(H), slot_w_uniform)
+4 -4
View File
@@ -973,7 +973,7 @@
//strip their stuff and stick it in the crate
for(var/obj/item/I in M)
M.drop_from_inventory(I, locker)
M.removeItem(I, locker)
M.update_icons()
//so they black out before warping
@@ -1006,7 +1006,7 @@
return
for(var/obj/item/I in M)
M.drop_from_inventory(I)
M.removeItem(I, force = 1)
M.Paralyse(5)
sleep(5)
@@ -1031,7 +1031,7 @@
return
for(var/obj/item/I in M)
M.drop_from_inventory(I)
M.removeItem(I, force = 1)
M.Paralyse(5)
sleep(5)
@@ -1078,7 +1078,7 @@
return
for(var/obj/item/I in M)
M.drop_from_inventory(I)
M.removeItem(I, force = 1)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/observer = M
+1 -1
View File
@@ -426,7 +426,7 @@
for (var/obj/item/I in M)
if (istype(I, /obj/item/weapon/implant))
continue
M.drop_from_inventory(I)
M.removeItem(I)
if(I.loc != M)
qdel(I)
switch(dresscode)
+2 -2
View File
@@ -10,7 +10,7 @@
return
for(var/obj/item/W in M)
M.drop_from_inventory(W)
M.removeItem(W, force = 1)
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
@@ -28,7 +28,7 @@
return
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/W in M)
M.drop_from_inventory(W)
M.removeItem(W, force = 1)
//teleport person to cell
M.Paralyse(5)
sleep(5) //so they black out before warping
+1 -1
View File
@@ -86,7 +86,7 @@
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
M.drop_item() //Remove the assembly from your hands
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
M.removeItem(src) //Remove the tank from your character,in case you were holding it
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
R.bombassembly = S //Tell the bomb about its assembly part
+2 -2
View File
@@ -36,8 +36,8 @@
if((!isassembly(D))||(!isassembly(D2))) return 0
if((D:secured)||(D2:secured)) return 0
if(user)
user.remove_from_mob(D)
user.remove_from_mob(D2)
user.removeItem(D)
user.removeItem(D2)
D:holder = src
D2:holder = src
D.loc = src
+2 -3
View File
@@ -432,8 +432,7 @@
if(holding)
user << "<span class='warning'>\The [src] is already holding \a [holding].</span>"
return
user.unEquip(I)
I.forceMove(src)
user.removeItem(I, src)
holding = I
user.visible_message("<span class='notice'>\The [user] shoves \the [I] into \the [src].</span>")
verbs |= /obj/item/clothing/shoes/proc/draw_knife
@@ -632,7 +631,7 @@
if (( usr.restrained() ) || ( usr.stat ))
return
if (!usr.unEquip(src))
if (!usr.removeItem(src))
return
switch(over_object.name)
+1 -2
View File
@@ -43,8 +43,7 @@
user << "You are unable to wear \the [src] as \the [H.shoes] are in the way."
shoes = null
return 0
H.drop_from_inventory(shoes) //Remove the old shoes so you can put on the magboots.
shoes.forceMove(src)
H.removeItem(shoes, src) //Remove the old shoes so you can put on the magboots.
if(!..())
if(shoes) //Put the old shoes back on if the check fails.
@@ -55,8 +55,7 @@
return 0
user << "<font color='blue'><b>You slot \the [input_device] into the suit module.</b></font>"
user.drop_from_inventory(input_device)
qdel(input_device)
user.deleteItem(input_device)
accepted_item.charges++
return 1
@@ -204,8 +203,7 @@
return
for(var/obj/item/weapon/melee/energy/blade/blade in M.contents)
M.drop_from_inventory(blade)
qdel(blade)
M.deleteItem(blade)
/obj/item/rig_module/fabricator
@@ -208,8 +208,7 @@
else
return 0
else
user.drop_from_inventory(ai)
ai.forceMove(src)
user.removeItem(ai, src)
ai_card = ai
ai_mob << "<font color='blue'>You have been transferred to \the [holder]'s [src].</font>"
user << "<font color='blue'>You load [ai_mob] into \the [holder]'s [src].</font>"
@@ -200,6 +200,6 @@
return
explosion(get_turf(src), explosion_values[1], explosion_values[2], explosion_values[3], explosion_values[4])
if(holder && holder.wearer)
holder.wearer.drop_from_inventory(src)
holder.wearer.removeItem(src)
qdel(holder)
qdel(src)
@@ -458,8 +458,7 @@
return
for(var/obj/item/weapon/mop_deploy/blade in M.contents)
M.drop_from_inventory(blade)
del(blade)
M.deleteItem(blade)
//Space Cleaner Launcher
@@ -501,8 +500,7 @@
return 0
user << "<font color='blue'><b>You slot \the [input_device] into the suit module.</b></font>"
user.drop_from_inventory(input_device)
del(input_device)
user.deleteItem(input_device)
accepted_item.charges++
return 1
+8 -12
View File
@@ -157,7 +157,7 @@
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
var/mob/living/M = piece.loc
if(istype(M))
M.drop_from_inventory(piece)
M.removeItem(piece)
qdel(piece)
processing_objects -= src
qdel(wires)
@@ -307,7 +307,7 @@
if(piece.loc != src && !(wearer && piece.loc == wearer))
if(istype(piece.loc, /mob/living))
M = piece.loc
M.unEquip(piece)
M.removeItem(piece)
piece.forceMove(src)
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
@@ -560,7 +560,7 @@
M.visible_message("<font color='blue'>[M] starts putting on \the [src]...</font>", "<font color='blue'>You start putting on \the [src]...</font>")
if(!do_after(M,seal_delay))
if(M && M.back == src)
if(!M.unEquip(src))
if(!M.removeItem(src))
return
src.forceMove(get_turf(src))
return
@@ -618,7 +618,7 @@
if(use_obj && check_slot == use_obj)
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
use_obj.canremove = 1
holder.drop_from_inventory(use_obj)
holder.removeItem(use_obj)
use_obj.forceMove(get_turf(src))
use_obj.dropped()
use_obj.canremove = 0
@@ -651,27 +651,23 @@
if(sealed)
if(H.head)
var/obj/item/garbage = H.head
H.drop_from_inventory(garbage)
H.deleteItem(garbage)
H.head = null
qdel(garbage)
if(H.gloves)
var/obj/item/garbage = H.gloves
H.drop_from_inventory(garbage)
H.deleteItem(garbage)
H.gloves = null
qdel(garbage)
if(H.shoes)
var/obj/item/garbage = H.shoes
H.drop_from_inventory(garbage)
H.deleteItem(garbage)
H.shoes = null
qdel(garbage)
if(H.wear_suit)
var/obj/item/garbage = H.wear_suit
H.drop_from_inventory(garbage)
H.deleteItem(garbage)
H.wear_suit = null
qdel(garbage)
for(var/piece in list("helmet","gauntlets","chest","boots"))
toggle_piece(piece, H, ONLY_DEPLOY)
@@ -56,7 +56,7 @@
user << "\The [src] already has a tank installed."
return
if(!user.unEquip(W)) return
if(!user.removeItem(W)) return
air_supply = W
W.forceMove(src)
user << "You slot [W] into [src] and tighten the connecting valve."
@@ -84,7 +84,7 @@
return
if(!user || !W)
return
if(!user.unEquip(mod)) return
if(!user.removeItem(mod)) return
user << "You install \the [mod] into \the [src]."
installed_modules |= mod
mod.forceMove(src)
@@ -94,7 +94,7 @@
else if(!cell && istype(W,/obj/item/weapon/cell))
if(!user.unEquip(W)) return
if(!user.removeItem(W)) return
user << "You jack \the [W] into \the [src]'s battery mount."
W.forceMove(src)
src.cell = W
@@ -121,16 +121,14 @@
H = helmet.loc
if(istype(H))
if(helmet && H.head == helmet)
H.drop_from_inventory(helmet)
helmet.forceMove(src)
H.removeItem(helmet, src)
if(boots)
boots.canremove = 1
H = boots.loc
if(istype(H))
if(boots && H.shoes == boots)
H.drop_from_inventory(boots)
boots.forceMove(src)
H.removeItem(boots, src)
if(tank)
tank.canremove = 1
@@ -161,8 +159,7 @@
if(H.head == helmet)
H << "<span class='notice'>You retract your suit helmet.</span>"
helmet.canremove = 1
H.drop_from_inventory(helmet)
helmet.forceMove(src)
H.removeItem(helmet, src)
else
if(H.head)
H << "<span class='danger'>You cannot deploy your helmet while wearing \the [H.head].</span>"
@@ -200,7 +197,7 @@
cooler = null
H << "<span class='info'>You press the emergency release, ejecting \the [removing] from your suit.</span>"
removing.canremove = 1
H.drop_from_inventory(removing)
H.removeItem(removing)
/obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob)
+1 -1
View File
@@ -32,7 +32,7 @@
suittoggled = 0
if(ishuman(hood.loc))
var/mob/living/carbon/H = hood.loc
H.unEquip(hood, 1)
H.removeItem(hood, force = 1)
H.update_inv_wear_suit()
hood.loc = src
@@ -17,8 +17,7 @@
if(istype(user))
user.stop_aiming(no_message=1)
holstered = I
user.drop_from_inventory(holstered)
holstered.loc = src
user.removeItem(holstered, src)
holstered.add_fingerprint(user)
w_class = max(w_class, holstered.w_class)
user.visible_message("<span class='notice'>[user] holsters \the [holstered].</span>", "<span class='notice'>You holster \the [holstered].</span>")
@@ -27,9 +27,8 @@
var/obj/item/weapon/forensics/swab/swab = W
if(istype(swab) && swab.is_used())
user.unEquip(W)
user.removeItem(swab, src)
src.bloodsamp = swab
swab.loc = src
user << "<span class='notice'>You insert \the [W] into \the [src].</span>"
else
user << "<span class='warning'>\The [src] only accepts used swabs.</span>"
@@ -18,8 +18,7 @@
if(istype(W, /obj/item/weapon/forensics/swab)|| istype(W, /obj/item/weapon/sample/fibers) || istype(W, /obj/item/weapon/sample/print))
user << "<span class='notice'>You insert \the [W] into the microscope.</span>"
user.unEquip(W)
W.forceMove(src)
user.removeItem(W, src)
sample = W
update_icon()
return
@@ -32,7 +32,7 @@
user.client.screen -= I
U.contents.Remove(I)
else if(user.item_is_in_hands(I))
user.drop_from_inventory(I)
user.removeItem(I)
else
return
+1 -1
View File
@@ -40,7 +40,7 @@
/obj/item/weapon/reagent_containers/glass/rag/attack_self(mob/user as mob)
if(on_fire)
user.visible_message("<span class='warning'>\The [user] stamps out [src].</span>", "<span class='warning'>You stamp out [src].</span>")
user.unEquip(src)
user.removeItem(src)
extinguish()
else
remove_contents(user)
@@ -42,7 +42,7 @@
/obj/item/weapon/sample/attackby(var/obj/O, var/mob/user)
if(O.type == src.type)
user.unEquip(O)
user.removeItem(O)
if(merge_evidence(O, user))
qdel(O)
return 1
+2 -2
View File
@@ -24,8 +24,8 @@
SC.adjust_worth(src.worth)
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/h_user = user
h_user.drop_from_inventory(src)
h_user.drop_from_inventory(SC)
h_user.removeItem(src)
h_user.removeItem(SC)
h_user.put_in_hands(SC)
user << "<span class='notice'>You combine the Thalers to a bundle of [SC.worth] Thalers.</span>"
qdel(src)
+2 -2
View File
@@ -182,7 +182,7 @@
overlays |= "register_cash"
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.drop_from_inventory(SC)
H.removeItem(SC)
qdel(SC)
else
scan_cash(SC)
@@ -335,7 +335,7 @@
if(!SC.worth)
if(ishuman(SC.loc))
var/mob/living/carbon/human/H = SC.loc
H.drop_from_inventory(SC)
H.removeItem(SC)
qdel(SC)
cash_stored += transaction_amount
+1 -2
View File
@@ -146,8 +146,7 @@
for(var/datum/playingcard/P in cards)
H.cards += P
H.concealed = src.concealed
user.drop_from_inventory(src,user.loc)
qdel(src)
user.deleteItem(src)
H.update_icon()
return
..()
+1 -1
View File
@@ -211,7 +211,7 @@
if(isobj(obj))
var/mob/M = obj.loc
if(ismob(M))
M.remove_from_mob(obj)
M.removeItem(obj)
M.update_icons() //so their overlays update
if(!silent)
@@ -67,8 +67,7 @@
++frames
user.visible_message("<span class='notice'>[user] loads \the [I] into \the [src].</span>", "<span class='notice'>You load \the [I] into \the [src].</span>")
update_icon()
user.drop_from_inventory(I)
qdel(I)
user.deleteItem(I)
return
else if(istype(I, /obj/item/bee_pack))
var/obj/item/bee_pack/B = I
@@ -229,8 +228,7 @@
if(do_after(user, 30))
user.visible_message("<span class='notice'>[user] constructs a beehive.</span>", "<span class='notice'>You construct a beehive.</span>")
new /obj/machinery/beehive(get_turf(user))
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
return
/obj/item/stack/wax
+1 -1
View File
@@ -288,7 +288,7 @@
if(prob(35))
if(user)
user << "<span class='danger'>\The [src] has fallen to bits.</span>"
user.drop_from_inventory(src)
user.removeItem(src)
qdel(src)
add_fingerprint(user)
+2 -4
View File
@@ -88,8 +88,7 @@
if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0)
user << "That seed is not compatible with our genetics technology."
else
user.drop_from_inventory(W)
W.loc = src
user.removeItem(W, src)
seed = W
user << "You load [W] into [src]."
return
@@ -114,8 +113,7 @@
user << "That disk does not have any gene data loaded."
return
user.drop_from_inventory(W)
W.loc = src
user.removeItem(W, src)
loaded_disk = W
user << "You load [W] into [src]."
+1 -1
View File
@@ -225,7 +225,7 @@
/obj/machinery/seed_storage/proc/add(var/obj/item/seeds/O as obj)
if (istype(O.loc, /mob))
var/mob/user = O.loc
user.remove_from_mob(O)
user.removeItem(O)
else if(istype(O.loc,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = O.loc
S.remove_from_storage(O, src)
+2 -2
View File
@@ -475,7 +475,7 @@
if(!seed)
var/obj/item/seeds/S = O
user.remove_from_mob(O)
user.removeItem(O)
if(!S.seed)
user << "The packet seems to be empty. You throw it away."
@@ -520,7 +520,7 @@
else if ( istype(O, /obj/item/weapon/plantspray) )
var/obj/item/weapon/plantspray/spray = O
user.remove_from_mob(O)
user.removeItem(O)
toxins += spray.toxicity
pestlevel -= spray.pest_kill_str
weedlevel -= spray.weed_kill_str
+1 -2
View File
@@ -12,8 +12,7 @@
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/ore))
user.remove_from_mob(W)
src.contents += W
user.removeItem(W, src)
if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
S.hide_from(usr)
+27 -36
View File
@@ -44,9 +44,8 @@ var/list/slot_equipment_priority = list( \
if(!W.mob_can_equip(src, slot))
if(del_on_fail)
qdel(W)
else
if(!disable_warning)
src << "\red You are unable to equip that." //Only print if del_on_fail is false
else if(!disable_warning)
src << "\red You are unable to equip that." //Only print if del_on_fail is false
return 0
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
@@ -116,22 +115,6 @@ var/list/slot_equipment_priority = list( \
W.dropped()
return 0
// Removes an item from inventory and places it in the target atom.
// If canremove or other conditions need to be checked then use unEquip instead.
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W)
if(!Target)
Target = loc
remove_from_mob(W)
if(!(W && W.loc)) return 1 // self destroying objects (tk, grabs)
W.forceMove(Target)
update_icons()
return 1
return 0
//Drops the item in our left hand
/mob/proc/drop_l_hand(var/atom/Target)
return 0
@@ -176,26 +159,34 @@ var/list/slot_equipment_priority = list( \
break
return slot
//This differs from remove_from_mob() in that it checks if the item can be unequipped first.
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
if(!(force || canUnEquip(I)))
return
drop_from_inventory(I)
/mob/proc/removeItem(var/obj/item/I, var/atom/T = loc, var/force = 0)
if(!force && !src.canUnEquip(I))
return 0
u_equip(I)
if(src.client)
src.client.screen -= I
I.layer = initial(I.layer)
I.screen_loc = null
I.dropped(src)
if(I && I.loc) // Some items self-delete
I.forceMove(T)
return 1
//Attemps to remove an object on a mob.
/mob/proc/remove_from_mob(var/obj/O)
src.u_equip(O)
if (src.client)
src.client.screen -= O
O.layer = initial(O.layer)
O.screen_loc = null
if(istype(O, /obj/item))
var/obj/item/I = O
I.forceMove(src.loc)
I.dropped(src)
return 1
/mob/proc/deleteItem(var/obj/item/I)
u_equip(I)
if(src.client)
src.client.screen -= I
I.screen_loc = null
I.dropped(src)
if(I && I.loc)
qdel(I)
//Returns the item equipped to the specified slot, if any.
/mob/proc/get_equipped_item(var/slot)
+1 -2
View File
@@ -189,8 +189,7 @@
var/mob/living/bot/cleanbot/A = new /mob/living/bot/cleanbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
else if(istype(O, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
+1 -3
View File
@@ -185,7 +185,5 @@
user << "<span class='notice'>You complete the ED-209.</span>"
var/turf/T = get_turf(src)
new /mob/living/bot/secbot/ed209(T,created_name,lasercolor)
user.drop_item()
qdel(W)
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
+5 -10
View File
@@ -310,8 +310,7 @@
return
user << "You add the robot arm to [src]."
user.drop_from_inventory(S)
qdel(S)
user.deleteItem(S)
new /obj/item/weapon/farmbot_arm_assembly(loc, src)
@@ -321,30 +320,26 @@
build_step++
user << "You add the plant analyzer to [src]."
name = "farmbot assembly"
user.remove_from_mob(W)
qdel(W)
user.deleteItem(W)
else if((istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) && (build_step == 1))
build_step++
user << "You add a bucket to [src]."
name = "farmbot assembly with bucket"
user.remove_from_mob(W)
qdel(W)
user.deleteItem(W)
else if((istype(W, /obj/item/weapon/material/minihoe)) && (build_step == 2))
build_step++
user << "You add a minihoe to [src]."
name = "farmbot assembly with bucket and minihoe"
user.remove_from_mob(W)
qdel(W)
user.deleteItem(W)
else if((isprox(W)) && (build_step == 3))
build_step++
user << "You complete the Farmbot! Beep boop."
var/mob/living/bot/farmbot/S = new /mob/living/bot/farmbot(get_turf(src), tank)
S.name = created_name
user.remove_from_mob(W)
qdel(W)
user.deleteItem(W)
qdel(src)
else if(istype(W, /obj/item/weapon/pen))
+3 -6
View File
@@ -289,8 +289,7 @@
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
user.put_in_hands(B)
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
else
user << "<span class='warning'>You need 10 floor tiles for a floorbot.</span>"
return
@@ -315,8 +314,7 @@
B.created_name = created_name
user.put_in_hands(B)
user << "<span class='notice'>You add the sensor to the toolbox and tiles!</span>"
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
if(!t)
@@ -345,8 +343,7 @@
var/mob/living/bot/floorbot/A = new /mob/living/bot/floorbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly! Boop beep!</span>"
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
else if(istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
if(!t)
+2 -4
View File
@@ -283,8 +283,7 @@
qdel(S)
user.put_in_hands(A)
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
/obj/item/weapon/firstaid_arm_assembly
name = "first aid/robot arm assembly"
@@ -331,5 +330,4 @@
var/mob/living/bot/medbot/S = new /mob/living/bot/medbot(T)
S.skin = skin
S.name = created_name
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
+1 -2
View File
@@ -228,8 +228,7 @@
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
user.put_in_hands(A)
user << "You add the signaler to the helmet."
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
else
return
@@ -16,7 +16,7 @@
if(hat)
user << "<span class='warning'>\The [src] is already wearing \the [hat].</span>"
return
user.unEquip(W)
user.removeItem(W)
wear_hat(W)
user.visible_message("<span class='notice'>\The [user] puts \the [W] on \the [src].</span>")
return
@@ -34,7 +34,7 @@
adult.key = src.key
for (var/obj/item/W in src.contents)
src.drop_from_inventory(W)
src.removeItem(W, force = 1)
for(var/datum/language/L in languages)
adult.add_language(L.name)
+1 -2
View File
@@ -327,8 +327,7 @@
if(!item) return //Grab processing has a chance of returning null
src.remove_from_mob(item)
item.loc = src.loc
src.removeItem(item, loc)
//actually throw it!
if (item)
+1 -1
View File
@@ -37,6 +37,6 @@
src << "<span class='warning'>Their hands are full.</span>"
return
if(src.unEquip(I))
if(src.removeItem(I))
target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea.
target.visible_message("<span class='notice'>\The [src] handed \the [I] to \the [target].</span>")
@@ -11,7 +11,7 @@
sleep(1)
for(var/obj/item/I in src)
drop_from_inventory(I)
removeItem(I)
I.throw_at(get_edge_target_turf(src,pick(alldirs)), rand(1,3), round(30/I.w_class))
..(species.gibbed_anim)
@@ -1348,10 +1348,10 @@
S << "<span class='danger'>[U] pops your [current_limb.joint] back in!</span>"
current_limb.undislocate()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in organs)
return
..()
/mob/living/carbon/human/removeItem(var/obj/item/I, var/atom/T = loc, var/force = 0)
if(I in src.organs)
return 0
return ..()
/mob/living/carbon/human/reset_view(atom/A, update_hud = 1)
..()
@@ -281,7 +281,7 @@
//Actually disarm them
for(var/obj/item/I in holding)
if(I)
drop_from_inventory(I)
removeItem(I)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
@@ -56,7 +56,7 @@ emp_act
if(c_hand && (stun_amount || agony_amount > 10))
msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect")
drop_from_inventory(c_hand)
removeItem(c_hand)
if (affected.status & ORGAN_ROBOT)
emote("me", 1, "drops what they were holding, their [affected.name] malfunctioning!")
else
@@ -117,7 +117,7 @@
var/obj/item/organ/external/E = get_organ(limb_tag)
if(!E)
visible_message("<span class='danger'>Lacking a functioning left hand, \the [src] drops \the [l_hand].</span>")
drop_from_inventory(l_hand)
removeItem(l_hand)
break
if(r_hand)
@@ -125,7 +125,7 @@
var/obj/item/organ/external/E = get_organ(limb_tag)
if(!E)
visible_message("<span class='danger'>Lacking a functioning right hand, \the [src] drops \the [r_hand].</span>")
drop_from_inventory(r_hand)
removeItem(r_hand)
break
// Check again...
@@ -141,11 +141,11 @@
if(HAND_LEFT, ARM_LEFT)
if(!l_hand)
continue
drop_from_inventory(l_hand)
removeItem(l_hand)
if(HAND_RIGHT, ARM_RIGHT)
if(!r_hand)
continue
drop_from_inventory(r_hand)
removeItem(r_hand)
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
emote("me", 1, "[(E.can_feel_pain()) ? "" : emote_scream ]drops what they were holding in their [E.name]!")
@@ -155,11 +155,11 @@
if(HAND_LEFT, ARM_LEFT)
if(!l_hand)
continue
drop_from_inventory(l_hand)
removeItem(l_hand)
if(HAND_RIGHT, ARM_RIGHT)
if(!r_hand)
continue
drop_from_inventory(r_hand)
removeItem(r_hand)
emote("me", 1, "drops what they were holding, their [E.name] malfunctioning!")
@@ -139,7 +139,7 @@
for(var/obj/item/W in src)
drop_from_inventory(W)
removeItem(W, force = 1)
visible_message("<span class='warning'>\The [src] quivers slightly, then splits apart with a wet slithering noise.</span>")
@@ -85,18 +85,18 @@ This saves us from having to call add_fingerprint() any time something is put in
if (W == wear_suit)
if(s_store)
drop_from_inventory(s_store)
removeItem(s_store)
wear_suit = null
update_inv_wear_suit()
else if (W == w_uniform)
if (r_store)
drop_from_inventory(r_store)
removeItem(r_store)
if (l_store)
drop_from_inventory(l_store)
removeItem(l_store)
if (wear_id)
drop_from_inventory(wear_id)
removeItem(wear_id)
if (belt)
drop_from_inventory(belt)
removeItem(belt)
w_uniform = null
update_inv_w_uniform()
else if (W == gloves)
@@ -289,7 +289,7 @@ This saves us from having to call add_fingerprint() any time something is put in
update_inv_s_store(redraw_mob)
if(slot_in_backpack)
if(src.get_active_hand() == W)
src.remove_from_mob(W)
src.removeItem(W)
W.loc = src.back
if(slot_tie)
var/obj/item/clothing/under/uniform = src.w_uniform
@@ -82,8 +82,8 @@
if(stripping)
admin_attack_log(user, src, "Attempted to remove \a [target_slot]", "Target of an attempt to remove \a [target_slot].", "attempted to remove \a [target_slot] from")
unEquip(target_slot)
else if(user.unEquip(held))
removeItem(target_slot)
else if(user.removeItem(held))
equip_to_slot_if_possible(held, text2num(slot_to_strip), 0, 1, 1)
if(held.loc != src)
user.put_in_hands(held)
@@ -94,9 +94,9 @@
user << "<span class='warning'>\The [src] has nothing in their pockets.</span>"
return
if(r_store)
unEquip(r_store)
removeItem(r_store)
if(l_store)
unEquip(l_store)
removeItem(l_store)
visible_message("<span class='danger'>\The [user] empties \the [src]'s pockets!</span>")
// Modify the current target sensor level.
@@ -748,7 +748,7 @@ var/global/list/damage_icon_parts = list()
standing.color = wear_suit.color
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
drop_from_inventory(handcuffed)
removeItem(handcuffed, force = 1)
drop_l_hand()
drop_r_hand()
+2 -2
View File
@@ -66,7 +66,7 @@
"<span class='danger'>\The [src] manages to remove \the [handcuffed]!</span>",
"<span class='notice'>You successfully remove \the [handcuffed].</span>"
)
drop_from_inventory(handcuffed)
removeItem(handcuffed)
/mob/living/carbon/proc/escape_legcuffs()
if(!canClick())
@@ -101,7 +101,7 @@
"<span class='notice'>You successfully remove \the [legcuffed].</span>"
)
drop_from_inventory(legcuffed)
removeItem(legcuffed)
legcuffed = null
update_inv_legcuffed()
+2 -2
View File
@@ -38,11 +38,11 @@
//Drops the item in our left hand
/mob/living/drop_l_hand(var/atom/Target)
return drop_from_inventory(l_hand, Target)
return removeItem(l_hand, Target)
//Drops the item in our right hand
/mob/living/drop_r_hand(var/atom/Target)
return drop_from_inventory(r_hand, Target)
return removeItem(r_hand, Target)
/mob/living/proc/hands_are_full()
return (r_hand && l_hand)
+9 -9
View File
@@ -393,11 +393,11 @@ default behaviour is:
var/mob/living/carbon/C = src
if (C.handcuffed && !initial(C.handcuffed))
C.drop_from_inventory(C.handcuffed)
C.removeItem(C.handcuffed)
C.handcuffed = initial(C.handcuffed)
if (C.legcuffed && !initial(C.legcuffed))
C.drop_from_inventory(C.legcuffed)
C.removeItem(C.legcuffed)
C.legcuffed = initial(C.legcuffed)
BITSET(hud_updateflag, HEALTH_HUD)
BITSET(hud_updateflag, STATUS_HUD)
@@ -595,7 +595,7 @@ default behaviour is:
var/mob/M = H.loc //Get our mob holder (if any).
if(istype(M))
M.drop_from_inventory(H)
M.removeItem(H)
M << "<span class='warning'>\The [H] wriggles out of your grip!</span>"
src << "<span class='warning'>You wriggle out of \the [M]'s grip!</span>"
@@ -771,10 +771,10 @@ default behaviour is:
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
return 0
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in internal_organs)
return
..()
/mob/living/carbon/removeItem(var/obj/item/I, var/atom/T = loc, var/force = 0)
if(I in src.internal_organs)
return 0
return ..()
/mob/living/touch_map_edge()
@@ -895,8 +895,8 @@ default behaviour is:
if(lying)
density = 0
if(l_hand) unEquip(l_hand)
if(r_hand) unEquip(r_hand)
if(l_hand) removeItem(l_hand)
if(r_hand) removeItem(r_hand)
else
density = initial(density)
+2 -2
View File
@@ -265,7 +265,7 @@
affecting.implants -= card
H.visible_message("<span class='danger'>\The [src] explodes out of \the [H]'s [affecting.name] in shower of gore!</span>")
break
holder.drop_from_inventory(card)
holder.removeItem(card)
else if(istype(card.loc,/obj/item/device/pda))
var/obj/item/device/pda/holder = card.loc
holder.pai = null
@@ -383,7 +383,7 @@
if(istype(H))
var/mob/living/M = H.loc
if(istype(M))
M.drop_from_inventory(H)
M.removeItem(H)
H.loc = get_turf(src)
src.loc = get_turf(H)
@@ -145,7 +145,7 @@ var/list/mob_hat_cache = list()
if(hat)
user << "<span class='warning'>\The [src] is already wearing \the [hat].</span>"
return
user.unEquip(W)
user.removeItem(W)
wear_hat(W)
user.visible_message("<span class='notice'>\The [user] puts \the [W] on \the [src].</span>")
return
@@ -118,7 +118,7 @@
return
for(var/obj/item/W in T)
T.drop_from_inventory(W)
T.removeItem(W)
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
T.invisibility = 101
@@ -607,9 +607,8 @@
stolen_item = C.r_hand
if(stolen_item)
C.remove_from_mob(stolen_item)
C.removeItem(stolen_item, src)
held_item = stolen_item
stolen_item.loc = src
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.")
return held_item
+1 -3
View File
@@ -106,9 +106,7 @@
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Headbutted by [attacker.name] ([attacker.ckey])</font>")
msg_admin_attack("[key_name(attacker)] has headbutted [key_name(target)]")
attacker.drop_from_inventory(src)
src.loc = null
qdel(src)
attacker.deleteItem(src)
return
/obj/item/weapon/grab/proc/dislocate(mob/living/carbon/human/target, mob/living/attacker, var/target_zone)
+7 -7
View File
@@ -4,7 +4,7 @@
for(var/obj/item/W in src)
if (W==w_uniform) // will be torn
continue
drop_from_inventory(W)
removeItem(W, force = 1)
regenerate_icons()
transforming = 1
canmove = 0
@@ -31,7 +31,7 @@
return
for(var/obj/item/W in src)
drop_from_inventory(W)
removeItem(W, force = 1)
set_species(species.primitive_form)
dna.SetSEState(MONKEYBLOCK,1)
dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
@@ -57,7 +57,7 @@
if (transforming)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
removeItem(W, force = 1)
transforming = 1
canmove = 0
icon = null
@@ -113,7 +113,7 @@
if (transforming)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
removeItem(W, force = 1)
regenerate_icons()
transforming = 1
canmove = 0
@@ -165,7 +165,7 @@
if (transforming)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
removeItem(W, force = 1)
regenerate_icons()
transforming = 1
canmove = 0
@@ -199,7 +199,7 @@
if (transforming)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
removeItem(W, force = 1)
regenerate_icons()
transforming = 1
canmove = 0
@@ -228,7 +228,7 @@
if(transforming)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
removeItem(W, force = 1)
regenerate_icons()
transforming = 1
+1 -1
View File
@@ -323,7 +323,7 @@ var/list/organ_cache = list()
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
blood_splatter(src,B,1)
user.drop_from_inventory(src)
user.removeItem(src)
var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src))
O.name = name
O.icon = icon
+3 -3
View File
@@ -833,12 +833,12 @@ Note that amputating the affected organ does in fact remove the infection from t
holder.visible_message(\
"\The [holder.handcuffed.name] falls off of [holder.name].",\
"\The [holder.handcuffed.name] falls off you.")
holder.drop_from_inventory(holder.handcuffed)
holder.removeItem(holder.handcuffed, force = 1)
if (holder.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
holder.visible_message(\
"\The [holder.legcuffed.name] falls off of [holder.name].",\
"\The [holder.legcuffed.name] falls off you.")
holder.drop_from_inventory(holder.legcuffed)
holder.removeItem(holder.legcuffed, force = 1)
/obj/item/organ/external/proc/bandage()
var/rval = 0
@@ -1005,7 +1005,7 @@ Note that amputating the affected organ does in fact remove the infection from t
W.add_blood(owner)
if(ismob(W.loc))
var/mob/living/H = W.loc
H.drop_from_inventory(W)
H.removeItem(W)
W.loc = owner
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children = 0)
+1 -1
View File
@@ -75,7 +75,7 @@
var/mob/living/holder_mob = loc
if(istype(holder_mob))
holder_mob.drop_from_inventory(src)
holder_mob.removeItem(src)
qdel(src)
/obj/item/organ/internal/mmi_holder/posibrain
+1 -2
View File
@@ -113,8 +113,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I))
I.loc = src
if (istype(I, /obj/item/weapon/card/id) && usr.removeItem(I, src))
scan = I
authenticated = 0
+6 -6
View File
@@ -307,7 +307,7 @@
"<span class='[class]'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
if(user.get_inactive_hand() == src)
user.drop_from_inventory(src)
user.removeItem(src)
new /obj/effect/decal/cleanable/ash(src.loc)
qdel(src)
@@ -415,23 +415,23 @@
B.name = name
else if (P.name != "paper" && P.name != "photo")
B.name = P.name
user.drop_from_inventory(P)
user.removeItem(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.removeItem(src)
h_user.put_in_r_hand(B)
else if (h_user.l_hand == src)
h_user.drop_from_inventory(src)
h_user.removeItem(src)
h_user.put_in_l_hand(B)
else if (h_user.l_store == src)
h_user.drop_from_inventory(src)
h_user.removeItem(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.removeItem(src)
B.loc = h_user
B.layer = 20
h_user.r_store = B
+5 -7
View File
@@ -34,7 +34,7 @@
// merging bundles
else if(istype(W, /obj/item/weapon/paper_bundle))
user.drop_from_inventory(W)
user.removeItem(W)
for(var/obj/O in W)
O.loc = src
O.add_fingerprint(usr)
@@ -61,8 +61,7 @@
else if(istype(sheet, /obj/item/weapon/photo))
user << "<span class='notice'>You add [(sheet.name == "photo") ? "the photo" : sheet.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
user.drop_from_inventory(sheet)
sheet.loc = src
user.removeItem(sheet, src)
pages.Insert(index, sheet)
@@ -85,7 +84,7 @@
"<span class='[class]'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
if(user.get_inactive_hand() == src)
user.drop_from_inventory(src)
user.removeItem(src)
new /obj/effect/decal/cleanable/ash(src.loc)
qdel(src)
@@ -168,7 +167,7 @@
if(pages.len <= 1)
var/obj/item/weapon/paper/P = src[1]
usr.drop_from_inventory(src)
usr.removeItem(src)
usr.put_in_hands(P)
qdel(src)
@@ -206,8 +205,7 @@
O.loc = usr.loc
O.layer = initial(O.layer)
O.add_fingerprint(usr)
usr.drop_from_inventory(src)
qdel(src)
usr.deleteItem(src)
return
+2 -3
View File
@@ -31,8 +31,7 @@
user << "<span class='warning'>\The [src] is full; please empty it before you continue.</span>"
return
paperamount += paper_result
user.drop_from_inventory(W)
qdel(W)
user.deleteItem(W)
playsound(src.loc, 'sound/items/pshred.ogg', 75, 1)
if(paperamount > max_paper)
user <<"<span class='danger'>\The [src] was too full, and shredded paper goes everywhere!</span>"
@@ -119,7 +118,7 @@
/obj/item/weapon/shreddedp/proc/FireBurn()
var/mob/living/M = loc
if(istype(M))
M.drop_from_inventory(src)
M.removeItem(src)
PoolOrNew(/obj/effect/decal/cleanable/ash,get_turf(src))
qdel(src)
+1 -2
View File
@@ -158,8 +158,7 @@
user << "\red There is already a [fueljar] inside!"
return
fueljar = W
user.remove_from_mob(W)
W.loc = src
user.removeItem(W, src)
user.update_icons()
user.visible_message("[user.name] loads an [W.name] into the [src.name].", \
"You load an [W.name].", \
+1 -2
View File
@@ -108,8 +108,7 @@
if(stored_ammo.len >= max_ammo)
user << "<span class='warning'>[src] is full!</span>"
return
user.remove_from_mob(C)
C.loc = src
user.removeItem(C, src)
stored_ammo.Insert(1, C) //add to the head of the list
update_icon()
@@ -136,7 +136,7 @@
/obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob)
if(!bolt)
if (istype(W,/obj/item/weapon/arrow))
user.drop_from_inventory(W, src)
user.removeItem(W, src)
bolt = W
user.visible_message("[user] slides [bolt] into [src].","You slide [bolt] into [src].")
update_icon()
@@ -47,8 +47,7 @@
if(grenades.len >= max_grenades)
user << "<span class='warning'>[src] is full.</span>"
return
user.remove_from_mob(G)
G.loc = src
user.removeItem(G, src)
grenades.Insert(1, G) //add to the head of the list, so that it is loaded on the next pump
user.visible_message("[user] inserts \a [G] into [src].", "<span class='notice'>You insert \a [G] into [src].</span>")
return
@@ -106,8 +105,7 @@
if(chambered)
user << "<span class='warning'>[src] is already loaded.</span>"
return
user.remove_from_mob(G)
G.loc = src
user.removeItem(G, src)
chambered = G
user.visible_message("[user] load \a [G] into [src].", "<span class='notice'>You load \a [G] into [src].</span>")
return
@@ -65,7 +65,7 @@
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
if(!tank && istype(W,/obj/item/weapon/tank))
user.drop_from_inventory(W, src)
user.removeItem(W, src)
tank = W
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
update_icon()
@@ -161,8 +161,7 @@
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/pipe))
if(buildstate == 0)
user.drop_from_inventory(W)
qdel(W)
user.deleteItem(W)
user << "<span class='notice'>You secure the piping inside the frame.</span>"
buildstate++
update_icon()
@@ -179,8 +178,7 @@
return
else if(istype(W,/obj/item/device/transfer_valve))
if(buildstate == 4)
user.drop_from_inventory(W)
qdel(W)
user.deleteItem(W)
user << "<span class='notice'>You install the transfer valve and connect it to the piping.</span>"
buildstate++
update_icon()
@@ -22,8 +22,7 @@
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
syringe = I
user << "<span class='notice'>You carefully insert [syringe] into [src].</span>"
user.remove_from_mob(syringe)
syringe.loc = src
user.removeItem(syringe, src)
sharp = 1
name = "syringe dart"
update_icon()
@@ -123,8 +122,7 @@
if(darts.len >= max_darts)
user << "<span class='warning'>[src] is full!</span>"
return
user.remove_from_mob(C)
C.loc = src
user.removeItem(C, src)
darts += C //add to the end
user.visible_message("[user] inserts \a [C] into [src].", "<span class='notice'>You insert \a [C] into [src].</span>")
else
+2 -4
View File
@@ -104,8 +104,7 @@
if(ammo_magazine)
user << "<span class='warning'>[src] already has a magazine loaded.</span>" //already a magazine here
return
user.remove_from_mob(AM)
AM.loc = src
user.removeItem(AM, src)
ammo_magazine = AM
user.visible_message("[user] inserts [AM] into [src].", "<span class='notice'>You insert [AM] into [src].</span>")
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
@@ -134,8 +133,7 @@
user << "<span class='warning'>[src] is full.</span>"
return
user.remove_from_mob(C)
C.loc = src
user.removeItem(C, src)
loaded.Insert(1, C) //add to the head of the list
user.visible_message("[user] inserts \a [C] into [src].", "<span class='notice'>You insert \a [C] into [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
@@ -25,7 +25,7 @@
if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something
qdel(W)
continue
M.drop_from_inventory(W)
M.removeItem(W, force = 1)
var/mob/living/new_mob
+1 -2
View File
@@ -393,8 +393,7 @@
user << "\The [O] is not suitable for blending."
return 1
user.remove_from_mob(O)
O.loc = src
user.removeItem(O, src)
holdingitems += O
src.updateUsrDialog()
return 0
@@ -50,7 +50,7 @@
return
if(user)
user.drop_from_inventory(C)
user.removeItem(C)
user << "<span class='notice'>You add \the [C] to \the [src].</span>"
C.loc = src
@@ -103,8 +103,7 @@
return
container = RC
user.drop_from_inventory(RC)
RC.loc = src
user.removeItem(RC, src)
user << "<span class='notice'>You set \the [RC] on \the [src].</span>"
nanomanager.update_uis(src) // update all UIs attached to src
@@ -49,7 +49,7 @@
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(var/newloc, atom/against = null)
if(ismob(loc))
var/mob/M = loc
M.drop_from_inventory(src)
M.removeItem(src)
//Creates a shattering noise and replaces the bottle with a broken_bottle
var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(newloc)
@@ -110,10 +110,9 @@
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/insert_rag(obj/item/weapon/reagent_containers/glass/rag/R, mob/user)
if(!isGlass || rag) return
if(user.unEquip(R))
if(user.removeItem(R, src))
user << "<span class='notice'>You stuff [R] into [src].</span>"
rag = R
rag.forceMove(src)
flags &= ~OPENCONTAINER
update_icon()
@@ -19,7 +19,7 @@
if(!usr) return
if(!reagents.total_volume)
M.visible_message("<span class='notice'>[M] finishes eating \the [src].</span>","<span class='notice'>You finish eating \the [src].</span>")
usr.drop_from_inventory(src) //so icons update :[
usr.removeItem(src) //so icons update :[
if(trash)
if(ispath(trash,/obj/item))
@@ -36,8 +36,7 @@
/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone)
if(!reagents.total_volume)
user << "<span class='danger'>None of [src] left!</span>"
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
return 0
if(istype(M, /mob/living/carbon))
@@ -164,10 +163,8 @@
return
user << "\red You slip [W] inside [src]."
user.remove_from_mob(W)
W.dropped(user)
user.removeItem(W, src)
add_fingerprint(user)
contents += W
return
if (has_edge(W))
@@ -490,8 +487,7 @@
return
user << "You crack \the [src] into \the [O]."
reagents.trans_to(O, reagents.total_volume)
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
/obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom)
..()
@@ -1626,7 +1622,7 @@
H.name = H.real_name
if(ismob(loc))
var/mob/M = loc
M.unEquip(src)
M.removeItem(src)
qdel(src)
return 1
@@ -226,8 +226,7 @@
user << "You add [D] to [src]."
qdel(D)
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
qdel(src)
user.deleteItem(src)
return
else if(istype(D, /obj/item/weapon/mop))
if(reagents.total_volume < 1)
@@ -31,7 +31,7 @@
return
M << "<span class='notice'>You swallow \the [src].</span>"
M.drop_from_inventory(src) //icon update
M.removeItem(src) //icon update
if(reagents.total_volume)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
qdel(src)
@@ -53,7 +53,7 @@
if(!do_mob(user, M))
return
user.drop_from_inventory(src) //icon update
user.removeItem(src) //icon update
user.visible_message("<span class='warning'>[user] forces [M] to swallow \the [src].</span>")
var/contained = reagentlist()
@@ -243,8 +243,7 @@
if (target != user && H.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.remove_from_mob(src)
qdel(src)
user.deleteItem(src)
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [target.name] ([target.ckey]) with \the [src] (INTENT: HARM).</font>"
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: HARM).</font>"
+1 -1
View File
@@ -421,7 +421,7 @@
magichead.canremove = 0 //curses!
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH
user.drop_from_inventory(user.wear_mask)
user.removeItem(user.wear_mask)
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
qdel(src)
else
+2 -3
View File
@@ -19,7 +19,7 @@
var/obj/item/old_item = L.get_equipped_item(slot_id)
L.equip_to_slot(new_item, slot_id)
if(old_item)
L.remove_from_mob(old_item)
L.removeItem(old_item)
if(delete_old)
qdel(old_item)
else
@@ -33,8 +33,7 @@
for(var/obj/item/to_remove in summoned_items)
if(istype(to_remove.loc, /mob))
var/mob/M = to_remove.loc
M.remove_from_mob(to_remove)
qdel(to_remove)
M.deleteItem(to_remove)
/spell/targeted/equip_item/proc/summon_item(var/newtype)
return new newtype
+1 -1
View File
@@ -342,7 +342,7 @@
"<span class=\"danger\">You touch \the [W] to \the [src] when everything suddenly goes silent.\"</span>\n<span class=\"notice\">\The [W] flashes into dust as you flinch away from \the [src].</span>",\
"<span class=\"warning\">Everything suddenly goes silent.</span>")
user.drop_from_inventory(W)
user.removeItem(W)
Consume(W)
user.apply_effect(150, IRRADIATE)
+1 -1
View File
@@ -30,7 +30,7 @@
var/obj/item/organ/external/E = tool
user.visible_message("<span class='notice'>[user] has attached [target]'s [E.name] to the [E.amputation_point].</span>>", \
"<span class='notice'>You have attached [target]'s [E.name] to the [E.amputation_point].</span>")
user.drop_from_inventory(E)
user.removeItem(E)
E.replaced(target)
E.loc = target
target.update_body()
+1 -1
View File
@@ -278,7 +278,7 @@
"<span class='notice'>You have transplanted \the [tool] into [target]'s [affected.name].</span>")
var/obj/item/organ/O = tool
if(istype(O))
user.remove_from_mob(O)
user.removeItem(O)
O.replaced(target,affected)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+1 -2
View File
@@ -417,8 +417,7 @@
var/obj/item/device/mmi/M = tool
var/obj/item/organ/internal/mmi_holder/holder = new(target, 1)
target.internal_organs_by_name["brain"] = holder
user.drop_from_inventory(tool)
tool.loc = holder
user.removeItem(tool, holder)
holder.stored_mmi = tool
holder.update_from_mmi()
+1 -2
View File
@@ -237,8 +237,7 @@
if(!istype(C))
return
H.drop_from_inventory(C)
C.forceMove(src)
H.removeItem(C, src)
cell = C
powercheck()
usr << "<span class='notice'>You install [C] in [src].</span>"