mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Merge 'upstream/develop' into new-plugin-system
This commit is contained in:
@@ -45,4 +45,15 @@ class Settings:
|
||||
plugin.setSettings(self)
|
||||
|
||||
|
||||
# Cheating
|
||||
self.show_red_ato = False
|
||||
|
||||
def __setstate__(self, state) -> None:
|
||||
# __setstate__ is called with the dict of the object being unpickled. We
|
||||
# can provide save compatibility for new settings options (which
|
||||
# normally would not be present in the unpickled object) by creating a
|
||||
# new settings object, updating it with the unpickled state, and
|
||||
# updating our dict with that.
|
||||
new_state = Settings().__dict__
|
||||
new_state.update(state)
|
||||
self.__dict__.update(new_state)
|
||||
|
||||
Reference in New Issue
Block a user