Expose level_control_timer_running

This commit is contained in:
Agent X 2024-02-22 14:51:33 -05:00
parent 96e21e13a1
commit d4fe80d4a6
6 changed files with 216 additions and 176 deletions

View file

@ -75,7 +75,7 @@ override_allowed_functions = {
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
"src/game/mario_misc.h": [ "bhv_toad.*", "bhv_unlock_door.*" ],
"src/pc/utils/misc.h": [ "update_all_mario_stars" ],
"src/game/level_update.h": [ "level_trigger_warp", "get_painting_warp_node", "initiate_painting_warp", "warp_special", "lvl_set_current_level" ],
"src/game/level_update.h": [ "level_trigger_warp", "get_painting_warp_node", "initiate_painting_warp", "warp_special", "lvl_set_current_level", "level_control_timer_running" ],
"src/game/area.h": [ "area_get_warp_node" ],
"src/engine/level_script.h": [ "area_create_warp_node" ],
"src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color" ]

View file

@ -4246,6 +4246,11 @@ function initiate_painting_warp(paintingIndex)
-- ...
end
--- @return integer
function level_control_timer_running()
-- ...
end
--- @param m MarioState
--- @param warpOp integer
--- @return integer

View file

@ -4047,6 +4047,24 @@
<br />
## [level_control_timer_running](#level_control_timer_running)
### Lua Example
`local integerValue = level_control_timer_running()`
### Parameters
- None
### Returns
- `integer`
### C Prototype
`u8 level_control_timer_running(void);`
[:arrow_up_small:](#)
<br />
## [level_trigger_warp](#level_trigger_warp)
### Lua Example
@ -8684,173 +8702,6 @@
[:arrow_up_small:](#)
<br />
---
# functions from mod_storage.h
<br />
## [mod_storage_clear](#mod_storage_clear)
### Lua Example
`local booleanValue = mod_storage_clear()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool mod_storage_clear(void);`
[:arrow_up_small:](#)
<br />
## [mod_storage_load](#mod_storage_load)
### Lua Example
`local stringValue = mod_storage_load(key)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
### Returns
- `string`
### C Prototype
`const char *mod_storage_load(const char* key);`
[:arrow_up_small:](#)
<br />
## [mod_storage_load_bool](#mod_storage_load_bool)
### Lua Example
`local booleanValue = mod_storage_load_bool(key)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_load_bool(const char* key);`
[:arrow_up_small:](#)
<br />
## [mod_storage_load_number](#mod_storage_load_number)
### Lua Example
`local numberValue = mod_storage_load_number(key)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
### Returns
- `number`
### C Prototype
`double mod_storage_load_number(const char* key);`
[:arrow_up_small:](#)
<br />
## [mod_storage_remove](#mod_storage_remove)
### Lua Example
`local booleanValue = mod_storage_remove(key)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_remove(const char* key);`
[:arrow_up_small:](#)
<br />
## [mod_storage_save](#mod_storage_save)
### Lua Example
`local booleanValue = mod_storage_save(key, value)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
| value | `string` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_save(const char* key, const char* value);`
[:arrow_up_small:](#)
<br />
## [mod_storage_save_bool](#mod_storage_save_bool)
### Lua Example
`local booleanValue = mod_storage_save_bool(key, value)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
| value | `boolean` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_save_bool(const char* key, bool value);`
[:arrow_up_small:](#)
<br />
## [mod_storage_save_number](#mod_storage_save_number)
### Lua Example
`local booleanValue = mod_storage_save_number(key, value)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
| value | `number` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_save_number(const char* key, double value);`
[:arrow_up_small:](#)
<br />
---

View file

@ -5,6 +5,173 @@
[< prev](functions-3.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | 4 | [5](functions-5.md) | [next >](functions-5.md)]
---
# functions from mod_storage.h
<br />
## [mod_storage_clear](#mod_storage_clear)
### Lua Example
`local booleanValue = mod_storage_clear()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool mod_storage_clear(void);`
[:arrow_up_small:](#)
<br />
## [mod_storage_load](#mod_storage_load)
### Lua Example
`local stringValue = mod_storage_load(key)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
### Returns
- `string`
### C Prototype
`const char *mod_storage_load(const char* key);`
[:arrow_up_small:](#)
<br />
## [mod_storage_load_bool](#mod_storage_load_bool)
### Lua Example
`local booleanValue = mod_storage_load_bool(key)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_load_bool(const char* key);`
[:arrow_up_small:](#)
<br />
## [mod_storage_load_number](#mod_storage_load_number)
### Lua Example
`local numberValue = mod_storage_load_number(key)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
### Returns
- `number`
### C Prototype
`double mod_storage_load_number(const char* key);`
[:arrow_up_small:](#)
<br />
## [mod_storage_remove](#mod_storage_remove)
### Lua Example
`local booleanValue = mod_storage_remove(key)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_remove(const char* key);`
[:arrow_up_small:](#)
<br />
## [mod_storage_save](#mod_storage_save)
### Lua Example
`local booleanValue = mod_storage_save(key, value)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
| value | `string` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_save(const char* key, const char* value);`
[:arrow_up_small:](#)
<br />
## [mod_storage_save_bool](#mod_storage_save_bool)
### Lua Example
`local booleanValue = mod_storage_save_bool(key, value)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
| value | `boolean` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_save_bool(const char* key, bool value);`
[:arrow_up_small:](#)
<br />
## [mod_storage_save_number](#mod_storage_save_number)
### Lua Example
`local booleanValue = mod_storage_save_number(key, value)`
### Parameters
| Field | Type |
| ----- | ---- |
| key | `string` |
| value | `number` |
### Returns
- `boolean`
### C Prototype
`bool mod_storage_save_number(const char* key, double value);`
[:arrow_up_small:](#)
<br />
---
# functions from network_player.h

View file

@ -860,6 +860,7 @@
- level_update.h
- [get_painting_warp_node](functions-3.md#get_painting_warp_node)
- [initiate_painting_warp](functions-3.md#initiate_painting_warp)
- [level_control_timer_running](functions-3.md#level_control_timer_running)
- [level_trigger_warp](functions-3.md#level_trigger_warp)
- [lvl_set_current_level](functions-3.md#lvl_set_current_level)
- [warp_special](functions-3.md#warp_special)
@ -1130,14 +1131,14 @@
<br />
- mod_storage.h
- [mod_storage_clear](functions-3.md#mod_storage_clear)
- [mod_storage_load](functions-3.md#mod_storage_load)
- [mod_storage_load_bool](functions-3.md#mod_storage_load_bool)
- [mod_storage_load_number](functions-3.md#mod_storage_load_number)
- [mod_storage_remove](functions-3.md#mod_storage_remove)
- [mod_storage_save](functions-3.md#mod_storage_save)
- [mod_storage_save_bool](functions-3.md#mod_storage_save_bool)
- [mod_storage_save_number](functions-3.md#mod_storage_save_number)
- [mod_storage_clear](functions-4.md#mod_storage_clear)
- [mod_storage_load](functions-4.md#mod_storage_load)
- [mod_storage_load_bool](functions-4.md#mod_storage_load_bool)
- [mod_storage_load_number](functions-4.md#mod_storage_load_number)
- [mod_storage_remove](functions-4.md#mod_storage_remove)
- [mod_storage_save](functions-4.md#mod_storage_save)
- [mod_storage_save_bool](functions-4.md#mod_storage_save_bool)
- [mod_storage_save_number](functions-4.md#mod_storage_save_number)
<br />

View file

@ -13880,6 +13880,21 @@ int smlua_func_initiate_painting_warp(lua_State* L) {
return 1;
}
int smlua_func_level_control_timer_running(UNUSED lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 0) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "level_control_timer_running", 0, top);
return 0;
}
lua_pushinteger(L, level_control_timer_running());
return 1;
}
int smlua_func_level_trigger_warp(lua_State* L) {
if (L == NULL) { return 0; }
@ -32279,6 +32294,7 @@ void smlua_bind_functions_autogen(void) {
// level_update.h
smlua_bind_function(L, "get_painting_warp_node", smlua_func_get_painting_warp_node);
smlua_bind_function(L, "initiate_painting_warp", smlua_func_initiate_painting_warp);
smlua_bind_function(L, "level_control_timer_running", smlua_func_level_control_timer_running);
smlua_bind_function(L, "level_trigger_warp", smlua_func_level_trigger_warp);
smlua_bind_function(L, "lvl_set_current_level", smlua_func_lvl_set_current_level);
smlua_bind_function(L, "warp_special", smlua_func_warp_special);