示例#1
0
        /// <summary>called when the settings are changed</summary>
        public static void NotifySettingsChanged()
        {
            PawnmorpherSettings settings        = LoadedModManager.GetMod <PawnmorpherMod>().GetSettings <PawnmorpherSettings>();
            IncidentDef         mutagenIncident = IncidentDef.Named("MutagenicShipPartCrash");


            if (!settings.enableMutagenShipPart)
            {
                mutagenIncident.baseChance = 0.0f;
            }
            else
            {
                mutagenIncident.baseChance = 2.0f;
            }

            if (!settings.enableFallout)
            {
                PMIncidentDefOf.MutagenicFallout.baseChance = 0;
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PawnmorpherMod"/> class.
 /// </summary>
 /// <param name="content">The content.</param>
 public PawnmorpherMod(ModContentPack content) : base(content)
 {
     settings = GetSettings <PawnmorpherSettings>();
 }