mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Loading saved mod settings from the faction now works.
This commit is contained in:
@@ -288,25 +288,17 @@ 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:
|
||||||
from game.theater.start_generator import ModSettings
|
if mod_settings is None and self.mod_settings is None:
|
||||||
|
# No mod settings were provided and none were saved for this faction
|
||||||
# Update the mod settings of this faction
|
# so stop here
|
||||||
# so the settings can be applied again on load, if needed
|
return
|
||||||
if mod_settings is None:
|
elif self.mod_settings is not None:
|
||||||
mod_settings = ModSettings(
|
# Saved mod settings were found for this faction,
|
||||||
a4_skyhawk=False,
|
# so load them for use
|
||||||
f_16_idf=False,
|
mod_settings = self.mod_settings
|
||||||
f22_raptor=False,
|
|
||||||
f104_starfighter=False,
|
|
||||||
hercules=False,
|
|
||||||
uh_60l=False,
|
|
||||||
jas39_gripen=False,
|
|
||||||
su57_felon=False,
|
|
||||||
frenchpack=False,
|
|
||||||
high_digit_sams=False,
|
|
||||||
)
|
|
||||||
self.mod_settings = mod_settings
|
|
||||||
else:
|
else:
|
||||||
|
# Update the mod settings of this faction
|
||||||
|
# so the settings can be applied again on load, if needed
|
||||||
self.mod_settings = mod_settings
|
self.mod_settings = mod_settings
|
||||||
|
|
||||||
# aircraft
|
# aircraft
|
||||||
|
|||||||
Reference in New Issue
Block a user