1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-18 12:59:32 +08:00

opt: use constants to set fast stage move and opsi fast move

This commit is contained in:
0O0o0oOoO00
2025-05-11 13:50:33 +08:00
parent 9304e3931a
commit 724e89fd0f
2 changed files with 3 additions and 10 deletions

View File

@@ -261,14 +261,13 @@ void Cracker::update_gg_factor(double factor) {
void Cracker::enable_opsi_fast_move() {
IS_ENABLED(OPSI_FAST_MOVE)
m_original.WorldConst_BaseMoveDuration = m_state["WorldConst"]["BaseMoveDuration"];
m_state["WorldConst"]["BaseMoveDuration"] = 0.0;
ENABLE(OPSI_FAST_MOVE)
}
void Cracker::disable_opsi_fast_move() {
IS_DISABLED(OPSI_FAST_MOVE)
m_state["WorldConst"]["BaseMoveDuration"] = m_original.WorldConst_BaseMoveDuration;
m_state["WorldConst"]["BaseMoveDuration"] = 0.35;
ENABLE(OPSI_FAST_MOVE)
}
@@ -405,9 +404,6 @@ void Cracker::disable_remove_hard_mode_ship_properties_limit() {
void Cracker::enable_fast_stage_move() {
IS_ENABLED(FAST_STAGE_MOVE_CRACK)
m_original.ChapterConst_ShipStepDuration = m_state["ChapterConst"]["ShipStepDuration"];
m_original.ChapterConst_ShipStepQuickPlayScale = m_state["ChapterConst"]["ShipStepQuickPlayScale"];
m_state["ChapterConst"]["ShipStepDuration"] = 0.0;
m_state["ChapterConst"]["ShipStepQuickPlayScale"] = 0.0;
@@ -417,8 +413,8 @@ void Cracker::enable_fast_stage_move() {
void Cracker::disable_fast_stage_move() {
IS_DISABLED(FAST_STAGE_MOVE_CRACK)
m_state["ChapterConst"]["ShipStepDuration"] = m_original.ChapterConst_ShipStepDuration;
m_state["ChapterConst"]["ShipStepQuickPlayScale"] = m_original.ChapterConst_ShipStepQuickPlayScale;
m_state["ChapterConst"]["ShipStepDuration"] = 0.5;
m_state["ChapterConst"]["ShipStepQuickPlayScale"] = 0.5;
ENABLE(FAST_STAGE_MOVE_CRACK)
}

View File

@@ -156,8 +156,6 @@ private:
sol::state_view m_state;
struct {
Lua::Function Ship_getShipProperties;
double ChapterConst_ShipStepDuration;
double ChapterConst_ShipStepQuickPlayScale;
Lua::Function WorldFleetSelectLayer_CheckValid;
Lua::Function BossSingleBattleFleetSelectSubPanel_CheckValid;
Lua::Function Chapter_IsEliteFleetLegal;
@@ -166,7 +164,6 @@ private:
Lua::Function ys_Battle_BattleManualWeaponAutoBot_SetActive;
Lua::Function Ship_cosumeEnergy;
Lua::Function Ship_getEnergy;
double WorldConst_BaseMoveDuration;
Lua::Function Ship_intimacyAdditions;
} m_original;
struct {