Merge pull request #13542 from KorPhaeron/gigantic_epipens

Fixes small objects covering the entire tile after a fire
This commit is contained in:
Cheridan
2015-12-11 07:23:00 -06:00
3 changed files with 18 additions and 7 deletions
@@ -324,7 +324,7 @@
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target
/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W, atom/new_location)
/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
if(!istype(W)) return 0
if(istype(src, /obj/item/weapon/storage/fancy))
@@ -350,9 +350,15 @@
W.on_exit_storage(src)
update_icon()
W.mouse_opacity = initial(W.mouse_opacity)
if(burn)
W.fire_act()
return 1
/obj/item/weapon/storage/empty_object_contents(burn, src.loc)
for(var/obj/item/Item in contents)
remove_from_storage(Item, src.loc, burn)
//This proc is called when you want to place an item into the storage item.
/obj/item/weapon/storage/attackby(obj/item/W, mob/user, params)
..()
+10 -4
View File
@@ -173,9 +173,7 @@
return 1
/obj/proc/burn()
for(var/obj/item/Item in contents) //Empty out the contents
Item.loc = src.loc
Item.fire_act() //Set them on fire, too
empty_object_contents(1, src.loc)
var/obj/effect/decal/cleanable/ash/A = new(src.loc)
A.desc = "Looks like this used to be a [name] some time ago."
SSobj.burning -= src
@@ -185,4 +183,12 @@
if(burn_state == 1)
burn_state = 0
overlays -= fire_overlay
SSobj.burning -= src
SSobj.burning -= src
/obj/proc/empty_object_contents(burn = 0, new_loc = src.loc)
for(var/obj/item/Item in contents) //Empty out the contents
Item.loc = new_loc
if(burn)
Item.fire_act() //Set them on fire, too