1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-04-10 09:37:10 +08:00

Opt: Reduce json writes when recording emotion

This commit is contained in:
LmeSzinc
2022-10-30 04:15:56 +08:00
parent 158a617e7d
commit 61e62edb08

View File

@@ -313,6 +313,7 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
with self.multi_set(): with self.multi_set():
for arg, value in kwargs.items(): for arg, value in kwargs.items():
record = arg.replace("Value", "Record") record = arg.replace("Value", "Record")
if self.__getattribute__(arg) != value:
self.__setattr__(arg, value) self.__setattr__(arg, value)
self.__setattr__(record, datetime.now().replace(microsecond=0)) self.__setattr__(record, datetime.now().replace(microsecond=0))