Add ability to not show star collection dialogs
This commit is contained in:
parent
5fffa9e9d9
commit
64ebb88906
|
@ -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
|
||||
|
|
|
@ -336,6 +336,7 @@
|
|||
| RacingPenguinHeight | `number` | |
|
||||
| RacingPenguinRadius | `number` | |
|
||||
| RespawnShellBoxes | `integer` | |
|
||||
| ShowStarDialog | `integer` | |
|
||||
| ShowStarMilestones | `integer` | |
|
||||
| ToadStar1Requirement | `integer` | |
|
||||
| ToadStar2Requirement | `integer` | |
|
||||
|
|
|
@ -156,6 +156,7 @@ struct BehaviorValues gDefaultBehaviorValues = {
|
|||
.GrateStarRequirement = 120,
|
||||
.ChillBullyDeathPosY = 1030.0f,
|
||||
.ShowStarMilestones = TRUE,
|
||||
.ShowStarDialog = TRUE,
|
||||
.RespawnShellBoxes = TRUE,
|
||||
.MultipleCapCollection = FALSE,
|
||||
.InfiniteRenderDistance = TRUE,
|
||||
|
|
|
@ -251,6 +251,7 @@ struct BehaviorValues {
|
|||
u16 GrateStarRequirement;
|
||||
f32 ChillBullyDeathPosY;
|
||||
u8 ShowStarMilestones;
|
||||
u8 ShowStarDialog;
|
||||
u8 RespawnShellBoxes;
|
||||
u8 MultipleCapCollection;
|
||||
u8 InfiniteRenderDistance;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 },
|
||||
|
|
Loading…
Reference in New Issue