Lootpanel Improvements (#94995)

## About The Pull Request

Makes the lootpanel act like you'd expect it to.

## Why It's Good For The Game

You should not need to manually refresh the loot panel. You should not
be able to monitor a turf on the other side of the station.

## Changelog

🆑
fix: The lootpanel will now properly close with distance from the target
like most other tguis.
qol: The lootpanel will now automatically refresh when new items enter
it. Removed the manual refresh button.
/🆑

Co-authored-by: Jordan Dominion <Cyberboss@users.noreply.github.com>
This commit is contained in:
Jordan Dominion
2026-01-28 13:16:15 +13:00
committed by GitHub
co-authored by Jordan Dominion
parent 70c2ce2925
commit 37df0a0cbe
4 changed files with 43 additions and 31 deletions
+5
View File
@@ -1,5 +1,10 @@
/// Helper to open the panel
/datum/lootpanel/proc/open(turf/tile)
if (tile != source_turf)
if (source_turf)
UnregisterSignal(source_turf, COMSIG_ATOM_ENTERED)
RegisterSignal(tile, COMSIG_ATOM_ENTERED, PROC_REF(on_source_turf_entered))
source_turf = tile
#if !defined(OPENDREAM) && !defined(UNIT_TESTS)