Fixes aciding a bucket while it's inside something being naughty. (#10003)

This commit is contained in:
FirinMaLazors
2020-09-19 12:11:42 +02:00
committed by GitHub
parent 7124812b83
commit 2c96d29976
4 changed files with 13 additions and 3 deletions
@@ -473,9 +473,9 @@
if(O.unacidable)
return
if((istype(O, /obj/item) || istype(O, /obj/effect/plant)) && (volume > meltdose))
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(get_turf(O))
I.desc = "Looks like this was \an [O] some time ago."
for(var/mob/M in viewers(5, O))
for(var/mob/M in viewers(get_turf(O), 5))
to_chat(M, "<span class='warning'>\The [O] melts.</span>")
qdel(O)
remove_self(meltdose) // 10 units of acid will not melt EVERYTHING on the tile
@@ -117,6 +117,8 @@
/obj/machinery/chemical_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
if(container && !container.reagents) //sanity check in case you destroyed the container... such as if you dispensed acid into an acidable bucket.
container = null
var/data[0]
data["amount"] = amount
data["isBeakerLoaded"] = container ? 1 : 0