Fixed stacks sometimes having the wrong amount if created on another stack

This commit is contained in:
Tad Hardesty
2018-05-10 23:23:51 -07:00
committed by letterjay
parent 20ac9089a7
commit 021f30f0c0
24 changed files with 174 additions and 112 deletions
+4 -4
View File
@@ -493,10 +493,10 @@
D.pixel_z = target.pixel_z
if(do_mob(src, target, 100))
to_chat(src, "<span class='info'>Dismantling complete.</span>")
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(target.loc)
M.amount = 5
var/atom/Tsec = target.drop_location()
new /obj/item/stack/sheet/metal(Tsec, 5)
for(var/obj/item/I in target.component_parts)
I.forceMove(M.drop_location())
I.forceMove(Tsec)
var/obj/effect/temp_visual/swarmer/disintegration/N = new /obj/effect/temp_visual/swarmer/disintegration(get_turf(target))
N.pixel_x = target.pixel_x
N.pixel_y = target.pixel_y
@@ -505,7 +505,7 @@
if(istype(target, /obj/machinery/computer))
var/obj/machinery/computer/C = target
if(C.circuit)
C.circuit.forceMove(M.drop_location())
C.circuit.forceMove(Tsec)
qdel(target)