From 8efa1de8356630f2943e3d74e7287b5e976e8706 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 27 Jul 2019 20:55:38 +0200 Subject: Check for 'action' field in ABMs & LBMs --- builtin/game/register.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'builtin/game') diff --git a/builtin/game/register.lua b/builtin/game/register.lua index d111e5c27..51492e928 100644 --- a/builtin/game/register.lua +++ b/builtin/game/register.lua @@ -79,6 +79,7 @@ end function core.register_abm(spec) -- Add to core.registered_abms + assert(type(spec.action) == "function", "Required field 'action' of type function") core.registered_abms[#core.registered_abms + 1] = spec spec.mod_origin = core.get_current_modname() or "??" end @@ -86,6 +87,7 @@ end function core.register_lbm(spec) -- Add to core.registered_lbms check_modname_prefix(spec.name) + assert(type(spec.action) == "function", "Required field 'action' of type function") core.registered_lbms[#core.registered_lbms + 1] = spec spec.mod_origin = core.get_current_modname() or "??" end -- cgit v1.2.3