Add: TeamIndex

This commit is contained in:
hgjazhgj 2023-05-07 09:17:14 +08:00
parent f6d52621fe
commit 59263237ab
13 changed files with 81 additions and 11 deletions

View File

@ -34,16 +34,13 @@
}
#pywebio-scope-_daemon {
display: flex;
flex-direction: column;
display: grid;
grid-auto-flow: row;
grid-template-rows: auto minmax(6rem, auto) minmax(15rem, 1fr);
height: 100%;
overflow-y: auto;
}
#pywebio-scope-log{
flex-grow: 1;
}
#pywebio-scope-_daemon_upper {
display: grid;
grid-auto-flow: column;

View File

@ -43,6 +43,9 @@
"FailureInterval": 120,
"ServerUpdate": "05:00"
},
"Team": {
"Index": 0
},
"Apple": {
"AppleKind": "gold",
"AppleCount": 0,

View File

@ -625,6 +625,21 @@ class AlasGUI(Frame):
continue
self.set_group(group, arg_dict, config, task)
run_js("""
$("#pywebio-scope-log").css(
"grid-row-start",
-2 - $("#pywebio-scope-_daemon").children().filter(
function(){
return $(this).css("display") === "none";
}
).length
);
$("#pywebio-scope-log").css(
"grid-row-end",
-1
);
""")
self.task_handler.add(switch_scheduler.g(), 1, True)
self.task_handler.add(switch_log_scroll.g(), 1, True)
self.task_handler.add(log.put_log(self.alas), 0.25, True)

View File

@ -57,6 +57,7 @@ class FgoAutoScript(AzurLaneAutoScript):
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}")
if self.config.Apple_EatOnce:
self.config.Apple_AppleCount = 0

View File

@ -37,7 +37,7 @@ class FGOpy(HeadlessCliApplication):
if match is None:
logger.info(f"... {line}")
return
head, datetimems, level, module, content = match.groups()
head, datetime, level, module, content = match.groups()
getattr(logger, level.lower())(content)
if head:
@ -54,8 +54,8 @@ class FGOpy(HeadlessCliApplication):
def run(self, cmd):
self.mutex.acquire()
self.feed(cmd)
while self.mutex.locked():
time.sleep(1)
with self.mutex:
pass
if self.last_error == "exited":
exit(not self.success)
return self.success

View File

@ -126,6 +126,12 @@
"display": "hide"
}
},
"Team": {
"Index": {
"type": "input",
"value": 0
}
},
"Apple": {
"AppleKind": {
"type": "select",

View File

@ -45,6 +45,10 @@ Interval:
Interval:
value: 07:00
Team:
Index:
value: 0
Apple:
AppleKind:
value: gold

View File

@ -18,6 +18,7 @@ FpyHeartbeat:
FpyMain:
- Scheduler
- Team
- Apple
- Limit
- Interval

View File

@ -34,6 +34,9 @@ class GeneratedConfig:
# Group `Interval`
Interval_Interval = '07:00'
# Group `Team`
Team_Index = 0
# Group `Apple`
Apple_AppleKind = 'gold' # gold, silver, bronze, copper, quartz
Apple_AppleCount = 0

View File

@ -135,6 +135,16 @@
"help": "Interval.Interval.help"
}
},
"Team": {
"_info": {
"name": "Team._info.name",
"help": "Team._info.help"
},
"Index": {
"name": "Team.Index.name",
"help": "Team.Index.help"
}
},
"Apple": {
"_info": {
"name": "Apple._info.name",

View File

@ -135,6 +135,16 @@
"help": "Interval.Interval.help"
}
},
"Team": {
"_info": {
"name": "Team._info.name",
"help": "Team._info.help"
},
"Index": {
"name": "Team.Index.name",
"help": "Team.Index.help"
}
},
"Apple": {
"_info": {
"name": "Apple._info.name",

View File

@ -24,7 +24,7 @@
"Task": {
"Fpy": {
"name": "FGO-py设置",
"help": ""
"help": "需要FGO-py v11.2.0或更高"
},
"FpyHeartbeat": {
"name": "心跳",
@ -135,6 +135,16 @@
"help": "HH:MM"
}
},
"Team": {
"_info": {
"name": "编队信息",
"help": "编队信息"
},
"Index": {
"name": "编队序号",
"help": "在「队伍编成」界面的位置由左至右1-100表示使用上一次的编队不进行切换"
}
},
"Apple": {
"_info": {
"name": "苹果",
@ -155,7 +165,7 @@
},
"EatOnce": {
"name": "只吃一次",
"help": "一次调用之后将「苹果数量」清零,之后只是清空体力\n如果关闭,则每次调用都会吃苹果"
"help": "一次调用之后将「苹果数量」清零,之后只是清空体力\n如果关闭此选项,则每次调用都会吃苹果"
},
"AppleTotal": {
"name": "苹果总量",

View File

@ -135,6 +135,16 @@
"help": "Interval.Interval.help"
}
},
"Team": {
"_info": {
"name": "Team._info.name",
"help": "Team._info.help"
},
"Index": {
"name": "Team.Index.name",
"help": "Team.Index.help"
}
},
"Apple": {
"_info": {
"name": "Apple._info.name",