Files
CHOMPStation2/code/modules/lootpanel/handlers.dm
CHOMPStation2StaffMirrorBot 23fee17c6d [MIRROR] Replace the alt click menu with the RPG Lootpanel (#11170)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
2025-07-11 08:27:55 +02:00

20 lines
450 B
Plaintext

/// On contents change, either reset or update
/datum/lootpanel/proc/on_searchable_deleted(datum/search_object/source)
SIGNAL_HANDLER
contents -= source
to_image -= source
var/datum/tgui/window = SStgui.get_open_ui(owner.mob, src)
#if !defined(UNIT_TESTS) // we dont want to delete contents if we're testing
if(isnull(window))
reset_contents()
return
#endif
if(isturf(source.item))
populate_contents()
return
window?.send_update()