From 6f891dcb9cd562c52979bc46dfb9a8b18da0e7a1 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Wed, 22 Apr 2026 19:52:13 +0200 Subject: [PATCH] define hooks --- src/lua_rds.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lua_rds.c b/src/lua_rds.c index 1a663b6..ee590f6 100644 --- a/src/lua_rds.c +++ b/src/lua_rds.c @@ -60,6 +60,19 @@ void init_lua(RDSEncoder* _enc) { lua_registertotable(L, "get_writing_program", lua_get_rds_writing_program); lua_setglobal(L, "dp"); + lua_newtable(L); + lua_newtable(L); + lua_setfield(L, -2, "on_init"); + lua_newtable(L); + lua_setfield(L, -2, "on_start"); + lua_newtable(L); + lua_setfield(L, -2, "on_state"); + lua_newtable(L); + lua_setfield(L, -2, "tick"); + lua_newtable(L); + lua_setfield(L, -2, "rt_transmission"); + lua_setfield(L, -1, "hooks"); + lua_newtable(L); lua_newtable(L);