public CalculatedGameSettings(Game game) {
_game = game;
_supportsModding = _game.SupportsMods();
_supportsMissions = _game.SupportsMissions();
_supportsServers = _game.SupportsServers();
if (_supportsModding)
_modding = _game.Modding();
Signatures = new string[0];
if (!Execute.InDesignMode) {
var collectionChanged = this.WhenAnyValue(x => x.Collection)
.Skip(1);
collectionChanged
.Subscribe(HandleModSetSwitch);
// TODO: Ignore out of band responses, cancel previous etc...
collectionChanged
.ObserveOn(ThreadPoolScheduler.Instance)
.Subscribe(x => UpdateSignatures());
this.WhenAnyValue(x => x.Server)
.Skip(1)
.Subscribe(HandleServerSwitch);
this.WhenAnyValue(x => x.Server.Mods)
.Skip(1)
.Subscribe(HandleServerModsChanged);
this.WhenAnyValue(x => x.Mission)
.Skip(1)
.Subscribe(HandleMissionSwitch);
}
_first = true;
}