Commit Graph

5 Commits

Author SHA1 Message Date
SkyratBot
1eaf6a16f0 [MIRROR] Fixes SS13.register_signal on parent_qdeleting signal in lua causing an error [MDB IGNORE] (#22061)
* Fixes SS13.register_signal on parent_qdeleting signal in lua causing an error (#76282)

## About The Pull Request
Potato renamed comp_lookup to _listen_lookup, which wasn't updated in
the lua script. This PR changes the SS13 lua script to properly access
the correct variable

## Why It's Good For The Game
Bugfix

## Changelog

Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>

* Fixes SS13.register_signal on parent_qdeleting signal in lua causing an error

---------

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
2023-06-27 20:39:09 -07:00
SkyratBot
1e7569e0b6 [MIRROR] Fixes hard-dels related to lua signal handlers [MDB IGNORE] (#15965)
* Fixes hard-dels related to lua signal handlers (#69555)

When I changed the syntax of SS13.lua to account for the ability to properly index tables with datums, it turns out that the callbacks created for signal handlers and timeouts had circular references, resulting in hard-deletes.

My first solution was to make it so signal handler and timeout callbacks use weakrefs, which get resolved in lua_state/call_function, but it turns out that, when calling the signal cleanup function, a qdeleted-but-not-yet-garbage-collected datum's weakref resolves to null because datum.gc_collected is set to GC_CURRENTLY_BEING_QDELETED before COMSIG_PARENT_QDELETING gets sent.

To resolve this issue, Potato and Oranges both recommended that I make a snowflake variant of resolve which ignores whether the datum a weakref points to is qdeleted - only that it is null or it's weakref isn't the very weakref resolve was called on. This proc was given a lengthy autodoc comment describing when it should or shouldn't be used, to ensure it is only used in cases similar to the one I needed to create it for (needing to resolve a weakref to a datum in a COMSIG_PARENT_QDELETING handler registered on that very datum).

* Fixes hard-dels related to lua signal handlers

Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
2022-09-04 13:58:36 +01:00
SkyratBot
8790837555 [MIRROR] Bumps auxlua to 1.2.1 (+ several other ui fixes and qol tweaks) [MDB IGNORE] (#15786) 2022-08-26 15:48:00 -07:00
Zonespace
a1aee41c68 Ports upstream LUA PRs (#15200)
* 1

* Launch Dreamseeker is the default vscode launch config once again (#68666)

Co-authored-by: William Wallace <me@wiox.me>
2022-07-27 15:14:22 -07:00
Zonespace
15a223ff2d [MIRROR] Admin lua scripting (#65635) (#15118)
[Ready for Review] Admin lua scripting (#65635)

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>

Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-07-24 19:55:53 +01:00