Commit Graph

4 Commits

Author SHA1 Message Date
Watermelon914
c2b0d9bf29 More lua harddel fixes (#77556)
## About The Pull Request
Fixes some more lua harddel problems with lingering refs on the gc_guard
variable. This variable has been changed to a list instead and will get
cleared every time the SSlua subsystem fires so that lua instantiated
objects that are not tracked by the subsystem will essentially delete
themselves on the next tick, aka whenever the lua script sleeps.

Also removed the unnecessary and not completely functional
lua_reference_cleanup proc which wasn't even being called reliably
because the signal handler was the datum itself.

## Why It's Good For The Game
Fixes more harddel bugs, increases consistency.

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2023-08-13 14:46:51 -06:00
Y0SH1M4S73R
f2d0f99751 [Lua] You can now await expensive non-sleeping procs. (#69570)
When trying to run getFlatIcon using lua scripting, I discovered that it was so expensive that, for certain atoms like complex humans, there is no way it will complete within the lua execution limit. While Mothblocks would suggest just raising the execution limit, the idea leaves a bad taste in my mouth due to the possibility of a script causing extreme lag by consistently overrunning the BYOND tick.

I instead elected to make /datum/auxtools_promise sleep once before invoking its assigned proc, thus immediately returning execution to lua, even if the proc being awaited wouldn't sleep. This allows for awaiting extremely expensive non-sleeping procs (like the aforementioned getFlatIcon)
2022-09-01 10:20:04 +01:00
Y0SH1M4S73R
a6b4c3db8a [GBP no update] Mitigates lua-related harddels and fixes lua signal handlers for COMSIG_PARENT_QDELETING (#68677) 2022-07-24 00:56:17 -07:00
Y0SH1M4S73R
4e6e1f090e [Ready for Review] Admin lua scripting (#65635)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-07-19 15:45:23 -07:00