Exemple #1
0
        private static Preset NewlyPrintedPreset()
        {
            string id          = "NewlyPrinted";
            string name        = "Newly Printed";
            string description = "This Duplicant was recently printed. Their body just needs some time to adjust.";
            string nextPreset  = "NewlyAdjusted";

            MathUtil.MinMax          beginsIn  = new MathUtil.MinMax(0, 0);
            MathUtil.MinMax          lastsFor  = new MathUtil.MinMax(1, 1);
            List <AttributeModifier> modifiers = new List <AttributeModifier>();

            modifiers.Add(new AttributeModifier(Db.Get().Attributes.Athletics.Id, -2f, name));
            modifiers.Add(new AttributeModifier(Db.Get().Attributes.Learning.Id, -1f, name));
            modifiers.Add(new AttributeModifier(Db.Get().Attributes.AirConsumptionRate.Id, -0.33f, name, true));
            modifiers.Add(new AttributeModifier("CaloriesDelta", (100f / 60f) * 300f, name));
            modifiers.Add(new AttributeModifier("StaminaDelta", -(30f / 600f), name));
            modifiers.Add(new AttributeModifier(Db.Get().Attributes.GermResistance.Id, -0.5f, name));
            Preset p = new Preset(id, description, name, beginsIn, lastsFor, true, modifiers, nextPreset);

            return(p);
        }
Exemple #2
0
 public Preset(string _id, string _description, string _name, MathUtil.MinMax _beginsIn, MathUtil.MinMax _lastsFor, bool is_bad, List <AttributeModifier> _modifiers, string _nextPreset, bool _deathStage = false)
 {
     ID          = _id;
     Description = _description;
     Name        = _name;
     BeginsIn    = _beginsIn;
     LastsFor    = _lastsFor;
     Is_Bad      = is_bad;
     Modifiers   = _modifiers;
     NextPreset  = _nextPreset;
     _deathStage = false;
 }
 private string StringCallback(string str, Instance smi)
 {
     MathUtil.MinMax detectTimeRange = smi.GetDetectTimeRange();
     return(str.Replace("{TotalQuality}", GameUtil.GetFormattedPercent(smi.ComputeTotalDishQuality() * 100f, GameUtil.TimeSlice.None)).Replace("{WorstTime}", GameUtil.GetFormattedTime(detectTimeRange.min)).Replace("{BestTime}", GameUtil.GetFormattedTime(detectTimeRange.max)));
 }