Close storage UI when item becomes inaccessible (#14536)

* add hide_from_all to storage objects, to call by something once it's locked/close

* lockers call hide_from_all on stored storage items

* secure storage calls hide_from_all on lock

* throwing storage closes it

* adding storage to a disposal chute closes it

* adding storage to a crate closes it

* adding storage to the destructive analyzer closes it
This commit is contained in:
nicetoolbox
2020-12-16 11:47:26 -08:00
committed by GitHub
parent 1683c4271a
commit f54b6904b9
7 changed files with 31 additions and 2 deletions
+3
View File
@@ -629,6 +629,9 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
return
if(thrown_thing)
if(istype(thrown_thing, /obj/item/storage))
var/obj/item/storage/S = thrown_thing
S.hide_from_all()
visible_message("<span class='danger'>[src] has thrown [thrown_thing].</span>")
newtonian_move(get_dir(target, src))
thrown_thing.throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed, src, null, null, null, move_force)