Beispiel #1
0
        /// <summary>
        /// Patch ColonyDestinationSelectScreen.SettingChanged to replace displayed Trait Descriptors
        /// </summary>
        static void Postfix(ref NewGameSettingsPanel ___newGameSettings, ref DestinationSelectPanel ___destinationMapPanel, ref AsteroidDescriptorPanel ___startLocationProperties)
        {
            string setting = ___newGameSettings.GetSetting(CustomGameSettingConfigs.ClusterLayout);

            int.TryParse(___newGameSettings.GetSetting(CustomGameSettingConfigs.WorldgenSeed), out int result);
            ColonyDestinationAsteroidBeltData colonyDestinationAsteroidData = ___destinationMapPanel.SelectAsteroid(setting, result);

            ___startLocationProperties.SetDescriptors(GetModifiedTraitDescriptors(colonyDestinationAsteroidData.GetTraitDescriptors()));
        }