Files
Bubberstation/lua/SS13.lua
SkyratBot 3ff553cb62 [MIRROR] Moves lua off of the timer subsystem and onto its own internal scheduler. (#26980)
* Moves lua off of the timer subsystem and onto its own internal scheduler. (#82131)

## About The Pull Request
Lua uses the timer subsystem, which can end up holding the entire timer
subsystem if lua is creating a lot of timers.
The solution to this is to use an internal scheduler instead so that the
load gets placed onto the lua subsystem.

## Why It's Good For The Game
Performance improvement when using lua scripts.

## Changelog
🆑
refactor: Auxlua no longer uses the timer subsystem to get stuff done,
lua scripts shouldn't slow down timers anymore.
/🆑

---------

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

* Moves lua off of the timer subsystem and onto its own internal scheduler.

---------

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
2024-04-03 01:04:17 +02:00

11 lines
248 B
Lua

local SS13 = require("SS13_base")
local timer = require("timer")
SS13.wait = timer.wait
SS13.set_timeout = timer.set_timeout
SS13.start_loop = timer.start_loop
SS13.end_loop = timer.end_loop
SS13.stop_all_loops = timer.stop_all_loops
return SS13