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:
Datraen
2016-05-03 23:29:21 -04:00
parent fbcf5bd530
commit beda3185eb
152 changed files with 458 additions and 303 deletions

View File

@@ -393,7 +393,8 @@
user << "\The [O] is not suitable for blending."
return 1
user.removeItem(O, src)
user.remove_from_mob(O)
O.loc = src
holdingitems += O
src.updateUsrDialog()
return 0

View File

@@ -50,7 +50,7 @@
return
if(user)
user.removeItem(C)
user.drop_from_inventory(C)
user << "<span class='notice'>You add \the [C] to \the [src].</span>"
C.loc = src
@@ -103,7 +103,8 @@
return
container = RC
user.removeItem(RC, src)
user.drop_from_inventory(RC)
RC.loc = src
user << "<span class='notice'>You set \the [RC] on \the [src].</span>"
nanomanager.update_uis(src) // update all UIs attached to src

View File

@@ -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.removeItem(src)
M.drop_from_inventory(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,9 +110,10 @@
/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.removeItem(R, src))
if(user.unEquip(R))
user << "<span class='notice'>You stuff [R] into [src].</span>"
rag = R
rag.forceMove(src)
flags &= ~OPENCONTAINER
update_icon()

View File

@@ -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.removeItem(src) //so icons update :[
usr.drop_from_inventory(src) //so icons update :[
if(trash)
if(ispath(trash,/obj/item))
@@ -36,7 +36,8 @@
/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.deleteItem(src)
user.drop_from_inventory(src)
qdel(src)
return 0
if(istype(M, /mob/living/carbon))
@@ -163,8 +164,10 @@
return
user << "\red You slip [W] inside [src]."
user.removeItem(W, src)
user.remove_from_mob(W)
W.dropped(user)
add_fingerprint(user)
contents += W
return
if (has_edge(W))
@@ -487,7 +490,8 @@
return
user << "You crack \the [src] into \the [O]."
reagents.trans_to(O, reagents.total_volume)
user.deleteItem(src)
user.drop_from_inventory(src)
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom)
..()
@@ -1622,7 +1626,7 @@
H.name = H.real_name
if(ismob(loc))
var/mob/M = loc
M.removeItem(src)
M.unEquip(src)
qdel(src)
return 1

View File

@@ -226,7 +226,8 @@
user << "You add [D] to [src]."
qdel(D)
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.deleteItem(src)
user.drop_from_inventory(src)
qdel(src)
return
else if(istype(D, /obj/item/weapon/mop))
if(reagents.total_volume < 1)

View File

@@ -31,7 +31,7 @@
return
M << "<span class='notice'>You swallow \the [src].</span>"
M.removeItem(src) //icon update
M.drop_from_inventory(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.removeItem(src) //icon update
user.drop_from_inventory(src) //icon update
user.visible_message("<span class='warning'>[user] forces [M] to swallow \the [src].</span>")
var/contained = reagentlist()

View File

@@ -243,7 +243,8 @@
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.deleteItem(src)
user.remove_from_mob(src)
qdel(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>"