mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 14:39:25 +08:00
add: chapter auto next battle
This commit is contained in:
@@ -893,6 +893,10 @@
|
||||
"ChapterSkipPrecombat": {
|
||||
"type": "checkbox",
|
||||
"value": false
|
||||
},
|
||||
"ChapterAutoNextBattle": {
|
||||
"type": "checkbox",
|
||||
"value": false
|
||||
}
|
||||
},
|
||||
"ShipProperty": {
|
||||
|
||||
@@ -889,6 +889,7 @@ Misc:
|
||||
SkipShipGainShow: false
|
||||
ChapterForceEnableAutoFight: false
|
||||
ChapterSkipPrecombat: false
|
||||
ChapterAutoNextBattle: false
|
||||
|
||||
# ==================== Cheat ====================
|
||||
PowerLimit:
|
||||
|
||||
@@ -544,6 +544,7 @@ class GeneratedConfig:
|
||||
Misc_SkipShipGainShow = False
|
||||
Misc_ChapterForceEnableAutoFight = False
|
||||
Misc_ChapterSkipPrecombat = False
|
||||
Misc_ChapterAutoNextBattle = False
|
||||
|
||||
# Group `PowerLimit`
|
||||
PowerLimit_Enable = True
|
||||
|
||||
@@ -158,6 +158,7 @@ class FullGeneratedConfig:
|
||||
Hook_Misc_SkipShipGainShow = None
|
||||
Hook_Misc_ChapterForceEnableAutoFight = None
|
||||
Hook_Misc_ChapterSkipPrecombat = None
|
||||
Hook_Misc_ChapterAutoNextBattle = None
|
||||
Hook_ShipProperty_Method = None
|
||||
Hook_ShipProperty_Factor = None
|
||||
Hook_ShipProperty_Armor = None
|
||||
|
||||
@@ -3136,6 +3136,10 @@
|
||||
"ChapterSkipPrecombat": {
|
||||
"name": "Misc.ChapterSkipPrecombat.name",
|
||||
"help": "Misc.ChapterSkipPrecombat.help"
|
||||
},
|
||||
"ChapterAutoNextBattle": {
|
||||
"name": "Misc.ChapterAutoNextBattle.name",
|
||||
"help": "Misc.ChapterAutoNextBattle.help"
|
||||
}
|
||||
},
|
||||
"PowerLimit": {
|
||||
|
||||
@@ -3136,6 +3136,10 @@
|
||||
"ChapterSkipPrecombat": {
|
||||
"name": "Misc.ChapterSkipPrecombat.name",
|
||||
"help": "Misc.ChapterSkipPrecombat.help"
|
||||
},
|
||||
"ChapterAutoNextBattle": {
|
||||
"name": "Misc.ChapterAutoNextBattle.name",
|
||||
"help": "Misc.ChapterAutoNextBattle.help"
|
||||
}
|
||||
},
|
||||
"PowerLimit": {
|
||||
|
||||
@@ -3136,6 +3136,10 @@
|
||||
"ChapterSkipPrecombat": {
|
||||
"name": "章节图跳过战前准备",
|
||||
"help": ""
|
||||
},
|
||||
"ChapterAutoNextBattle": {
|
||||
"name": "章节图自动下一战",
|
||||
"help": ""
|
||||
}
|
||||
},
|
||||
"PowerLimit": {
|
||||
|
||||
@@ -3136,6 +3136,10 @@
|
||||
"ChapterSkipPrecombat": {
|
||||
"name": "Misc.ChapterSkipPrecombat.name",
|
||||
"help": "Misc.ChapterSkipPrecombat.help"
|
||||
},
|
||||
"ChapterAutoNextBattle": {
|
||||
"name": "Misc.ChapterAutoNextBattle.name",
|
||||
"help": "Misc.ChapterAutoNextBattle.help"
|
||||
}
|
||||
},
|
||||
"PowerLimit": {
|
||||
|
||||
@@ -343,3 +343,9 @@ class CrackApi:
|
||||
|
||||
def disable_chapter_skip_precombat(self):
|
||||
self.post("disable_chapter_skip_precombat")
|
||||
|
||||
def enable_chapter_auto_next_battle(self):
|
||||
self.post("enable_chapter_auto_next_battle")
|
||||
|
||||
def disable_chapter_auto_next_battle(self):
|
||||
self.post("disable_chapter_auto_next_battle")
|
||||
|
||||
@@ -41,6 +41,7 @@ ALL_ENABLE_OPS = [
|
||||
CrackOp.EnableSkipShipGainShow,
|
||||
CrackOp.EnableChapterForceEnableAutoFight,
|
||||
CrackOp.EnableChapterSkipPrecombat,
|
||||
CrackOp.EnableChapterAutoNextBattle,
|
||||
]
|
||||
|
||||
REMOTE_PORT = 23897
|
||||
@@ -270,6 +271,11 @@ def do_crack_op(config: AzurLaneConfig, device: Device, ops: Union[Type[CrackOp.
|
||||
api.enable_chapter_skip_precombat()
|
||||
elif op == CrackOp.DisableChapterSkipPrecombat:
|
||||
api.disable_chapter_skip_precombat()
|
||||
elif op == CrackOp.EnableChapterAutoNextBattle:
|
||||
if full_config.Hook_Misc_ChapterForceEnableAutoFight:
|
||||
api.enable_chapter_auto_next_battle()
|
||||
elif op == CrackOp.DisableChapterAutoNextBattle:
|
||||
api.disable_chapter_auto_next_battle()
|
||||
else:
|
||||
logger.error(f"Unsupported op: {op}")
|
||||
|
||||
@@ -324,6 +330,7 @@ CHAPTER_CRACK_OPS = [
|
||||
CrackOp.EnableSkipShipGainShow,
|
||||
CrackOp.EnableChapterForceEnableAutoFight,
|
||||
CrackOp.EnableChapterSkipPrecombat,
|
||||
CrackOp.EnableChapterAutoNextBattle,
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -154,3 +154,9 @@ class CrackOp:
|
||||
|
||||
class DisableChapterSkipPrecombat(Op):
|
||||
...
|
||||
|
||||
class EnableChapterAutoNextBattle(Op):
|
||||
...
|
||||
|
||||
class DisableChapterAutoNextBattle(Op):
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user