1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-26 12:47:53 +08:00

Opt: Disallow modifying emotion record time on GUI, they can be auto updated now

This commit is contained in:
LmeSzinc
2022-06-06 00:26:03 +08:00
parent ca4f7de2d0
commit 1ad5e9eaa8
8 changed files with 48 additions and 42 deletions

View File

@@ -1280,7 +1280,7 @@
}, },
"OpsiAshAssist": { "OpsiAshAssist": {
"Scheduler": { "Scheduler": {
"Enable": true, "Enable": false,
"NextRun": "2020-01-01 00:00:00", "NextRun": "2020-01-01 00:00:00",
"Command": "OpsiAshAssist", "Command": "OpsiAshAssist",
"SuccessInterval": 30, "SuccessInterval": 30,

View File

@@ -500,7 +500,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -532,7 +532,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -856,7 +856,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -888,7 +888,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -1212,7 +1212,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -1244,7 +1244,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -1615,7 +1615,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -1647,7 +1647,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -2002,7 +2002,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -2034,7 +2034,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -2410,7 +2410,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -2442,7 +2442,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -2828,7 +2828,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -2860,7 +2860,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -3235,7 +3235,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -3267,7 +3267,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -3632,7 +3632,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -3664,7 +3664,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -3864,7 +3864,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -3896,7 +3896,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -4053,7 +4053,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -4085,7 +4085,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -4152,7 +4152,7 @@
"Commission": { "Commission": {
"Scheduler": { "Scheduler": {
"Enable": { "Enable": {
"type": "disable", "type": "lock",
"value": true "value": true
}, },
"NextRun": { "NextRun": {
@@ -4248,7 +4248,7 @@
"Research": { "Research": {
"Scheduler": { "Scheduler": {
"Enable": { "Enable": {
"type": "disable", "type": "lock",
"value": true "value": true
}, },
"NextRun": { "NextRun": {
@@ -4506,7 +4506,7 @@
"Reward": { "Reward": {
"Scheduler": { "Scheduler": {
"Enable": { "Enable": {
"type": "disable", "type": "lock",
"value": true "value": true
}, },
"NextRun": { "NextRun": {
@@ -5595,7 +5595,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -5627,7 +5627,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -5956,7 +5956,7 @@
"value": 119 "value": 119
}, },
"Fleet1Record": { "Fleet1Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -5988,7 +5988,7 @@
"value": 119 "value": 119
}, },
"Fleet2Record": { "Fleet2Record": {
"type": "input", "type": "disable",
"value": "2020-01-01 00:00:00", "value": "2020-01-01 00:00:00",
"validate": "datetime" "validate": "datetime"
}, },
@@ -6097,7 +6097,7 @@
"Scheduler": { "Scheduler": {
"Enable": { "Enable": {
"type": "checkbox", "type": "checkbox",
"value": true "value": false
}, },
"NextRun": { "NextRun": {
"type": "input", "type": "input",

View File

@@ -151,7 +151,9 @@ Emotion:
CalculateEmotion: true CalculateEmotion: true
IgnoreLowEmotionWarn: false IgnoreLowEmotionWarn: false
Fleet1Value: 119 Fleet1Value: 119
Fleet1Record: 2020-01-01 00:00:00 Fleet1Record:
value: 2020-01-01 00:00:00
type: disable
Fleet1Control: Fleet1Control:
value: prevent_yellow_face value: prevent_yellow_face
option: [keep_exp_bonus, prevent_green_face, prevent_yellow_face, prevent_red_face] option: [keep_exp_bonus, prevent_green_face, prevent_yellow_face, prevent_red_face]
@@ -160,7 +162,9 @@ Emotion:
option: [not_in_dormitory, dormitory_floor_1, dormitory_floor_2] option: [not_in_dormitory, dormitory_floor_1, dormitory_floor_2]
Fleet1Oath: false Fleet1Oath: false
Fleet2Value: 119 Fleet2Value: 119
Fleet2Record: 2020-01-01 00:00:00 Fleet2Record:
value: 2020-01-01 00:00:00
type: disable
Fleet2Control: Fleet2Control:
value: prevent_yellow_face value: prevent_yellow_face
option: [keep_exp_bonus, prevent_green_face, prevent_yellow_face, prevent_red_face] option: [keep_exp_bonus, prevent_green_face, prevent_yellow_face, prevent_red_face]

View File

@@ -50,7 +50,3 @@ MetaReward:
# ==================== DailyMission ==================== # ==================== DailyMission ====================
# ==================== Opsi ==================== # ==================== Opsi ====================
OpsiAshAssist:
Scheduler:
Enable: true

View File

@@ -135,7 +135,7 @@ Commission:
Scheduler: Scheduler:
Enable: Enable:
value: true value: true
type: disable type: lock
SuccessInterval: 30-60 SuccessInterval: 30-60
FailureInterval: 30-60 FailureInterval: 30-60
ServerUpdate: 00:00 ServerUpdate: 00:00
@@ -148,7 +148,7 @@ Research:
Scheduler: Scheduler:
Enable: Enable:
value: true value: true
type: disable type: lock
SuccessInterval: 30-60 SuccessInterval: 30-60
FailureInterval: 30-60 FailureInterval: 30-60
ServerUpdate: 00:00 ServerUpdate: 00:00
@@ -171,7 +171,7 @@ Reward:
Scheduler: Scheduler:
Enable: Enable:
value: true value: true
type: disable type: lock
SuccessInterval: 120-240 SuccessInterval: 120-240
FailureInterval: 120-240 FailureInterval: 120-240
ServerUpdate: 00:00 ServerUpdate: 00:00

View File

@@ -460,7 +460,7 @@ class ConfigUpdater:
def deep_load(keys): def deep_load(keys):
data = deep_get(self.args, keys=keys, default={}) data = deep_get(self.args, keys=keys, default={})
value = deep_get(old, keys=keys, default=data['value']) value = deep_get(old, keys=keys, default=data['value'])
if value is None or value == '' or data['type'] in ['disable', 'hide'] or is_template: if value is None or value == '' or data['type'] in ['lock'] or is_template:
value = data['value'] value = data['value']
value = parse_value(value, data=data) value = parse_value(value, data=data)
deep_set(new, keys=keys, value=value) deep_set(new, keys=keys, value=value)

View File

@@ -379,7 +379,7 @@ class AlasGUI(Frame):
def _alas_thread_wait_config_change(self) -> None: def _alas_thread_wait_config_change(self) -> None:
paths = [] paths = []
for path, d in deep_iter(self.ALAS_ARGS, depth=3): for path, d in deep_iter(self.ALAS_ARGS, depth=3):
if d["type"] in ["disable", "hide"]: if d["type"] in ["lock", "disable", "hide"]:
continue continue
paths.append(self.path_to_idx[".".join(path)]) paths.append(self.path_to_idx[".".join(path)])
while self.alive: while self.alive:

View File

@@ -412,7 +412,13 @@ def get_output(
return put_textarea_(name, title, arg_help, value, **other_html_attrs) return put_textarea_(name, title, arg_help, value, **other_html_attrs)
elif arg_type == "checkbox": elif arg_type == "checkbox":
return put_checkbox_(name, title, arg_help, value, **other_html_attrs) return put_checkbox_(name, title, arg_help, value, **other_html_attrs)
elif arg_type == "lock":
return put_input_(
name, title, arg_help, value, readonly=True, **other_html_attrs
)
elif arg_type == "disable": elif arg_type == "disable":
return put_input_( return put_input_(
name, title, arg_help, value, readonly=True, **other_html_attrs name, title, arg_help, value, readonly=True, **other_html_attrs
) )
elif arg_type == "hide":
return None