mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Fixed lua-created atoms from hard deleting (#77391)
## About The Pull Request Lua created atoms hard delete because they get added to a references list without ever being cleared. This fixes that by registering a qdeleting signal on them and removing them from the list on delete. ## Why It's Good For The Game Harddel fixes ## Changelog 🆑 fix: Fixed a hard delete that would occur with lua-created atoms. /🆑 --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
This commit is contained in:
@@ -17,9 +17,12 @@ end
|
||||
|
||||
function SS13.new(type, ...)
|
||||
local datum = dm.global_proc("_new", type, { ... })
|
||||
local references = SS13.state.vars.references
|
||||
references:add(datum)
|
||||
return datum
|
||||
if datum then
|
||||
local references = SS13.state.vars.references
|
||||
references:add(datum)
|
||||
SS13.state:call_proc("clear_on_delete", datum)
|
||||
return datum
|
||||
end
|
||||
end
|
||||
|
||||
function SS13.await(thing_to_call, proc_to_call, ...)
|
||||
|
||||
Reference in New Issue
Block a user