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

Merge pull request #1180 from Horizon101011/emotion

Opt: Update Emotion Record if Emotion Value is changed
This commit is contained in:
18870
2022-06-04 17:55:55 +08:00
committed by GitHub

View File

@@ -418,6 +418,18 @@ class AlasGUI(Frame):
elif not validate or re_fullmatch(validate, v):
deep_set(config, k, v)
valid.append(self.path_to_idx[k])
# update Emotion Record if Emotion Value is changed
if 'Emotion' in k and 'Value' in k:
k = k.split('.')
k[-1] = k[-1].replace('Value','Record')
k = '.'.join(k)
v = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
modified[k] = v
deep_set(config, k, v)
valid.append(self.path_to_idx[k])
pin[self.path_to_idx[k]] = v
else:
modified.pop(k)
invalid.append(self.path_to_idx[k])