mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Reverts the second mob clean up because of incomplete implementation.
This caused an error that would then cause machinery to hang on the server, and was reproduced successfully.
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
/obj/item/Destroy()
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.removeItem(src, force = 1)
|
||||
m.drop_from_inventory(src)
|
||||
m.update_inv_r_hand()
|
||||
m.update_inv_l_hand()
|
||||
src.loc = null
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
src.throwing = 0
|
||||
if (src.loc == user)
|
||||
if(!user.removeItem(src))
|
||||
if(!user.unEquip(src))
|
||||
return
|
||||
else
|
||||
if(isliving(src.loc))
|
||||
|
||||
@@ -1152,13 +1152,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return 1
|
||||
else
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id) && user.removeItem(I, src))
|
||||
if (istype(I, /obj/item/weapon/card/id) && user.unEquip(I))
|
||||
I.loc = src
|
||||
id = I
|
||||
return 1
|
||||
else
|
||||
var/obj/item/weapon/card/I = user.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.removeItem(I, src))
|
||||
if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.unEquip(I))
|
||||
var/obj/old_id = id
|
||||
I.loc = src
|
||||
id = I
|
||||
user.put_in_hands(old_id)
|
||||
return 1
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
|
||||
if(!parts)
|
||||
user << "<span class='warning'>This kit has no parts for this modification left.</span>"
|
||||
user.deleteItem(src)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/allowed = 0
|
||||
@@ -58,7 +59,8 @@
|
||||
parts &= ~MODKIT_SUIT
|
||||
|
||||
if(!parts)
|
||||
user.deleteItem(src)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/modkit/examine(mob/user)
|
||||
..(user)
|
||||
|
||||
@@ -27,11 +27,13 @@
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
|
||||
user.removeItem(W, A)
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = A
|
||||
W.master = A
|
||||
A.part1 = W
|
||||
|
||||
user.removeItem(src, A)
|
||||
user.drop_from_inventory(src)
|
||||
loc = A
|
||||
master = A
|
||||
A.part2 = src
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ For new antags, make sure to add "player.mind.accept_tcrystals = 1" if you want
|
||||
/obj/item/device/telecrystal/attack_self(mob/user as mob)
|
||||
if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals
|
||||
user.mind.tcrystals += 1
|
||||
user.deleteItem(src)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -47,8 +47,9 @@
|
||||
if(attached_device)
|
||||
user << "<span class='warning'>There is already an device attached to the valve, remove it first.</span>"
|
||||
return
|
||||
user.removeItem(A, src)
|
||||
user.remove_from_mob(item)
|
||||
attached_device = A
|
||||
A.loc = src
|
||||
user << "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>"
|
||||
A.holder = src
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
return
|
||||
var/obj/item/weapon/spacecash/S = W
|
||||
user.visible_message("<span class='notice'>[user] puts [S.worth] [S.worth > 1 ? "thalers" : "thaler"] into \the [src].</span>")
|
||||
user.removeItem(S, src)
|
||||
user.drop_from_inventory(S)
|
||||
S.loc = src
|
||||
update_icon()
|
||||
|
||||
/obj/item/glass_jar/update_icon() // Also updates name and desc
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(!istype(user))
|
||||
var/mob/living/temp = user
|
||||
if(istype(temp))
|
||||
temp.removeItem(src, force = 1)
|
||||
temp.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
B.loc = get_turf(src)
|
||||
user << "<span class='notice'>You armed the robot frame.</span>"
|
||||
if (user.get_inactive_hand()==src)
|
||||
user.removeItem(src)
|
||||
user.remove_from_mob(src)
|
||||
user.put_in_inactive_hand(B)
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
amount -= used
|
||||
if (amount <= 0)
|
||||
if(usr)
|
||||
usr.removeItem(src)
|
||||
usr.remove_from_mob(src)
|
||||
qdel(src) //should be safe to qdel immediately since if someone is still using this stack it will persist for a little while longer
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
if((stored_matter + 10) > 30)
|
||||
user << "<span class='notice'>The RCD can't hold any more matter-units.</span>"
|
||||
return
|
||||
user.deleteItem(W)
|
||||
user.drop_from_inventory(W)
|
||||
qdel(W)
|
||||
stored_matter += 10
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user << "<span class='notice'>The RCD now holds [stored_matter]/30 matter-units.</span>"
|
||||
|
||||
@@ -156,7 +156,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/mob/living/M = loc
|
||||
if (!nomessage)
|
||||
M << "<span class='notice'>Your [name] goes out.</span>"
|
||||
M.removeItem(src) //un-equip it so the overlays can update
|
||||
M.remove_from_mob(src) //un-equip it so the overlays can update
|
||||
M.update_inv_wear_mask(0)
|
||||
M.update_inv_l_hand(0)
|
||||
M.update_inv_r_hand(1)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
spawn(0)//this prevents the collapse of space-time continuum
|
||||
if (user)
|
||||
user.removeItem(src, force = 1)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return uses
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if(!ispath(gift_type,/obj/item)) return
|
||||
|
||||
var/obj/item/I = new gift_type(M)
|
||||
M.removeItem(src)
|
||||
M.remove_from_mob(src)
|
||||
M.put_in_hands(I)
|
||||
I.add_fingerprint(M)
|
||||
qdel(src)
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
path = 1
|
||||
user << "<span class='notice'>You add [W] to the metal casing.</span>"
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
|
||||
user.removeItem(det, src)
|
||||
user.remove_from_mob(det)
|
||||
det.loc = src
|
||||
detonator = det
|
||||
if(istimer(detonator.a_left))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
@@ -175,7 +176,7 @@
|
||||
|
||||
if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand
|
||||
var/mob/living/carbon/C = loc
|
||||
C.removeItem(src)
|
||||
C.drop_from_inventory(src)
|
||||
C.throw_mode_off()
|
||||
|
||||
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(dispenser)
|
||||
cuffs = new(get_turf(user))
|
||||
else
|
||||
user.removeItem(cuffs)
|
||||
user.drop_from_inventory(cuffs)
|
||||
cuffs.loc = target
|
||||
target.handcuffed = cuffs
|
||||
target.update_inv_handcuffed()
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
c.scanned = A
|
||||
if(istype(A.loc,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = A.loc
|
||||
H.removeItem(A)
|
||||
H.remove_from_mob(A)
|
||||
else if(istype(A.loc,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = A.loc
|
||||
S.remove_from_storage(A)
|
||||
|
||||
@@ -62,7 +62,9 @@
|
||||
finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user))
|
||||
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
|
||||
if(finished)
|
||||
user.deleteItem(src)
|
||||
user.deleteItem(I)
|
||||
user.drop_from_inventory(src)
|
||||
user.drop_from_inventory(I)
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
user.put_in_hands(finished)
|
||||
update_icon(user)
|
||||
|
||||
@@ -50,7 +50,8 @@ var/global/list/ashtray_cache = list()
|
||||
if (contents.len >= max_butts)
|
||||
user << "\The [src] is full."
|
||||
return
|
||||
user.removeItem(W, src)
|
||||
user.remove_from_mob(W)
|
||||
W.loc = src
|
||||
|
||||
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cig = W
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/M = loc
|
||||
M.removeItem(src, force = 1)
|
||||
M.drop_from_inventory(src)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
if(!consumed && drops_debris) material.place_shard(T)
|
||||
qdel(src)
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/attack_self(mob/user as mob)
|
||||
user.removeItem(src, force = 1)
|
||||
user.drop_from_inventory(src)
|
||||
spawn(1) if(src) qdel(src)
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/dropped()
|
||||
@@ -225,5 +225,5 @@
|
||||
organ.implants -= src
|
||||
host.pinned -= src
|
||||
host.embedded -= src
|
||||
host.removeItem(src, force = 1)
|
||||
host.drop_from_inventory(src)
|
||||
spawn(1) if(src) qdel(src)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mop_deploy/attack_self(mob/user as mob)
|
||||
user.removeItem(src, force = 1)
|
||||
user.drop_from_inventory(src)
|
||||
spawn(1) if(src) del(src)
|
||||
|
||||
/obj/item/weapon/mop_deploy/dropped()
|
||||
@@ -70,5 +70,5 @@
|
||||
organ.implants -= src
|
||||
host.pinned -= src
|
||||
host.embedded -= src
|
||||
host.removeItem(src, force = 1)
|
||||
host.drop_from_inventory(src)
|
||||
spawn(1) if(src) del(src)
|
||||
@@ -153,7 +153,7 @@
|
||||
break
|
||||
|
||||
if(!inserted || !S.amount)
|
||||
usr.removeItem(S)
|
||||
usr.remove_from_mob(S)
|
||||
usr.update_icons() //update our overlays
|
||||
if (usr.client && usr.s_active != src)
|
||||
usr.client.screen -= S
|
||||
|
||||
@@ -82,6 +82,6 @@
|
||||
use_to_pickup = 0
|
||||
|
||||
/obj/item/weapon/storage/laundry_basket/offhand/dropped(mob/user as mob)
|
||||
user.removeItem(linked, force = 1)
|
||||
user.drop_from_inventory(linked)
|
||||
return
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !usr.removeItem(src))
|
||||
if ((src.loc == usr) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
@@ -347,7 +347,7 @@
|
||||
/obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
|
||||
if(!istype(W)) return 0
|
||||
if(usr)
|
||||
usr.removeItem(W)
|
||||
usr.remove_from_mob(W)
|
||||
usr.update_icons() //update our overlays
|
||||
W.loc = src
|
||||
W.on_enter_storage(src)
|
||||
|
||||
@@ -104,7 +104,8 @@
|
||||
if ((!F.status)||(F.ptank)) return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
user.removeItem(src, F)
|
||||
user.remove_from_mob(src)
|
||||
src.loc = F
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -62,7 +62,8 @@
|
||||
else if(user.zone_sel.selecting == "r_hand" || user.zone_sel.selecting == "l_hand")
|
||||
var/obj/item/weapon/handcuffs/cable/tape/T = new(user)
|
||||
if(!T.place_handcuffs(H, user))
|
||||
user.deleteItem(T)
|
||||
user.unEquip(T)
|
||||
qdel(T)
|
||||
else
|
||||
return ..()
|
||||
return 1
|
||||
@@ -70,7 +71,7 @@
|
||||
/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user)
|
||||
if(!istype(W, /obj/item/weapon/paper))
|
||||
return
|
||||
user.removeItem(W)
|
||||
user.drop_from_inventory(W)
|
||||
var/obj/item/weapon/ducttape/tape = new(get_turf(src))
|
||||
tape.attach(W)
|
||||
user.put_in_hands(tape)
|
||||
@@ -106,7 +107,7 @@
|
||||
|
||||
user << "You remove \the [initial(name)] from [stuck]."
|
||||
|
||||
user.removeItem(src)
|
||||
user.drop_from_inventory(src)
|
||||
stuck.forceMove(get_turf(src))
|
||||
user.put_in_hands(stuck)
|
||||
stuck = null
|
||||
@@ -128,7 +129,8 @@
|
||||
user << "You cannot reach that from here." // can only place stuck papers in cardinal directions, to
|
||||
return // reduce papers around corners issue.
|
||||
|
||||
user.removeItem(src, source_turf)
|
||||
user.drop_from_inventory(src)
|
||||
forceMove(source_turf)
|
||||
|
||||
if(params)
|
||||
var/list/mouse_control = params2list(params)
|
||||
|
||||
@@ -195,12 +195,12 @@
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
if (user.r_hand == src)
|
||||
user.removeItem(src)
|
||||
user.remove_from_mob(src)
|
||||
else
|
||||
user.removeItem(src)
|
||||
user.remove_from_mob(src)
|
||||
src.master = F
|
||||
src.layer = initial(src.layer)
|
||||
user.removeItem(src)
|
||||
user.remove_from_mob(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
src.loc = F
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
)
|
||||
|
||||
deployed = 1
|
||||
user.removeItem(src)
|
||||
user.drop_from_inventory(src)
|
||||
update_icon()
|
||||
anchored = 1
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if (can_hang && !coat)
|
||||
user.visible_message("[user] hangs [W] on \the [src].", "You hang [W] on the \the [src]")
|
||||
coat = W
|
||||
user.removeItem(coat, src)
|
||||
user.drop_from_inventory(coat, src)
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='notice'>You cannot hang [W] on [src]</span>"
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
user << "<span class='warning'>Unwield the axe first.</span>"
|
||||
return
|
||||
fireaxe = O
|
||||
user.removeItem(O, src)
|
||||
user.remove_from_mob(O)
|
||||
src.contents += O
|
||||
user << "<span class='notice'>You place the fire axe back in the [src.name].</span>"
|
||||
update_icon()
|
||||
else
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/extinguisher))
|
||||
if(!has_extinguisher && opened)
|
||||
user.removeItem(O, src)
|
||||
user.remove_from_mob(O)
|
||||
contents += O
|
||||
has_extinguisher = O
|
||||
user << "<span class='notice'>You place [O] in [src].</span>"
|
||||
else
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
if(notices < 5)
|
||||
O.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
user.removeItem(O, src)
|
||||
user.drop_from_inventory(O)
|
||||
O.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]" //update sprite
|
||||
user << "<span class='notice'>You pin the paper to the noticeboard.</span>"
|
||||
|
||||
@@ -96,7 +96,9 @@
|
||||
user << "\The [src] is already padded."
|
||||
return
|
||||
var/obj/item/stack/C = W
|
||||
if(C.get_amount() < 1)
|
||||
if(C.get_amount() < 1) // How??
|
||||
user.drop_from_inventory(C)
|
||||
qdel(C)
|
||||
return
|
||||
var/padding_type //This is awful but it needs to be like this until tiles are given a material var.
|
||||
if(istype(W,/obj/item/stack/tile/carpet))
|
||||
@@ -110,7 +112,8 @@
|
||||
return
|
||||
C.use(1)
|
||||
if(!istype(src.loc, /turf))
|
||||
user.removeItem(src, get_turf(src))
|
||||
user.drop_from_inventory(src)
|
||||
src.loc = get_turf(src)
|
||||
user << "You add padding to \the [src]."
|
||||
add_padding(padding_type)
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@ var/global/list/stool_cache = list() //haha stool
|
||||
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if (prob(5) && istype(M,/mob/living))
|
||||
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!</span>")
|
||||
user.removeItem(src)
|
||||
user.remove_from_mob(src)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
var/mob/living/T = M
|
||||
@@ -112,7 +112,9 @@ var/global/list/stool_cache = list() //haha stool
|
||||
user << "\The [src] is already padded."
|
||||
return
|
||||
var/obj/item/stack/C = W
|
||||
if(C.get_amount() < 1)
|
||||
if(C.get_amount() < 1) // How??
|
||||
user.drop_from_inventory(C)
|
||||
qdel(C)
|
||||
return
|
||||
var/padding_type //This is awful but it needs to be like this until tiles are given a material var.
|
||||
if(istype(W,/obj/item/stack/tile/carpet))
|
||||
@@ -126,7 +128,8 @@ var/global/list/stool_cache = list() //haha stool
|
||||
return
|
||||
C.use(1)
|
||||
if(!istype(src.loc, /turf))
|
||||
user.removeItem(src, get_turf(src))
|
||||
user.drop_from_inventory(src)
|
||||
src.loc = get_turf(src)
|
||||
user << "You add padding to \the [src]."
|
||||
add_padding(padding_type)
|
||||
return
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
if(istype(W, /obj/item/target))
|
||||
density = 0
|
||||
W.density = 1
|
||||
user.removeItem(W, loc)
|
||||
user.remove_from_mob(W)
|
||||
W.loc = loc
|
||||
W.layer = 3.1
|
||||
pinned_target = W
|
||||
user << "You slide the target into the stake."
|
||||
|
||||
Reference in New Issue
Block a user