mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Changed the mod setting save/load evaluation flow in Faction to satisfy mypy.
This commit is contained in:
@@ -288,14 +288,15 @@ class Faction:
|
|||||||
yield unit
|
yield unit
|
||||||
|
|
||||||
def apply_mod_settings(self, mod_settings: Optional[ModSettings] = None) -> None:
|
def apply_mod_settings(self, mod_settings: Optional[ModSettings] = None) -> None:
|
||||||
if mod_settings is None and self.mod_settings is None:
|
if mod_settings is None:
|
||||||
# No mod settings were provided and none were saved for this faction
|
if self.mod_settings is None:
|
||||||
# so stop here
|
# No mod settings were provided and none were saved for this faction
|
||||||
return
|
# so stop here
|
||||||
elif self.mod_settings is not None:
|
return
|
||||||
# Saved mod settings were found for this faction,
|
elif self.mod_settings is not None:
|
||||||
# so load them for use
|
# Saved mod settings were found for this faction,
|
||||||
mod_settings = self.mod_settings
|
# so load them for use
|
||||||
|
mod_settings = self.mod_settings
|
||||||
else:
|
else:
|
||||||
# Update the mod settings of this faction
|
# Update the mod settings of this faction
|
||||||
# so the settings can be applied again on load, if needed
|
# so the settings can be applied again on load, if needed
|
||||||
|
|||||||
Reference in New Issue
Block a user