Fix: add 'Fpy' prefix to all Fpy arguments and taskgroups if not exist

to display correct text in i18n
This commit is contained in:
hgjazhgj 2023-06-10 06:45:52 +08:00
parent 49962747a9
commit c09b614040
12 changed files with 143 additions and 143 deletions

View File

@ -27,7 +27,7 @@
"FailureInterval": 120,
"ServerUpdate": "05:00"
},
"Interval": {
"FpyInterval": {
"Interval": "00:05"
},
"Storage": {
@ -43,21 +43,21 @@
"FailureInterval": 120,
"ServerUpdate": "05:00"
},
"Team": {
"FpyTeam": {
"Index": 0
},
"Apple": {
"FpyApple": {
"AppleKind": "gold",
"AppleCount": 0,
"EatOnce": true,
"AppleTotal": 999
},
"Limit": {
"FpyLimit": {
"Defeated": true,
"KizunaReisou": true,
"SpecialDrop": 999
},
"Interval": {
"FpyInterval": {
"Interval": "07:00"
},
"Storage": {
@ -83,7 +83,7 @@
}
},
"FpyBenchmark": {
"Benchmark": {
"FpyBenchmark": {
"BenchOption": "all"
},
"Storage": {
@ -91,7 +91,7 @@
}
},
"FpyCall": {
"Call": {
"FpyCall": {
"Function": "lottery"
},
"Storage": {

View File

@ -44,7 +44,7 @@ class FgoAutoScript(AzurLaneAutoScript):
app = FGOpy(
self.config.FpyEmulator_LaunchPath,
{
"Special Drop": "Limit_SpecialDrop",
"Special Drop": "FpyLimit_SpecialDrop",
},
)
assert app.run("ping")
@ -58,28 +58,28 @@ class FgoAutoScript(AzurLaneAutoScript):
def fpy_heartbeat(self):
assert self.app.run("ping")
hh, mm = self.config.Interval_Interval.split(":")
hh, mm = self.config.FpyInterval_Interval.split(":")
self.config.task_delay(minute=int(hh) * 60 + int(mm))
def fpy_main(self):
assert self.app.run(f"config stopOnDefeated {self.config.Limit_Defeated}")
assert self.app.run(f"config stopOnKizunaReisou {self.config.Limit_KizunaReisou}")
assert self.app.run(f"config stopOnSpecialDrop {self.config.Limit_SpecialDrop}")
assert self.app.run(f"teamup set index {self.config.Team_Index}")
assert self.app.run(f"main {self.config.Apple_AppleCount} {self.config.Apple_AppleKind}")
assert self.app.run(f"config stopOnDefeated {self.config.FpyLimit_Defeated}")
assert self.app.run(f"config stopOnKizunaReisou {self.config.FpyLimit_KizunaReisou}")
assert self.app.run(f"config stopOnSpecialDrop {self.config.FpyLimit_SpecialDrop}")
assert self.app.run(f"teamup set index {self.config.FpyTeam_Index}")
assert self.app.run(f"main {self.config.FpyApple_AppleCount} {self.config.FpyApple_AppleKind}")
with self.config.multi_set():
if self.app.last_error.startswith("Script Stopped"):
self.config.Scheduler_Enable = False
return
if self.config.Apple_EatOnce:
self.config.Apple_AppleCount = 0
if self.config.FpyApple_EatOnce:
self.config.FpyApple_AppleCount = 0
else:
self.config.Apple_AppleTotal -= self.config.Apple_AppleCount
self.config.Apple_AppleCount = min(
self.config.Apple_AppleCount,
self.config.Apple_AppleTotal,
self.config.FpyApple_AppleTotal -= self.config.FpyApple_AppleCount
self.config.FpyApple_AppleCount = min(
self.config.FpyApple_AppleCount,
self.config.FpyApple_AppleTotal,
)
hh, mm = self.config.Interval_Interval.split(":")
hh, mm = self.config.FpyInterval_Interval.split(":")
self.config.task_delay(minute=int(hh) * 60 + int(mm))
def fpy_daily_fp_summon(self):
@ -90,10 +90,10 @@ class FgoAutoScript(AzurLaneAutoScript):
assert self.app.run("battle")
def fpy_benchmark(self):
assert self.app.run(f"bench {dict([('touch','-i'),('screen','-o'),('all','')])[self.config.Benchmark_BenchOption]}")
assert self.app.run(f"bench {dict([('touch','-i'),('screen','-o'),('all','')])[self.config.FpyBenchmark_BenchOption]}")
def fpy_call(self):
assert self.app.run(f"call {self.config.Call_Function}")
assert self.app.run(f"call {self.config.FpyCall_Function}")
def loop(config_name):

View File

@ -79,7 +79,7 @@
"display": "hide"
}
},
"Interval": {
"FpyInterval": {
"Interval": {
"type": "input",
"value": "00:05",
@ -127,13 +127,13 @@
"display": "hide"
}
},
"Team": {
"FpyTeam": {
"Index": {
"type": "input",
"value": 0
}
},
"Apple": {
"FpyApple": {
"AppleKind": {
"type": "select",
"value": "gold",
@ -158,7 +158,7 @@
"value": 999
}
},
"Limit": {
"FpyLimit": {
"Defeated": {
"type": "checkbox",
"value": true
@ -172,7 +172,7 @@
"value": 999
}
},
"Interval": {
"FpyInterval": {
"Interval": {
"type": "input",
"value": "07:00",
@ -240,7 +240,7 @@
}
},
"FpyBenchmark": {
"Benchmark": {
"FpyBenchmark": {
"BenchOption": {
"type": "select",
"value": "all",
@ -261,7 +261,7 @@
}
},
"FpyCall": {
"Call": {
"FpyCall": {
"Function": {
"type": "select",
"value": "lottery",

View File

@ -41,16 +41,16 @@ FpyEmulator:
value: /absolute_path_to_FGO-py/deploy/AzurLaneAutoScript
type: textarea
Interval:
FpyInterval:
Interval:
value: 07:00
validate: "\\d+:\\d"
Team:
FpyTeam:
Index:
value: 0
Apple:
FpyApple:
AppleKind:
value: gold
option:
@ -66,7 +66,7 @@ Apple:
AppleTotal:
value: 999
Limit:
FpyLimit:
Defeated:
value: True
KizunaReisou:
@ -74,7 +74,7 @@ Limit:
SpecialDrop:
value: 999
Benchmark:
FpyBenchmark:
BenchOption:
value: all
option:
@ -82,7 +82,7 @@ Benchmark:
- screen
- all
Call:
FpyCall:
Function:
value: lottery
option:

View File

@ -5,5 +5,5 @@
FpyHeartbeat:
Scheduler:
Enable: True
Interval:
FpyInterval:
Interval: 00:05

View File

@ -4,13 +4,13 @@
"Fpy",
"FpyHeartbeat"
],
"Farm": [
"FpyFarm": [
"FpyMain"
],
"Daily": [
"FpyDaily": [
"FpyDailyFpSummon"
],
"Tool": [
"FpyTool": [
"FpyBattle",
"FpyBenchmark",
"FpyCall"

View File

@ -12,28 +12,28 @@ Fpy:
FpyHeartbeat:
- Scheduler
- Interval
- FpyInterval
# ==================== Farm ====================
# ==================== FpyFarm ====================
FpyMain:
- Scheduler
- Team
- Apple
- Limit
- Interval
- FpyTeam
- FpyApple
- FpyLimit
- FpyInterval
# ==================== Daily ====================
# ==================== FpyDaily ====================
FpyDailyFpSummon:
- Scheduler
# ==================== Tool ====================
# ==================== FpyTool ====================
FpyBattle: []
FpyBenchmark:
- Benchmark
- FpyBenchmark
FpyCall:
- Call
- FpyCall

View File

@ -31,28 +31,28 @@ class GeneratedConfig:
FpyEmulator_Serial = '127.0.0.1:5555'
FpyEmulator_LaunchPath = '/absolute_path_to_FGO-py/deploy/AzurLaneAutoScript'
# Group `Interval`
Interval_Interval = '07:00'
# Group `FpyInterval`
FpyInterval_Interval = '07:00'
# Group `Team`
Team_Index = 0
# Group `FpyTeam`
FpyTeam_Index = 0
# Group `Apple`
Apple_AppleKind = 'gold' # gold, silver, bronze, copper, quartz
Apple_AppleCount = 0
Apple_EatOnce = True
Apple_AppleTotal = 999
# Group `FpyApple`
FpyApple_AppleKind = 'gold' # gold, silver, bronze, copper, quartz
FpyApple_AppleCount = 0
FpyApple_EatOnce = True
FpyApple_AppleTotal = 999
# Group `Limit`
Limit_Defeated = True
Limit_KizunaReisou = True
Limit_SpecialDrop = 999
# Group `FpyLimit`
FpyLimit_Defeated = True
FpyLimit_KizunaReisou = True
FpyLimit_SpecialDrop = 999
# Group `Benchmark`
Benchmark_BenchOption = 'all' # touch, screen, all
# Group `FpyBenchmark`
FpyBenchmark_BenchOption = 'all' # touch, screen, all
# Group `Call`
Call_Function = 'lottery' # fpSummon, lottery, mail, synthesis, summonHistory
# Group `FpyCall`
FpyCall_Function = 'lottery' # fpSummon, lottery, mail, synthesis, summonHistory
# Group `Storage`
Storage_Storage = {}

View File

@ -8,15 +8,15 @@
"name": "FGO-py",
"help": ""
},
"Farm": {
"FpyFarm": {
"name": "Farm",
"help": ""
},
"Daily": {
"FpyDaily": {
"name": "Daily",
"help": ""
},
"Tool": {
"FpyTool": {
"name": "Tool",
"help": ""
}
@ -129,7 +129,7 @@
"help": "The absolute path of the `AzurLaneAutoScript` subdirectory in the `deploy` directory of FGO-py\nYou can copy this subdirectory to another location for distributed deployment"
}
},
"Interval": {
"FpyInterval": {
"_info": {
"name": "Interval",
"help": "Whenever a call to this task is completed, call it again after a certain period of time"
@ -139,7 +139,7 @@
"help": "HH:MM, HH cannot be omitted, MM can be greater than 60"
}
},
"Team": {
"FpyTeam": {
"_info": {
"name": "Team",
"help": "Team"
@ -149,7 +149,7 @@
"help": "The position of the selected team in the team formation interface, left to right 1-10, 0 to disable"
}
},
"Apple": {
"FpyApple": {
"_info": {
"name": "Apple",
"help": "Apple"
@ -176,7 +176,7 @@
"help": "When `EatOnce` is turned off, this value will automatically reduced to prevent eating non-existent apples"
}
},
"Limit": {
"FpyLimit": {
"_info": {
"name": "Limit",
"help": "Disable this task when certain conditions met"
@ -194,7 +194,7 @@
"help": "Disable this task after several ★5 essences earned\nThis value is automatically reduced"
}
},
"Benchmark": {
"FpyBenchmark": {
"_info": {
"name": "Benchmark",
"help": "Get the time cost for a single touch and screenshot"
@ -207,7 +207,7 @@
"all": "all"
}
},
"Call": {
"FpyCall": {
"_info": {
"name": "Call",
"help": "Calling some standalone widgets in FGO-py"

View File

@ -8,15 +8,15 @@
"name": "FGO-py",
"help": ""
},
"Farm": {
"FpyFarm": {
"name": "出撃",
"help": ""
},
"Daily": {
"FpyDaily": {
"name": "日課",
"help": ""
},
"Tool": {
"FpyTool": {
"name": "ツール",
"help": ""
}
@ -129,7 +129,7 @@
"help": "FGO-pyの`deploy`ディレクトリにある`AzurLaneAutoScript`サブディレクトリの絶対パスです\nこのサブディレクトリを別の場所にコピーして、分散配置することも可能です"
}
},
"Interval": {
"FpyInterval": {
"_info": {
"name": "間隔",
"help": "このタスクの呼び出しが完了するたびに、一定時間後に再度呼び出します"
@ -139,7 +139,7 @@
"help": "HH:MM、HHは省略不可、MMは60以上可能"
}
},
"Team": {
"FpyTeam": {
"_info": {
"name": "パーティー",
"help": "パーティー"
@ -149,7 +149,7 @@
"help": "パーティー編成インターフェイスで選択したパーティーの位置、左から1~10、0は無効にする"
}
},
"Apple": {
"FpyApple": {
"_info": {
"name": "林檎",
"help": "りんご"
@ -176,7 +176,7 @@
"help": "「一回だけ」をオフにすると、存在しない林檎を食べるのを防ぐために、この数値は自動的に減少します。"
}
},
"Limit": {
"FpyLimit": {
"_info": {
"name": "停止条件",
"help": "特定の条件を満たした場合に、このタスクを無効にする"
@ -194,7 +194,7 @@
"help": "★5礼装ドロップを一定数入手した時にこのタスクを無効にする"
}
},
"Benchmark": {
"FpyBenchmark": {
"_info": {
"name": "性能評価",
"help": "タッチとスクリーンショットにかかる時間を取得する"
@ -207,7 +207,7 @@
"all": "全部"
}
},
"Call": {
"FpyCall": {
"_info": {
"name": "呼び出す",
"help": "FGO-pyのスタンドアロン機能を呼び出す"

View File

@ -8,15 +8,15 @@
"name": "FGO-py",
"help": ""
},
"Farm": {
"FpyFarm": {
"name": "出击",
"help": ""
},
"Daily": {
"FpyDaily": {
"name": "每日",
"help": ""
},
"Tool": {
"FpyTool": {
"name": "工具",
"help": ""
}
@ -129,7 +129,7 @@
"help": "FGO-py的deploy目录下AzurLaneAutoScript子目录的绝对路径\n你可以把这个子目录拷贝至其他位置方便分布式部署"
}
},
"Interval": {
"FpyInterval": {
"_info": {
"name": "运行间隔",
"help": "每当调用本任务完成,隔一段时间后再次调用"
@ -139,7 +139,7 @@
"help": "HH:MMHH不可省略MM可以大于60"
}
},
"Team": {
"FpyTeam": {
"_info": {
"name": "编队",
"help": "编队信息"
@ -149,7 +149,7 @@
"help": "在「队伍编成」界面的位置由左至右1-100表示使用上一次的编队不进行切换"
}
},
"Apple": {
"FpyApple": {
"_info": {
"name": "苹果",
"help": "吃一定数量的苹果"
@ -176,7 +176,7 @@
"help": "当「只吃一次」关闭时,这个数值会自动减少,防止吃不存在的苹果"
}
},
"Limit": {
"FpyLimit": {
"_info": {
"name": "停止条件",
"help": "满足特定条件时禁用本任务"
@ -194,7 +194,7 @@
"help": "当周回关卡累计掉落一定数量的★5礼装后禁用本任务\n这个数值会自动减少"
}
},
"Benchmark": {
"FpyBenchmark": {
"_info": {
"name": "性能测试",
"help": "获取单次触摸和截图所需要的时间"
@ -207,7 +207,7 @@
"all": "触摸 + 截图"
}
},
"Call": {
"FpyCall": {
"_info": {
"name": "小组件",
"help": "调用FGO-py中的一些独立存在的小组件"

View File

@ -8,17 +8,17 @@
"name": "Menu.Fpy.name",
"help": "Menu.Fpy.help"
},
"Farm": {
"name": "Menu.Farm.name",
"help": "Menu.Farm.help"
"FpyFarm": {
"name": "Menu.FpyFarm.name",
"help": "Menu.FpyFarm.help"
},
"Daily": {
"name": "Menu.Daily.name",
"help": "Menu.Daily.help"
"FpyDaily": {
"name": "Menu.FpyDaily.name",
"help": "Menu.FpyDaily.help"
},
"Tool": {
"name": "Menu.Tool.name",
"help": "Menu.Tool.help"
"FpyTool": {
"name": "Menu.FpyTool.name",
"help": "Menu.FpyTool.help"
}
},
"Task": {
@ -129,34 +129,34 @@
"help": "FpyEmulator.LaunchPath.help"
}
},
"Interval": {
"FpyInterval": {
"_info": {
"name": "Interval._info.name",
"help": "Interval._info.help"
"name": "FpyInterval._info.name",
"help": "FpyInterval._info.help"
},
"Interval": {
"name": "Interval.Interval.name",
"help": "Interval.Interval.help"
"name": "FpyInterval.Interval.name",
"help": "FpyInterval.Interval.help"
}
},
"Team": {
"FpyTeam": {
"_info": {
"name": "Team._info.name",
"help": "Team._info.help"
"name": "FpyTeam._info.name",
"help": "FpyTeam._info.help"
},
"Index": {
"name": "Team.Index.name",
"help": "Team.Index.help"
"name": "FpyTeam.Index.name",
"help": "FpyTeam.Index.help"
}
},
"Apple": {
"FpyApple": {
"_info": {
"name": "Apple._info.name",
"help": "Apple._info.help"
"name": "FpyApple._info.name",
"help": "FpyApple._info.help"
},
"AppleKind": {
"name": "Apple.AppleKind.name",
"help": "Apple.AppleKind.help",
"name": "FpyApple.AppleKind.name",
"help": "FpyApple.AppleKind.help",
"gold": "gold",
"silver": "silver",
"bronze": "bronze",
@ -164,57 +164,57 @@
"quartz": "quartz"
},
"AppleCount": {
"name": "Apple.AppleCount.name",
"help": "Apple.AppleCount.help"
"name": "FpyApple.AppleCount.name",
"help": "FpyApple.AppleCount.help"
},
"EatOnce": {
"name": "Apple.EatOnce.name",
"help": "Apple.EatOnce.help"
"name": "FpyApple.EatOnce.name",
"help": "FpyApple.EatOnce.help"
},
"AppleTotal": {
"name": "Apple.AppleTotal.name",
"help": "Apple.AppleTotal.help"
"name": "FpyApple.AppleTotal.name",
"help": "FpyApple.AppleTotal.help"
}
},
"Limit": {
"FpyLimit": {
"_info": {
"name": "Limit._info.name",
"help": "Limit._info.help"
"name": "FpyLimit._info.name",
"help": "FpyLimit._info.help"
},
"Defeated": {
"name": "Limit.Defeated.name",
"help": "Limit.Defeated.help"
"name": "FpyLimit.Defeated.name",
"help": "FpyLimit.Defeated.help"
},
"KizunaReisou": {
"name": "Limit.KizunaReisou.name",
"help": "Limit.KizunaReisou.help"
"name": "FpyLimit.KizunaReisou.name",
"help": "FpyLimit.KizunaReisou.help"
},
"SpecialDrop": {
"name": "Limit.SpecialDrop.name",
"help": "Limit.SpecialDrop.help"
"name": "FpyLimit.SpecialDrop.name",
"help": "FpyLimit.SpecialDrop.help"
}
},
"Benchmark": {
"FpyBenchmark": {
"_info": {
"name": "Benchmark._info.name",
"help": "Benchmark._info.help"
"name": "FpyBenchmark._info.name",
"help": "FpyBenchmark._info.help"
},
"BenchOption": {
"name": "Benchmark.BenchOption.name",
"help": "Benchmark.BenchOption.help",
"name": "FpyBenchmark.BenchOption.name",
"help": "FpyBenchmark.BenchOption.help",
"touch": "touch",
"screen": "screen",
"all": "all"
}
},
"Call": {
"FpyCall": {
"_info": {
"name": "Call._info.name",
"help": "Call._info.help"
"name": "FpyCall._info.name",
"help": "FpyCall._info.help"
},
"Function": {
"name": "Call.Function.name",
"help": "Call.Function.help",
"name": "FpyCall.Function.name",
"help": "FpyCall.Function.help",
"fpSummon": "fpSummon",
"lottery": "lottery",
"mail": "mail",