mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-24 23:49:59 +08:00
Upd: event 20201126 rerun
This commit is contained in:
@@ -340,6 +340,7 @@ class AlasGUI(Frame):
|
||||
@use_scope("groups")
|
||||
def set_group(self, group, arg_dict, config, task):
|
||||
group_name = group[0]
|
||||
server = to_server(deep_get(config, "Alas.Emulator.PackageName", "cn"))
|
||||
|
||||
output_list: List[Output] = []
|
||||
for arg, arg_dict in deep_iter(arg_dict, depth=1):
|
||||
@@ -371,11 +372,22 @@ class AlasGUI(Frame):
|
||||
output_kwargs["value"] = value
|
||||
# Options
|
||||
options = output_kwargs.pop("option", [])
|
||||
server = to_server(deep_get(config, 'Alas.Emulator.PackageName', 'cn'))
|
||||
available_events = deep_get(self.ALAS_ARGS, keys=f'{task}.{group_name}.{arg_name}.option_{server}')
|
||||
if available_events is not None:
|
||||
options = [opt for opt in options if opt in available_events]
|
||||
server_options = output_kwargs.get(f"option_{server}")
|
||||
if output_kwargs["widget_type"] == "select" and isinstance(server_options, list) and server_options:
|
||||
options = server_options
|
||||
output_kwargs["options"] = options
|
||||
if (
|
||||
task == "GemsFarming"
|
||||
and group_name == "Campaign"
|
||||
and arg_name == "Event"
|
||||
and output_kwargs["widget_type"] == "select"
|
||||
and len(options) == 1
|
||||
):
|
||||
continue
|
||||
if output_kwargs["widget_type"] == "select" and len(options) == 1:
|
||||
only_option = options[0]
|
||||
if only_option in output_kwargs.get("option_bold", []):
|
||||
output_kwargs["widget_type"] = "state"
|
||||
# Options label
|
||||
options_label = []
|
||||
for opt in options:
|
||||
|
||||
Reference in New Issue
Block a user