diff --git a/docs/lua/functions.md b/docs/lua/functions.md index 23dabf278..f6bedc7c9 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -116,6 +116,7 @@ - [is_anim_at_end](#is_anim_at_end) - [is_anim_past_end](#is_anim_past_end) - [is_anim_past_frame](#is_anim_past_frame) + - [mario_can_bubble](#mario_can_bubble) - [mario_facing_downhill](#mario_facing_downhill) - [mario_floor_is_slippery](#mario_floor_is_slippery) - [mario_floor_is_slope](#mario_floor_is_slope) @@ -2288,6 +2289,26 @@ The `reliable` field will ensure that the packet arrives, but should be used spa
+## [mario_can_bubble](#mario_can_bubble) + +### Lua Example +`local boolValue = mario_can_bubble(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `bool` + +### C Prototype +`bool mario_can_bubble(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ ## [mario_facing_downhill](#mario_facing_downhill) ### Lua Example diff --git a/src/pc/configfile.c b/src/pc/configfile.c index 5733a029c..0edce7ccf 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -252,6 +252,7 @@ static void dynos_pack_read(char** tokens, UNUSED int numTokens) { if (numTokens < 3) { return; } char fullPackName[256] = { 0 }; for (int i = 1; i < numTokens - 1; i++) { + if (i != 1) { strncat(fullPackName, " ", 255); } strncat(fullPackName, tokens[i], 255); } diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index b0a8f567d..83076eda5 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -975,6 +975,17 @@ int smlua_func_is_anim_past_frame(lua_State* L) { return 1; } +int smlua_func_mario_can_bubble(lua_State* L) { + if(!smlua_functions_valid_param_count(L, 1)) { return 0; } + + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { return 0; } + + lua_pushboolean(L, mario_can_bubble(m)); + + return 1; +} + int smlua_func_mario_facing_downhill(lua_State* L) { if(!smlua_functions_valid_param_count(L, 2)) { return 0; } @@ -8198,6 +8209,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "is_anim_at_end", smlua_func_is_anim_at_end); smlua_bind_function(L, "is_anim_past_end", smlua_func_is_anim_past_end); smlua_bind_function(L, "is_anim_past_frame", smlua_func_is_anim_past_frame); + smlua_bind_function(L, "mario_can_bubble", smlua_func_mario_can_bubble); smlua_bind_function(L, "mario_facing_downhill", smlua_func_mario_facing_downhill); smlua_bind_function(L, "mario_floor_is_slippery", smlua_func_mario_floor_is_slippery); smlua_bind_function(L, "mario_floor_is_slope", smlua_func_mario_floor_is_slope);