From bc7909c3927023be2557e62999367e21d1b88b9b Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Thu, 20 Apr 2023 18:28:23 +1000 Subject: [PATCH] allow interact type to be 0 in hook_mario_action (#350) * allow interact type to be 0 in hook_mario_action --- autogen/lua_definitions/constants.lua | 6 ------ docs/lua/constants.md | 3 --- src/pc/lua/smlua_constants_autogen.c | 3 --- src/pc/lua/smlua_hooks.c | 2 +- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index ee960c0d..d43bf66f 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -11529,9 +11529,3 @@ MINOR_VERSION_NUMBER = 0 --- @type integer PATCH_VERSION_NUMBER = 0 - ---- @type integer -VERSION_NUMBER = 34 - ---- @type string -VERSION_TEXT = "beta" diff --git a/docs/lua/constants.md b/docs/lua/constants.md index a7b85f2a..a2977394 100644 --- a/docs/lua/constants.md +++ b/docs/lua/constants.md @@ -4092,10 +4092,7 @@ ## [version.h](#version.h) - MAX_LOCAL_VERSION_LENGTH - MAX_VERSION_LENGTH -- MINOR_VERSION_NUMBER - PATCH_VERSION_NUMBER -- VERSION_NUMBER -- VERSION_TEXT [:arrow_up_small:](#) diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 0e52988f..1bed54bc 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -4015,9 +4015,6 @@ char gSmluaConstants[] = "" "COOP_OBJ_FLAG_LUA = (1 << 1)\n" "COOP_OBJ_FLAG_NON_SYNC = (1 << 2)\n" "COOP_OBJ_FLAG_INITIALIZED = (1 << 3)\n" -"VERSION_TEXT = 'beta'\n" -"VERSION_NUMBER = 34\n" -"MINOR_VERSION_NUMBER = 0\n" "PATCH_VERSION_NUMBER = 0\n" "MAX_VERSION_LENGTH = 28\n" "MAX_LOCAL_VERSION_LENGTH = 32\n" diff --git a/src/pc/lua/smlua_hooks.c b/src/pc/lua/smlua_hooks.c index cac0e2eb..11a21d06 100644 --- a/src/pc/lua/smlua_hooks.c +++ b/src/pc/lua/smlua_hooks.c @@ -761,7 +761,7 @@ int smlua_hook_mario_action(lua_State* L) { lua_Integer interactionType = 0; if (paramCount >= 3) { interactionType = smlua_to_integer(L, 3); - if (interactionType == 0 || !gSmLuaConvertSuccess) { + if (!gSmLuaConvertSuccess) { LOG_LUA_LINE("Hook Action: tried to hook invalid interactionType: %lld, %u", interactionType, gSmLuaConvertSuccess); return 0; }