mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
Merge pull request #13542 from KorPhaeron/gigantic_epipens
Fixes small objects covering the entire tile after a fire
This commit is contained in:
@@ -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)
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user