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-04 00:24:55 -04:00
parent fbcf5bd530
commit beda3185eb
152 changed files with 458 additions and 303 deletions
+2 -1
View File
@@ -108,7 +108,8 @@
if(stored_ammo.len >= max_ammo)
user << "<span class='warning'>[src] is full!</span>"
return
user.removeItem(C, src)
user.remove_from_mob(C)
C.loc = 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.removeItem(W, src)
user.drop_from_inventory(W, src)
bolt = W
user.visible_message("[user] slides [bolt] into [src].","You slide [bolt] into [src].")
update_icon()
@@ -47,7 +47,8 @@
if(grenades.len >= max_grenades)
user << "<span class='warning'>[src] is full.</span>"
return
user.removeItem(G, src)
user.remove_from_mob(G)
G.loc = 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
@@ -105,7 +106,8 @@
if(chambered)
user << "<span class='warning'>[src] is already loaded.</span>"
return
user.removeItem(G, src)
user.remove_from_mob(G)
G.loc = 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.removeItem(W, src)
user.drop_from_inventory(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,7 +161,8 @@
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/pipe))
if(buildstate == 0)
user.deleteItem(W)
user.drop_from_inventory(W)
qdel(W)
user << "<span class='notice'>You secure the piping inside the frame.</span>"
buildstate++
update_icon()
@@ -178,7 +179,8 @@
return
else if(istype(W,/obj/item/device/transfer_valve))
if(buildstate == 4)
user.deleteItem(W)
user.drop_from_inventory(W)
qdel(W)
user << "<span class='notice'>You install the transfer valve and connect it to the piping.</span>"
buildstate++
update_icon()
@@ -22,7 +22,8 @@
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
syringe = I
user << "<span class='notice'>You carefully insert [syringe] into [src].</span>"
user.removeItem(syringe, src)
user.remove_from_mob(syringe)
syringe.loc = src
sharp = 1
name = "syringe dart"
update_icon()
@@ -122,7 +123,8 @@
if(darts.len >= max_darts)
user << "<span class='warning'>[src] is full!</span>"
return
user.removeItem(C, src)
user.remove_from_mob(C)
C.loc = 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
+4 -2
View File
@@ -104,7 +104,8 @@
if(ammo_magazine)
user << "<span class='warning'>[src] already has a magazine loaded.</span>" //already a magazine here
return
user.removeItem(AM, src)
user.remove_from_mob(AM)
AM.loc = 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)
@@ -133,7 +134,8 @@
user << "<span class='warning'>[src] is full.</span>"
return
user.removeItem(C, src)
user.remove_from_mob(C)
C.loc = 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.removeItem(W, force = 1)
M.drop_from_inventory(W)
var/mob/living/new_mob