diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index 4c12bf06b..9d07adf2d 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -198,6 +198,7 @@ --- @field public RacingPenguinHeight number --- @field public RacingPenguinRadius number --- @field public RespawnShellBoxes integer +--- @field public ShowStarDialog integer --- @field public ShowStarMilestones integer --- @field public ToadStar1Requirement integer --- @field public ToadStar2Requirement integer diff --git a/docs/lua/structs.md b/docs/lua/structs.md index c41b55aac..8aeb3644a 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -336,6 +336,7 @@ | RacingPenguinHeight | `number` | | | RacingPenguinRadius | `number` | | | RespawnShellBoxes | `integer` | | +| ShowStarDialog | `integer` | | | ShowStarMilestones | `integer` | | | ToadStar1Requirement | `integer` | | | ToadStar2Requirement | `integer` | | diff --git a/src/game/hardcoded.c b/src/game/hardcoded.c index 3dc192268..dddb8e4b5 100644 --- a/src/game/hardcoded.c +++ b/src/game/hardcoded.c @@ -156,6 +156,7 @@ struct BehaviorValues gDefaultBehaviorValues = { .GrateStarRequirement = 120, .ChillBullyDeathPosY = 1030.0f, .ShowStarMilestones = TRUE, + .ShowStarDialog = TRUE, .RespawnShellBoxes = TRUE, .MultipleCapCollection = FALSE, .InfiniteRenderDistance = TRUE, diff --git a/src/game/hardcoded.h b/src/game/hardcoded.h index 0e8106705..857416a94 100644 --- a/src/game/hardcoded.h +++ b/src/game/hardcoded.h @@ -251,6 +251,7 @@ struct BehaviorValues { u16 GrateStarRequirement; f32 ChillBullyDeathPosY; u8 ShowStarMilestones; + u8 ShowStarDialog; u8 RespawnShellBoxes; u8 MultipleCapCollection; u8 InfiniteRenderDistance; diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 0ea05306a..a0ec7b8d7 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -725,11 +725,15 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) { if ((m->actionArg & 1) == 0) { level_trigger_warp(m, WARP_OP_STAR_EXIT); } else if (m->playerIndex == 0) { - enable_time_stop_if_alone(); - create_dialog_box_with_response((gLastCompletedStarNum == 7) - ? gBehaviorValues.dialogs.HundredCoinsDialog - : gBehaviorValues.dialogs.CollectedStarDialog); - m->actionState = 1; + if (gBehaviorValues.ShowStarDialog) { + enable_time_stop_if_alone(); + create_dialog_box_with_response((gLastCompletedStarNum == 7) + ? gBehaviorValues.dialogs.HundredCoinsDialog + : gBehaviorValues.dialogs.CollectedStarDialog); + m->actionState = 1; + } else { + m->actionState = 2; + } } else { set_mario_action(m, isInWater ? ACT_WATER_IDLE : (m->pos[1] <= m->floorHeight ? ACT_IDLE : ACT_FREEFALL), 0); } diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index d136b0b75..528b8c254 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -218,7 +218,7 @@ static struct LuaObjectField sBehaviorTrajectoriesFields[LUA_BEHAVIOR_TRAJECTORI { "UnagiTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, UnagiTrajectory), false, LOT_POINTER }, }; -#define LUA_BEHAVIOR_VALUES_FIELD_COUNT 30 +#define LUA_BEHAVIOR_VALUES_FIELD_COUNT 31 static struct LuaObjectField sBehaviorValuesFields[LUA_BEHAVIOR_VALUES_FIELD_COUNT] = { { "BowlingBallBob2Speed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallBob2Speed), false, LOT_NONE }, { "BowlingBallBobSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallBobSpeed), false, LOT_NONE }, @@ -243,6 +243,7 @@ static struct LuaObjectField sBehaviorValuesFields[LUA_BEHAVIOR_VALUES_FIELD_COU { "RacingPenguinHeight", LVT_F32, offsetof(struct BehaviorValues, RacingPenguinHeight), false, LOT_NONE }, { "RacingPenguinRadius", LVT_F32, offsetof(struct BehaviorValues, RacingPenguinRadius), false, LOT_NONE }, { "RespawnShellBoxes", LVT_U8, offsetof(struct BehaviorValues, RespawnShellBoxes), false, LOT_NONE }, + { "ShowStarDialog", LVT_U8, offsetof(struct BehaviorValues, ShowStarDialog), false, LOT_NONE }, { "ShowStarMilestones", LVT_U8, offsetof(struct BehaviorValues, ShowStarMilestones), false, LOT_NONE }, { "ToadStar1Requirement", LVT_U16, offsetof(struct BehaviorValues, ToadStar1Requirement), false, LOT_NONE }, { "ToadStar2Requirement", LVT_U16, offsetof(struct BehaviorValues, ToadStar2Requirement), false, LOT_NONE },