Fixes lua breaking when registering signals on turfs (#83018)

## About The Pull Request
Signals don't get removed on turfs when they're deleted. This fixes that
so that it is reflected in lua as well.

## Why It's Good For The Game
Lua bugfixes

## Changelog
🆑
fix: Fixed lua scripts breaking when turfs with registered signals get
deleted.
/🆑

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
This commit is contained in:
Watermelon914
2024-05-03 20:15:35 +00:00
committed by GitHub
parent 0ca5dcb61b
commit cc1df2405e
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ function HandlerGroup:register_signal(datum, signal, func)
if not callback then
return
end
table.insert(self.registered, { datum = datum, signal = signal, callback = callback })
table.insert(self.registered, { datum = dm.global_proc("WEAKREF", datum), signal = signal, callback = callback })
end
-- Clears all the signals that have been registered on this HandlerGroup