mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Holodeck closet & crate items are marked as holograms (#84326)
## About The Pull Request - Fixes #83834 - Fixes #74765 When a holographic closet/crate is opened for the 1st time all their items are marked as holograms & get deleted when the simulation is changed ## Changelog 🆑 fix: Holodeck closet & crate items are marked as holograms as well fix: Holodeck closet & crate items delete themselves when the program is changed /🆑
This commit is contained in:
@@ -293,6 +293,8 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
|
||||
|
||||
if(isstructure(holo_object))
|
||||
holo_object.obj_flags |= NO_DEBRIS_AFTER_DECONSTRUCTION
|
||||
if(istype(holo_object, /obj/structure/closet))
|
||||
RegisterSignal(holo_object, COMSIG_CLOSET_CONTENTS_INITIALIZED, PROC_REF(register_contents))
|
||||
return
|
||||
|
||||
if(ismachinery(holo_object))
|
||||
@@ -304,6 +306,14 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
|
||||
var/obj/machinery/button/holo_button = holo_machine
|
||||
holo_button.setup_device()
|
||||
|
||||
/obj/machinery/computer/holodeck/proc/register_contents(obj/structure/closet/storage)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
for(var/atom/movable/item as anything in storage.get_all_contents_type(/atom/movable))
|
||||
if(item == storage)
|
||||
continue
|
||||
add_to_spawned(item)
|
||||
|
||||
/**
|
||||
* A separate proc for objects that weren't loaded by the template nor spawned by holo effects
|
||||
* yet need to be added to the list of spawned objects. (e.g. holographic fishes)
|
||||
|
||||
Reference in New Issue
Block a user