diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py
index 939563cb3..084aa84af 100644
--- a/autogen/convert_functions.py
+++ b/autogen/convert_functions.py
@@ -32,6 +32,7 @@ in_files = [
"src/pc/network/network_utils.h",
"src/pc/djui/djui_console.h",
"src/pc/djui/djui_chat_message.h",
+ "src/pc/djui/djui_language.h",
"src/game/interaction.h",
"src/game/level_info.h",
"src/game/save_file.h",
@@ -74,6 +75,7 @@ override_allowed_functions = {
"src/audio/external.h": [ " play_", "fade", "current_background", "stop_", "sound_banks", "drop_queued_background_music", "sound_get_level_intensity" ],
"src/game/rumble_init.c": [ "queue_rumble_", "reset_rumble_timers" ],
"src/pc/djui/djui_popup.h" : [ "create" ],
+ "src/pc/djui/djui_language.h" : [ "djui_language_get" ],
"src/game/save_file.h": [ "save_file_get_", "save_file_set_flags", "save_file_clear_flags", "save_file_reload", "save_file_erase_current_backup_save", "save_file_set_star_flags", "save_file_is_cannon_unlocked", "touch_coin_score_age", "save_file_set_course_coin_score", "save_file_do_save", "save_file_remove_star_flags", "save_file_erase" ],
"src/pc/lua/utils/smlua_model_utils.h": [ "smlua_model_util_get_id" ],
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
@@ -89,7 +91,7 @@ override_allowed_functions = {
override_disallowed_functions = {
"src/audio/external.h": [ " func_" ],
"src/engine/math_util.h": [ "atan2f", "vec3s_sub" ],
- "src/engine/surface_load.h": [ "alloc_surface_poools" ],
+ "src/engine/surface_load.h": [ "alloc_surface_poools", "surface_has_force" ],
"src/engine/surface_collision.h": [ " debug_", "f32_find_wall_collision" ],
"src/game/mario_actions_airborne.c": [ "^[us]32 act_.*" ],
"src/game/mario_actions_automatic.c": [ "^[us]32 act_.*" ],
diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua
index a8dd00122..4491abf27 100644
--- a/autogen/lua_definitions/functions.lua
+++ b/autogen/lua_definitions/functions.lua
@@ -3230,6 +3230,13 @@ function get_current_fov()
-- ...
end
+--- @param section string
+--- @param key string
+--- @return string
+function djui_language_get(section, key)
+ -- ...
+end
+
--- @param message string
--- @param lines integer
function djui_popup_create(message, lines)
diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua
index 23d9c295b..5f82614f3 100644
--- a/autogen/lua_definitions/structs.lua
+++ b/autogen/lua_definitions/structs.lua
@@ -1090,6 +1090,7 @@
--- @class Mod
--- @field public basePath string
+--- @field public category string
--- @field public customBehaviorIndex integer
--- @field public description string
--- @field public enabled boolean
diff --git a/docs/lua/functions-3.md b/docs/lua/functions-3.md
index 185315d7d..5f35b6140 100644
--- a/docs/lua/functions-3.md
+++ b/docs/lua/functions-3.md
@@ -2694,6 +2694,33 @@
+---
+# functions from djui_language.h
+
+
+
+
+## [djui_language_get](#djui_language_get)
+
+### Lua Example
+`local stringValue = djui_language_get(section, key)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| section | `string` |
+| key | `string` |
+
+### Returns
+- `string`
+
+### C Prototype
+`char* djui_language_get(const char *section, const char *key);`
+
+[:arrow_up_small:](#)
+
+
+
---
# functions from djui_popup.h
diff --git a/docs/lua/functions-5.md b/docs/lua/functions-5.md
index 71e08040c..24592d3c2 100644
--- a/docs/lua/functions-5.md
+++ b/docs/lua/functions-5.md
@@ -5186,26 +5186,6 @@
-## [surface_has_force](#surface_has_force)
-
-### Lua Example
-`local booleanValue = surface_has_force(surfaceType)`
-
-### Parameters
-| Field | Type |
-| ----- | ---- |
-| surfaceType | `integer` |
-
-### Returns
-- `boolean`
-
-### C Prototype
-`bool surface_has_force(s16 surfaceType);`
-
-[:arrow_up_small:](#)
-
-
-
---
[< prev](functions-4.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | 5]
diff --git a/docs/lua/functions.md b/docs/lua/functions.md
index dd455b84d..7de645186 100644
--- a/docs/lua/functions.md
+++ b/docs/lua/functions.md
@@ -777,6 +777,11 @@
+- djui_language.h
+ - [djui_language_get](functions-3.md#djui_language_get)
+
+
+
- djui_popup.h
- [djui_popup_create](functions-3.md#djui_popup_create)
@@ -1918,7 +1923,6 @@
- [load_area_terrain](functions-5.md#load_area_terrain)
- [load_object_collision_model](functions-5.md#load_object_collision_model)
- [obj_get_surface_from_index](functions-5.md#obj_get_surface_from_index)
- - [surface_has_force](functions-5.md#surface_has_force)
diff --git a/docs/lua/structs.md b/docs/lua/structs.md
index c5777631e..8ac66b187 100644
--- a/docs/lua/structs.md
+++ b/docs/lua/structs.md
@@ -895,7 +895,11 @@
| ----- | ---- | ------ |
| borderColor | [DjuiColor](structs.md#DjuiColor) | read-only |
| rectColor | [DjuiColor](structs.md#DjuiColor) | read-only |
-=======
+
+[:arrow_up_small:](#)
+
+
+
## [ExclamationBoxContent](#ExclamationBoxContent)
| Field | Type | Access |
@@ -1502,6 +1506,7 @@
| Field | Type | Access |
| ----- | ---- | ------ |
| basePath | `string` | read-only |
+| category | `string` | read-only |
| customBehaviorIndex | `integer` | read-only |
| description | `string` | read-only |
| enabled | `boolean` | read-only |
diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c
index 7a86fc457..e9699654e 100644
--- a/src/pc/lua/smlua_cobject_autogen.c
+++ b/src/pc/lua/smlua_cobject_autogen.c
@@ -1229,9 +1229,10 @@ static struct LuaObjectField sMarioStateFields[LUA_MARIO_STATE_FIELD_COUNT] = {
{ "waterLevel", LVT_S16, offsetof(struct MarioState, waterLevel), false, LOT_NONE },
};
-#define LUA_MOD_FIELD_COUNT 15
+#define LUA_MOD_FIELD_COUNT 16
static struct LuaObjectField sModFields[LUA_MOD_FIELD_COUNT] = {
{ "basePath", LVT_STRING, offsetof(struct Mod, basePath), true, LOT_NONE },
+ { "category", LVT_STRING_P, offsetof(struct Mod, category), true, LOT_NONE },
{ "customBehaviorIndex", LVT_U8, offsetof(struct Mod, customBehaviorIndex), true, LOT_NONE },
{ "description", LVT_STRING_P, offsetof(struct Mod, description), true, LOT_NONE },
{ "enabled", LVT_BOOL, offsetof(struct Mod, enabled), true, LOT_NONE },
diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c
index b40da2f7e..a3a996e45 100644
--- a/src/pc/lua/smlua_functions_autogen.c
+++ b/src/pc/lua/smlua_functions_autogen.c
@@ -15,6 +15,7 @@
#include "src/pc/network/network_utils.h"
#include "src/pc/djui/djui_console.h"
#include "src/pc/djui/djui_chat_message.h"
+#include "src/pc/djui/djui_language.h"
#include "src/game/interaction.h"
#include "src/game/level_info.h"
#include "src/game/save_file.h"
@@ -12787,6 +12788,29 @@ int smlua_func_get_current_fov(UNUSED lua_State* L) {
return 1;
}
+ /////////////////////
+ // djui_language.h //
+/////////////////////
+
+int smlua_func_djui_language_get(lua_State* L) {
+ if (L == NULL) { return 0; }
+
+ int top = lua_gettop(L);
+ if (top != 2) {
+ LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_language_get", 2, top);
+ return 0;
+ }
+
+ const char* section = smlua_to_string(L, 1);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_language_get"); return 0; }
+ const char* key = smlua_to_string(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_language_get"); return 0; }
+
+ lua_pushstring(L, djui_language_get(section, key));
+
+ return 1;
+}
+
//////////////////
// djui_popup.h //
//////////////////
@@ -34099,6 +34123,9 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "djui_open_pause_menu", smlua_func_djui_open_pause_menu);
smlua_bind_function(L, "get_current_fov", smlua_func_get_current_fov);
+ // djui_language.h
+ smlua_bind_function(L, "djui_language_get", smlua_func_djui_language_get);
+
// djui_popup.h
smlua_bind_function(L, "djui_popup_create", smlua_func_djui_popup_create);