Expose get_mario_cap_flag()
This commit is contained in:
parent
273807b2eb
commit
ad2e84ed30
|
@ -3487,6 +3487,12 @@ function get_door_save_file_flag(door)
|
|||
-- ...
|
||||
end
|
||||
|
||||
--- @param capObject Object
|
||||
--- @return integer
|
||||
function get_mario_cap_flag(capObject)
|
||||
-- ...
|
||||
end
|
||||
|
||||
--- @param m MarioState
|
||||
--- @param interactType integer
|
||||
--- @param o Object
|
||||
|
|
|
@ -3676,6 +3676,26 @@
|
|||
|
||||
<br />
|
||||
|
||||
## [get_mario_cap_flag](#get_mario_cap_flag)
|
||||
|
||||
### Lua Example
|
||||
`local integerValue = get_mario_cap_flag(capObject)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| capObject | [Object](structs.md#Object) |
|
||||
|
||||
### Returns
|
||||
- `integer`
|
||||
|
||||
### C Prototype
|
||||
`u32 get_mario_cap_flag(struct Object *capObject);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [interact_bbh_entrance](#interact_bbh_entrance)
|
||||
|
||||
### Lua Example
|
||||
|
|
|
@ -842,6 +842,7 @@
|
|||
- [determine_interaction](functions-3.md#determine_interaction)
|
||||
- [does_mario_have_normal_cap_on_head](functions-3.md#does_mario_have_normal_cap_on_head)
|
||||
- [get_door_save_file_flag](functions-3.md#get_door_save_file_flag)
|
||||
- [get_mario_cap_flag](functions-3.md#get_mario_cap_flag)
|
||||
- [interact_bbh_entrance](functions-3.md#interact_bbh_entrance)
|
||||
- [interact_bounce_top](functions-3.md#interact_bounce_top)
|
||||
- [interact_breakable](functions-3.md#interact_breakable)
|
||||
|
|
|
@ -170,6 +170,7 @@ void mario_handle_special_floors(struct MarioState *m);
|
|||
u8 passes_pvp_interaction_checks(struct MarioState* attacker, struct MarioState* victim);
|
||||
u32 should_push_or_pull_door(struct MarioState *m, struct Object *o);
|
||||
u32 take_damage_and_knock_back(struct MarioState *m, struct Object *o);
|
||||
u32 get_mario_cap_flag(struct Object *capObject);
|
||||
u32 determine_interaction(struct MarioState *m, struct Object *o);
|
||||
u32 process_interaction(struct MarioState *m, u32 interactType, struct Object *o, u32 (*interact_function)(struct MarioState *, u32 interactType, struct Object *));
|
||||
|
||||
|
|
|
@ -13670,6 +13670,23 @@ int smlua_func_get_door_save_file_flag(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_get_mario_cap_flag(lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
int top = lua_gettop(L);
|
||||
if (top != 1) {
|
||||
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_mario_cap_flag", 1, top);
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct Object* capObject = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_mario_cap_flag"); return 0; }
|
||||
|
||||
lua_pushinteger(L, get_mario_cap_flag(capObject));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_interact_bbh_entrance(lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
|
@ -33680,6 +33697,7 @@ void smlua_bind_functions_autogen(void) {
|
|||
smlua_bind_function(L, "determine_interaction", smlua_func_determine_interaction);
|
||||
smlua_bind_function(L, "does_mario_have_normal_cap_on_head", smlua_func_does_mario_have_normal_cap_on_head);
|
||||
smlua_bind_function(L, "get_door_save_file_flag", smlua_func_get_door_save_file_flag);
|
||||
smlua_bind_function(L, "get_mario_cap_flag", smlua_func_get_mario_cap_flag);
|
||||
smlua_bind_function(L, "interact_bbh_entrance", smlua_func_interact_bbh_entrance);
|
||||
smlua_bind_function(L, "interact_bounce_top", smlua_func_interact_bounce_top);
|
||||
smlua_bind_function(L, "interact_breakable", smlua_func_interact_breakable);
|
||||
|
|
Loading…
Reference in New Issue