diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index 27ec5c1c..6cc77df4 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -183,6 +183,7 @@ --- @field public BowlingBallThiLargeSpeed number --- @field public BowlingBallThiSmallSpeed number --- @field public BowlingBallTtmSpeed number +--- @field public ChillBullyDeathPosY number --- @field public GrateStarRequirement integer --- @field public InfiniteRenderDistance integer --- @field public KingBobombFVel number diff --git a/docs/lua/structs.md b/docs/lua/structs.md index 41bea6d2..619e6593 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -314,6 +314,7 @@ | BowlingBallThiLargeSpeed | `number` | | | BowlingBallThiSmallSpeed | `number` | | | BowlingBallTtmSpeed | `number` | | +| ChillBullyDeathPosY | `number` | | | GrateStarRequirement | `integer` | | | InfiniteRenderDistance | `integer` | | | KingBobombFVel | `number` | | diff --git a/src/game/behaviors/bully.inc.c b/src/game/behaviors/bully.inc.c index b0b40469..d036a09c 100644 --- a/src/game/behaviors/bully.inc.c +++ b/src/game/behaviors/bully.inc.c @@ -242,7 +242,7 @@ void bully_step(void) { obj_check_floor_death(collisionFlags, sObjFloor); if (o->oBullySubtype & BULLY_STYPE_CHILL) { - if (o->oPosY < 1030.0f) { + if (o->oPosY < gBehaviorValues.ChillBullyDeathPosY) { o->oAction = BULLY_ACT_LAVA_DEATH; } } diff --git a/src/game/behaviors/castle_cannon_grate.inc.c b/src/game/behaviors/castle_cannon_grate.inc.c index 64bd924b..3a08b0a6 100644 --- a/src/game/behaviors/castle_cannon_grate.inc.c +++ b/src/game/behaviors/castle_cannon_grate.inc.c @@ -1,7 +1,7 @@ // castle_cannon_grate.inc.c void bhv_castle_cannon_grate_init(void) { - if (save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1) >= 120) { + if (save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1) >= gBehaviorValues.GrateStarRequirement) { o->activeFlags = ACTIVE_FLAG_DEACTIVATED; } } diff --git a/src/game/hardcoded.c b/src/game/hardcoded.c index 42f16a87..7ada52d2 100644 --- a/src/game/hardcoded.c +++ b/src/game/hardcoded.c @@ -151,6 +151,7 @@ struct BehaviorValues gDefaultBehaviorValues = { .BowlingBallThiLargeSpeed = 25.0f, .BowlingBallThiSmallSpeed = 10.0f, .GrateStarRequirement = 120, + .ChillBullyDeathPosY = 1030.0f, .ShowStarMilestones = TRUE, .RespawnShellBoxes = TRUE, .MultipleCapCollection = FALSE, diff --git a/src/game/hardcoded.h b/src/game/hardcoded.h index 8b328ad2..3ca81030 100644 --- a/src/game/hardcoded.h +++ b/src/game/hardcoded.h @@ -248,6 +248,7 @@ struct BehaviorValues { f32 BowlingBallThiLargeSpeed; f32 BowlingBallThiSmallSpeed; u16 GrateStarRequirement; + f32 ChillBullyDeathPosY; u8 ShowStarMilestones; u8 RespawnShellBoxes; u8 MultipleCapCollection; diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index 5ced8ad7..be72ec4f 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -216,13 +216,14 @@ static struct LuaObjectField sBehaviorTrajectoriesFields[LUA_BEHAVIOR_TRAJECTORI { "UnagiTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, UnagiTrajectory), false, LOT_POINTER }, }; -#define LUA_BEHAVIOR_VALUES_FIELD_COUNT 29 +#define LUA_BEHAVIOR_VALUES_FIELD_COUNT 30 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 }, { "BowlingBallThiLargeSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallThiLargeSpeed), false, LOT_NONE }, { "BowlingBallThiSmallSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallThiSmallSpeed), false, LOT_NONE }, { "BowlingBallTtmSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallTtmSpeed), false, LOT_NONE }, + { "ChillBullyDeathPosY", LVT_F32, offsetof(struct BehaviorValues, ChillBullyDeathPosY), false, LOT_NONE }, { "GrateStarRequirement", LVT_U16, offsetof(struct BehaviorValues, GrateStarRequirement), false, LOT_NONE }, { "InfiniteRenderDistance", LVT_U8, offsetof(struct BehaviorValues, InfiniteRenderDistance), false, LOT_NONE }, { "KingBobombFVel", LVT_F32, offsetof(struct BehaviorValues, KingBobombFVel), false, LOT_NONE },