Exemple #1
0
    public List <Descriptor> GetDescriptors(GameObject go)
    {
        List <Descriptor> list = new List <Descriptor>();

        if (overheatTemp != null && fatalTemp != null)
        {
            string formattedValue  = overheatTemp.GetFormattedValue();
            string formattedValue2 = fatalTemp.GetFormattedValue();
            string str             = UI.BUILDINGEFFECTS.TOOLTIPS.OVERHEAT_TEMP;
            str = str + "\n\n" + overheatTemp.GetAttributeValueTooltip();
            Descriptor item = new Descriptor(string.Format(UI.BUILDINGEFFECTS.OVERHEAT_TEMP, formattedValue, formattedValue2), string.Format(str, formattedValue, formattedValue2), Descriptor.DescriptorType.Effect, false);
            list.Add(item);
        }
        else if (baseOverheatTemp != 0f)
        {
            string     formattedTemperature  = GameUtil.GetFormattedTemperature(baseOverheatTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false);
            string     formattedTemperature2 = GameUtil.GetFormattedTemperature(baseFatalTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false);
            string     format = UI.BUILDINGEFFECTS.TOOLTIPS.OVERHEAT_TEMP;
            Descriptor item2  = new Descriptor(string.Format(UI.BUILDINGEFFECTS.OVERHEAT_TEMP, formattedTemperature, formattedTemperature2), string.Format(format, formattedTemperature, formattedTemperature2), Descriptor.DescriptorType.Effect, false);
            list.Add(item2);
        }
        return(list);
    }
    private void RefreshDetails()
    {
        detailsPanel.SetActive(true);
        detailsPanel.GetComponent <CollapsibleDetailContentPanel>().HeaderLabel.text = UI.DETAILTABS.DETAILS.GROUPNAME_DETAILS;
        PrimaryElement      component  = selectedTarget.GetComponent <PrimaryElement>();
        CellSelectionObject component2 = selectedTarget.GetComponent <CellSelectionObject>();
        float   mass;
        float   temperature;
        Element element;
        byte    diseaseIdx;
        int     diseaseCount;

        if ((Object)component != (Object)null)
        {
            mass         = component.Mass;
            temperature  = component.Temperature;
            element      = component.Element;
            diseaseIdx   = component.DiseaseIdx;
            diseaseCount = component.DiseaseCount;
        }
        else
        {
            if (!((Object)component2 != (Object)null))
            {
                return;
            }
            mass         = component2.Mass;
            temperature  = component2.temperature;
            element      = component2.element;
            diseaseIdx   = component2.diseaseIdx;
            diseaseCount = component2.diseaseCount;
        }
        bool             flag = element.id == SimHashes.Vacuum || element.id == SimHashes.Void;
        float            specificHeatCapacity = element.specificHeatCapacity;
        float            highTemp             = element.highTemp;
        float            lowTemp    = element.lowTemp;
        BuildingComplete component3 = selectedTarget.GetComponent <BuildingComplete>();
        float            num        = (!((Object)component3 != (Object)null)) ? (-1f) : component3.creationTime;
        LogicPorts       component4 = selectedTarget.GetComponent <LogicPorts>();
        EnergyConsumer   component5 = selectedTarget.GetComponent <EnergyConsumer>();
        Operational      component6 = selectedTarget.GetComponent <Operational>();
        Battery          component7 = selectedTarget.GetComponent <Battery>();
        float            num2;
        float            num3;
        float            num4;

        if ((Object)component6 != (Object)null && ((Object)component4 != (Object)null || (Object)component5 != (Object)null || (Object)component7 != (Object)null))
        {
            num2 = component6.GetUptimeForTimeSpan(10f);
            num3 = component6.GetUptimeForTimeSpan(600f);
            num4 = component6.GetUptimeForTimeSpan(6000f);
        }
        else
        {
            num2 = -1f;
            num3 = -1f;
            num4 = -1f;
        }
        drawer.NewLabel(drawer.Format(UI.ELEMENTAL.PRIMARYELEMENT.NAME, element.name)).Tooltip(drawer.Format(UI.ELEMENTAL.PRIMARYELEMENT.TOOLTIP, element.name)).NewLabel(drawer.Format(UI.ELEMENTAL.MASS.NAME, GameUtil.GetFormattedMass(mass, GameUtil.TimeSlice.None, GameUtil.MetricMassFormat.UseThreshold, true, "{0:0.#}")))
        .Tooltip(drawer.Format(UI.ELEMENTAL.MASS.TOOLTIP, GameUtil.GetFormattedMass(mass, GameUtil.TimeSlice.None, GameUtil.MetricMassFormat.UseThreshold, true, "{0:0.#}")));
        if (num > 0f)
        {
            drawer.NewLabel(drawer.Format(UI.ELEMENTAL.AGE.NAME, Util.FormatTwoDecimalPlace((GameClock.Instance.GetTime() - num) / 600f))).Tooltip(drawer.Format(UI.ELEMENTAL.AGE.TOOLTIP, Util.FormatTwoDecimalPlace((GameClock.Instance.GetTime() - num) / 600f)));
        }
        else
        {
            drawer.NewLabel(drawer.Format(UI.ELEMENTAL.AGE.NAME, UI.ELEMENTAL.AGE.UNKNOWN)).Tooltip(UI.ELEMENTAL.AGE.UNKNOWN_TOOLTIP);
        }
        if (num2 >= 0f)
        {
            string text = UI.ELEMENTAL.UPTIME.NAME;
            text = text.Replace("{0}", GameUtil.GetFormattedTime(10f));
            text = text.Replace("{1}", GameUtil.GetFormattedTime(600f));
            text = text.Replace("{2}", GameUtil.GetFormattedTime(6000f));
            text = text.Replace("{3}", GameUtil.GetFormattedPercent(num2 * 100f, GameUtil.TimeSlice.None));
            text = text.Replace("{4}", GameUtil.GetFormattedPercent(num3 * 100f, GameUtil.TimeSlice.None));
            text = text.Replace("{5}", GameUtil.GetFormattedPercent(num4 * 100f, GameUtil.TimeSlice.None));
            drawer.NewLabel(text);
        }
        if (!flag)
        {
            bool     flag2      = false;
            float    num5       = element.thermalConductivity;
            Building component8 = selectedTarget.GetComponent <Building>();
            if ((Object)component8 != (Object)null)
            {
                num5 *= component8.Def.ThermalConductivity;
                flag2 = (component8.Def.ThermalConductivity < 1f);
            }
            string temperatureUnitSuffix = GameUtil.GetTemperatureUnitSuffix();
            float  shc   = specificHeatCapacity * 1f;
            string text2 = string.Format(UI.ELEMENTAL.SHC.NAME, GameUtil.GetDisplaySHC(shc).ToString("0.000"));
            string text3 = UI.ELEMENTAL.SHC.TOOLTIP;
            text3 = text3.Replace("{SPECIFIC_HEAT_CAPACITY}", text2 + GameUtil.GetSHCSuffix());
            text3 = text3.Replace("{TEMPERATURE_UNIT}", temperatureUnitSuffix);
            string text4 = string.Format(UI.ELEMENTAL.THERMALCONDUCTIVITY.NAME, GameUtil.GetDisplayThermalConductivity(num5).ToString("0.000"));
            string text5 = UI.ELEMENTAL.THERMALCONDUCTIVITY.TOOLTIP;
            text5 = text5.Replace("{THERMAL_CONDUCTIVITY}", text4 + GameUtil.GetThermalConductivitySuffix());
            text5 = text5.Replace("{TEMPERATURE_UNIT}", temperatureUnitSuffix);
            drawer.NewLabel(drawer.Format(UI.ELEMENTAL.TEMPERATURE.NAME, GameUtil.GetFormattedTemperature(temperature, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false))).Tooltip(drawer.Format(UI.ELEMENTAL.TEMPERATURE.TOOLTIP, GameUtil.GetFormattedTemperature(temperature, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false))).NewLabel(drawer.Format(UI.ELEMENTAL.DISEASE.NAME, GameUtil.GetFormattedDisease(diseaseIdx, diseaseCount, false)))
            .Tooltip(drawer.Format(UI.ELEMENTAL.DISEASE.TOOLTIP, GameUtil.GetFormattedDisease(diseaseIdx, diseaseCount, true)))
            .NewLabel(text2)
            .Tooltip(text3)
            .NewLabel(text4)
            .Tooltip(text5);
            if (flag2)
            {
                drawer.NewLabel(UI.GAMEOBJECTEFFECTS.INSULATED.NAME).Tooltip(UI.GAMEOBJECTEFFECTS.INSULATED.TOOLTIP);
            }
        }
        if (element.IsSolid)
        {
            drawer.NewLabel(drawer.Format(UI.ELEMENTAL.MELTINGPOINT.NAME, GameUtil.GetFormattedTemperature(highTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false))).Tooltip(drawer.Format(UI.ELEMENTAL.MELTINGPOINT.TOOLTIP, GameUtil.GetFormattedTemperature(highTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false)));
            ElementChunk component9 = selectedTarget.GetComponent <ElementChunk>();
            if ((Object)component9 != (Object)null)
            {
                AttributeModifier attributeModifier = component.Element.attributeModifiers.Find((AttributeModifier m) => m.AttributeId == Db.Get().BuildingAttributes.OverheatTemperature.Id);
                if (attributeModifier != null)
                {
                    drawer.NewLabel(drawer.Format(UI.ELEMENTAL.OVERHEATPOINT.NAME, attributeModifier.GetFormattedString(selectedTarget.gameObject))).Tooltip(drawer.Format(UI.ELEMENTAL.OVERHEATPOINT.TOOLTIP, attributeModifier.GetFormattedString(selectedTarget.gameObject)));
                }
            }
        }
        else if (element.IsLiquid)
        {
            drawer.NewLabel(drawer.Format(UI.ELEMENTAL.FREEZEPOINT.NAME, GameUtil.GetFormattedTemperature(lowTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false))).Tooltip(drawer.Format(UI.ELEMENTAL.FREEZEPOINT.TOOLTIP, GameUtil.GetFormattedTemperature(lowTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false))).NewLabel(drawer.Format(UI.ELEMENTAL.VAPOURIZATIONPOINT.NAME, GameUtil.GetFormattedTemperature(highTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false)))
            .Tooltip(drawer.Format(UI.ELEMENTAL.VAPOURIZATIONPOINT.TOOLTIP, GameUtil.GetFormattedTemperature(highTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false)));
        }
        else if (!flag)
        {
            drawer.NewLabel(drawer.Format(UI.ELEMENTAL.DEWPOINT.NAME, GameUtil.GetFormattedTemperature(lowTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false))).Tooltip(drawer.Format(UI.ELEMENTAL.DEWPOINT.TOOLTIP, GameUtil.GetFormattedTemperature(lowTemp, GameUtil.TimeSlice.None, GameUtil.TemperatureInterpretation.Absolute, true, false)));
        }
        Attributes attributes = selectedTarget.GetAttributes();

        if (attributes != null)
        {
            for (int i = 0; i < attributes.Count; i++)
            {
                AttributeInstance attributeInstance = attributes.AttributeTable[i];
                if (attributeInstance.Attribute.ShowInUI == Attribute.Display.Details || attributeInstance.Attribute.ShowInUI == Attribute.Display.Expectation)
                {
                    drawer.NewLabel(attributeInstance.modifier.Name + ": " + attributeInstance.GetFormattedValue()).Tooltip(attributeInstance.GetAttributeValueTooltip());
                }
            }
        }
        List <Descriptor> detailDescriptors = GameUtil.GetDetailDescriptors(GameUtil.GetAllDescriptors(selectedTarget, false));

        for (int j = 0; j < detailDescriptors.Count; j++)
        {
            Descriptor descriptor = detailDescriptors[j];
            drawer.NewLabel(descriptor.text).Tooltip(descriptor.tooltipText);
        }
    }
Exemple #3
0
        private void CreateStatusItems()
        {
            Func <string, object, string> resolveStringCallback = delegate(string str, object data)
            {
                Workable workable3 = (Workable)data;
                if ((UnityEngine.Object)workable3 != (UnityEngine.Object)null)
                {
                    str = str.Replace("{Target}", workable3.GetComponent <KSelectable>().GetName());
                }
                return(str);
            };
            Func <string, object, string> resolveStringCallback2 = delegate(string str, object data)
            {
                Workable workable2 = (Workable)data;
                if ((UnityEngine.Object)workable2 != (UnityEngine.Object)null)
                {
                    str = str.Replace("{Target}", workable2.GetComponent <KSelectable>().GetName());
                    ComplexFabricatorWorkable complexFabricatorWorkable = workable2 as ComplexFabricatorWorkable;
                    if ((UnityEngine.Object)complexFabricatorWorkable != (UnityEngine.Object)null)
                    {
                        ComplexRecipe currentWorkingOrder = complexFabricatorWorkable.CurrentWorkingOrder;
                        if (currentWorkingOrder != null)
                        {
                            str = str.Replace("{Item}", currentWorkingOrder.FirstResult.ProperName());
                        }
                    }
                }
                return(str);
            };

            BedUnreachable = CreateStatusItem("BedUnreachable", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            BedUnreachable.AddNotification(null, null, null, 0f);
            DailyRationLimitReached = CreateStatusItem("DailyRationLimitReached", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            DailyRationLimitReached.AddNotification(null, null, null, 0f);
            HoldingBreath = CreateStatusItem("HoldingBreath", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Hungry        = CreateStatusItem("Hungry", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Unhappy       = CreateStatusItem("Unhappy", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Unhappy.AddNotification(null, null, null, 0f);
            NervousBreakdown = CreateStatusItem("NervousBreakdown", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Bad, false, OverlayModes.None.ID, true, 2);
            NervousBreakdown.AddNotification(null, null, null, 0f);
            NoRationsAvailable       = CreateStatusItem("NoRationsAvailable", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Bad, false, OverlayModes.None.ID, true, 2);
            PendingPacification      = CreateStatusItem("PendingPacification", "DUPLICANTS", "status_item_pending_pacification", StatusItem.IconType.Custom, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            QuarantineAreaUnassigned = CreateStatusItem("QuarantineAreaUnassigned", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            QuarantineAreaUnassigned.AddNotification(null, null, null, 0f);
            QuarantineAreaUnreachable = CreateStatusItem("QuarantineAreaUnreachable", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            QuarantineAreaUnreachable.AddNotification(null, null, null, 0f);
            Quarantined        = CreateStatusItem("Quarantined", "DUPLICANTS", "status_item_quarantined", StatusItem.IconType.Custom, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            RationsUnreachable = CreateStatusItem("RationsUnreachable", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            RationsUnreachable.AddNotification(null, null, null, 0f);
            RationsNotPermitted = CreateStatusItem("RationsNotPermitted", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            RationsNotPermitted.AddNotification(null, null, null, 0f);
            Rotten   = CreateStatusItem("Rotten", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Starving = CreateStatusItem("Starving", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Bad, false, OverlayModes.None.ID, true, 2);
            Starving.AddNotification(null, null, null, 0f);
            Suffocating = CreateStatusItem("Suffocating", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.DuplicantThreatening, false, OverlayModes.None.ID, true, 2);
            Suffocating.AddNotification(null, null, null, 0f);
            Tired = CreateStatusItem("Tired", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Idle  = CreateStatusItem("Idle", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Idle.AddNotification(null, null, null, 0f);
            Pacified = CreateStatusItem("Pacified", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Dead     = CreateStatusItem("Dead", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Dead.resolveStringCallback = delegate(string str, object data)
            {
                Death death = (Death)data;
                return(str.Replace("{Death}", death.Name));
            };
            MoveToSuitNotRequired   = CreateStatusItem("MoveToSuitNotRequired", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            DroppingUnusedInventory = CreateStatusItem("DroppingUnusedInventory", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            MovingToSafeArea        = CreateStatusItem("MovingToSafeArea", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            ToiletUnreachable       = CreateStatusItem("ToiletUnreachable", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            ToiletUnreachable.AddNotification(null, null, null, 0f);
            NoUsableToilets = CreateStatusItem("NoUsableToilets", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            NoUsableToilets.AddNotification(null, null, null, 0f);
            NoToilets = CreateStatusItem("NoToilets", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            NoToilets.AddNotification(null, null, null, 0f);
            BreathingO2 = CreateStatusItem("BreathingO2", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 130);
            BreathingO2.resolveStringCallback = delegate(string str, object data)
            {
                OxygenBreather oxygenBreather2 = (OxygenBreather)data;
                float          averageRate     = Game.Instance.accumulators.GetAverageRate(oxygenBreather2.O2Accumulator);
                return(str.Replace("{ConsumptionRate}", GameUtil.GetFormattedMass(0f - averageRate, GameUtil.TimeSlice.PerSecond, GameUtil.MetricMassFormat.UseThreshold, true, "{0:0.#}")));
            };
            EmittingCO2 = CreateStatusItem("EmittingCO2", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 130);
            EmittingCO2.resolveStringCallback = delegate(string str, object data)
            {
                OxygenBreather oxygenBreather = (OxygenBreather)data;
                return(str.Replace("{EmittingRate}", GameUtil.GetFormattedMass(oxygenBreather.CO2EmitRate, GameUtil.TimeSlice.PerSecond, GameUtil.MetricMassFormat.UseThreshold, true, "{0:0.#}")));
            };
            Vomiting  = CreateStatusItem("Vomiting", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Coughing  = CreateStatusItem("Coughing", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            LowOxygen = CreateStatusItem("LowOxygen", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            LowOxygen.AddNotification(null, null, null, 0f);
            RedAlert = CreateStatusItem("RedAlert", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Sleeping = CreateStatusItem("Sleeping", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Sleeping.resolveTooltipCallback = delegate(string str, object data)
            {
                if (data is SleepChore.StatesInstance)
                {
                    SleepChore.StatesInstance statesInstance2 = (SleepChore.StatesInstance)data;
                    string stateChangeNoiseSource             = statesInstance2.stateChangeNoiseSource;
                    if (!string.IsNullOrEmpty(stateChangeNoiseSource))
                    {
                        string text5 = DUPLICANTS.STATUSITEMS.SLEEPING.TOOLTIP;
                        text5 = text5.Replace("{Disturber}", stateChangeNoiseSource);
                        str  += text5;
                    }
                }
                return(str);
            };
            SleepingInterruptedByNoise = CreateStatusItem("SleepingInterruptedByNoise", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            SleepingInterruptedByLight = CreateStatusItem("SleepingInterruptedByLight", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Eating = CreateStatusItem("Eating", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Eating.resolveStringCallback = resolveStringCallback;
            Digging  = CreateStatusItem("Digging", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Cleaning = CreateStatusItem("Cleaning", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Cleaning.resolveStringCallback = resolveStringCallback;
            PickingUp = CreateStatusItem("PickingUp", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            PickingUp.resolveStringCallback = resolveStringCallback;
            Mopping = CreateStatusItem("Mopping", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Cooking = CreateStatusItem("Cooking", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Cooking.resolveStringCallback = resolveStringCallback2;
            Mushing = CreateStatusItem("Mushing", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Mushing.resolveStringCallback = resolveStringCallback2;
            Researching = CreateStatusItem("Researching", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Researching.resolveStringCallback = delegate(string str, object data)
            {
                TechInstance activeResearch = Research.Instance.GetActiveResearch();
                if (activeResearch != null)
                {
                    return(str.Replace("{Tech}", activeResearch.tech.Name));
                }
                return(str);
            };
            Tinkering = CreateStatusItem("Tinkering", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Tinkering.resolveStringCallback = delegate(string str, object data)
            {
                Tinkerable tinkerable = (Tinkerable)data;
                if ((UnityEngine.Object)tinkerable != (UnityEngine.Object)null)
                {
                    return(string.Format(str, tinkerable.tinkerMaterialTag.ProperName()));
                }
                return(str);
            };
            Storing = CreateStatusItem("Storing", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Storing.resolveStringCallback = delegate(string str, object data)
            {
                Workable workable = (Workable)data;
                if ((UnityEngine.Object)workable != (UnityEngine.Object)null && (UnityEngine.Object)workable.worker != (UnityEngine.Object)null)
                {
                    KSelectable component = workable.GetComponent <KSelectable>();
                    if ((bool)component)
                    {
                        str = str.Replace("{Target}", component.GetName());
                    }
                    Pickupable pickupable = workable.worker.workCompleteData as Pickupable;
                    if ((UnityEngine.Object)workable.worker != (UnityEngine.Object)null && (bool)pickupable)
                    {
                        KSelectable component2 = pickupable.GetComponent <KSelectable>();
                        if ((bool)component2)
                        {
                            str = str.Replace("{Item}", component2.GetName());
                        }
                    }
                }
                return(str);
            };
            Building = CreateStatusItem("Building", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Building.resolveStringCallback = resolveStringCallback;
            Equipping = CreateStatusItem("Equipping", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Equipping.resolveStringCallback = resolveStringCallback;
            WarmingUp = CreateStatusItem("WarmingUp", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            WarmingUp.resolveStringCallback = resolveStringCallback;
            GeneratingPower = CreateStatusItem("GeneratingPower", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            GeneratingPower.resolveStringCallback = resolveStringCallback;
            Harvesting = CreateStatusItem("Harvesting", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Harvesting.resolveStringCallback = resolveStringCallback;
            Uprooting = CreateStatusItem("Uprooting", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Uprooting.resolveStringCallback = resolveStringCallback;
            Emptying = CreateStatusItem("Emptying", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Emptying.resolveStringCallback = resolveStringCallback;
            Toggling = CreateStatusItem("Toggling", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Toggling.resolveStringCallback = resolveStringCallback;
            Deconstructing = CreateStatusItem("Deconstructing", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Deconstructing.resolveStringCallback = resolveStringCallback;
            Disinfecting = CreateStatusItem("Disinfecting", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Disinfecting.resolveStringCallback = resolveStringCallback;
            Upgrading = CreateStatusItem("Upgrading", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Upgrading.resolveStringCallback = resolveStringCallback;
            Fabricating = CreateStatusItem("Fabricating", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Fabricating.resolveStringCallback = resolveStringCallback2;
            Processing = CreateStatusItem("Processing", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Processing.resolveStringCallback = resolveStringCallback2;
            Clearing = CreateStatusItem("Clearing", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Clearing.resolveStringCallback = resolveStringCallback;
            GeneratingPower = CreateStatusItem("GeneratingPower", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            GeneratingPower.resolveStringCallback = resolveStringCallback;
            Cold = CreateStatusItem("Cold", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Cold.resolveTooltipCallback = delegate(string str, object data)
            {
                str = str.Replace("{StressModification}", GameUtil.GetFormattedPercent(Db.Get().effects.Get("ColdAir").SelfModifiers[0].Value, GameUtil.TimeSlice.PerCycle));
                float dtu_s2 = ((ExternalTemperatureMonitor.Instance)data).temperatureTransferer.average_kilowatts_exchanged.GetWeightedAverage * 1000f;
                str = str.Replace("{currentTransferWattage}", GameUtil.GetFormattedHeatEnergyRate(dtu_s2, GameUtil.HeatEnergyFormatterUnit.Automatic));
                AttributeInstance attributeInstance3 = ((ExternalTemperatureMonitor.Instance)data).attributes.Get("ThermalConductivityBarrier");
                string            text3 = "<b>" + attributeInstance3.GetFormattedValue() + "</b>";
                for (int j = 0; j != attributeInstance3.Modifiers.Count; j++)
                {
                    AttributeModifier attributeModifier2 = attributeInstance3.Modifiers[j];
                    text3 += "\n";
                    string text4 = text3;
                    text3 = text4 + "    • " + attributeModifier2.GetDescription() + " <b>" + attributeModifier2.GetFormattedString(attributeInstance3.gameObject) + "</b>";
                }
                str = str.Replace("{conductivityBarrier}", text3);
                return(str);
            };
            Hot = CreateStatusItem("Hot", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            Hot.resolveTooltipCallback = delegate(string str, object data)
            {
                str = str.Replace("{StressModification}", GameUtil.GetFormattedPercent(Db.Get().effects.Get("WarmAir").SelfModifiers[0].Value, GameUtil.TimeSlice.PerCycle));
                float dtu_s = ((ExternalTemperatureMonitor.Instance)data).temperatureTransferer.average_kilowatts_exchanged.GetWeightedAverage * 1000f;
                str = str.Replace("{currentTransferWattage}", GameUtil.GetFormattedHeatEnergyRate(dtu_s, GameUtil.HeatEnergyFormatterUnit.Automatic));
                AttributeInstance attributeInstance2 = ((ExternalTemperatureMonitor.Instance)data).attributes.Get("ThermalConductivityBarrier");
                string            text = "<b>" + attributeInstance2.GetFormattedValue() + "</b>";
                for (int i = 0; i != attributeInstance2.Modifiers.Count; i++)
                {
                    AttributeModifier attributeModifier = attributeInstance2.Modifiers[i];
                    text += "\n";
                    string text2 = text;
                    text = text2 + "    • " + attributeModifier.GetDescription() + " <b>" + attributeModifier.GetFormattedString(attributeInstance2.gameObject) + "</b>";
                }
                str = str.Replace("{conductivityBarrier}", text);
                return(str);
            };
            BodyRegulatingHeating = CreateStatusItem("BodyRegulatingHeating", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            BodyRegulatingHeating.resolveStringCallback = delegate(string str, object data)
            {
                WarmBlooded.StatesInstance statesInstance = (WarmBlooded.StatesInstance)data;
                return(str.Replace("{TempDelta}", GameUtil.GetFormattedTemperature(statesInstance.TemperatureDelta, GameUtil.TimeSlice.PerSecond, GameUtil.TemperatureInterpretation.Relative, true, false)));
            };
            BodyRegulatingCooling = CreateStatusItem("BodyRegulatingCooling", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            BodyRegulatingCooling.resolveStringCallback = BodyRegulatingHeating.resolveStringCallback;
            EntombedChore = CreateStatusItem("EntombedChore", "DUPLICANTS", "status_item_entombed", StatusItem.IconType.Custom, NotificationType.DuplicantThreatening, false, OverlayModes.None.ID, true, 2);
            EntombedChore.AddNotification(null, null, null, 0f);
            EarlyMorning                 = CreateStatusItem("EarlyMorning", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            NightTime                    = CreateStatusItem("NightTime", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            PoorDecor                    = CreateStatusItem("PoorDecor", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            PoorQualityOfLife            = CreateStatusItem("PoorQualityOfLife", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            PoorFoodQuality              = CreateStatusItem("PoorFoodQuality", DUPLICANTS.STATUSITEMS.POOR_FOOD_QUALITY.NAME, DUPLICANTS.STATUSITEMS.POOR_FOOD_QUALITY.TOOLTIP, string.Empty, StatusItem.IconType.Exclamation, NotificationType.Neutral, false, OverlayModes.None.ID, 2);
            GoodFoodQuality              = CreateStatusItem("GoodFoodQuality", DUPLICANTS.STATUSITEMS.GOOD_FOOD_QUALITY.NAME, DUPLICANTS.STATUSITEMS.GOOD_FOOD_QUALITY.TOOLTIP, string.Empty, StatusItem.IconType.Exclamation, NotificationType.Neutral, false, OverlayModes.None.ID, 2);
            Arting                       = CreateStatusItem("Arting", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Arting.resolveStringCallback = resolveStringCallback;
            SevereWounds                 = CreateStatusItem("SevereWounds", "DUPLICANTS", "status_item_broken", StatusItem.IconType.Custom, NotificationType.Bad, false, OverlayModes.None.ID, true, 2);
            SevereWounds.AddNotification(null, null, null, 0f);
            Incapacitated = CreateStatusItem("Incapacitated", "DUPLICANTS", "status_item_broken", StatusItem.IconType.Custom, NotificationType.DuplicantThreatening, false, OverlayModes.None.ID, true, 2);
            Incapacitated.AddNotification(null, null, null, 0f);
            Incapacitated.resolveStringCallback = delegate(string str, object data)
            {
                IncapacitationMonitor.Instance instance = (IncapacitationMonitor.Instance)data;
                float bleedLifeTime = instance.GetBleedLifeTime(instance);
                str = str.Replace("{CauseOfIncapacitation}", instance.GetCauseOfIncapacitation().Name);
                return(str.Replace("{TimeUntilDeath}", GameUtil.GetFormattedTime(bleedLifeTime)));
            };
            Relocating = CreateStatusItem("Relocating", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Relocating.resolveStringCallback = resolveStringCallback;
            Fighting = CreateStatusItem("Fighting", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Bad, false, OverlayModes.None.ID, true, 2);
            Fighting.AddNotification(null, null, null, 0f);
            Fleeing = CreateStatusItem("Fleeing", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Bad, false, OverlayModes.None.ID, true, 2);
            Fleeing.AddNotification(null, null, null, 0f);
            Stressed = CreateStatusItem("Stressed", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Stressed.AddNotification(null, null, null, 0f);
            LashingOut = CreateStatusItem("LashingOut", "DUPLICANTS", string.Empty, StatusItem.IconType.Exclamation, NotificationType.Bad, false, OverlayModes.None.ID, true, 2);
            LashingOut.AddNotification(null, null, null, 0f);
            LowImmunity = CreateStatusItem("LowImmunity", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.BadMinor, false, OverlayModes.None.ID, true, 2);
            LowImmunity.AddNotification(null, null, null, 0f);
            Studying         = CreateStatusItem("Studying", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, false, OverlayModes.None.ID, true, 2);
            Socializing      = CreateStatusItem("Socializing", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Good, false, OverlayModes.None.ID, true, 2);
            Dancing          = CreateStatusItem("Dancing", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Good, false, OverlayModes.None.ID, true, 2);
            Gaming           = CreateStatusItem("Gaming", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Good, false, OverlayModes.None.ID, true, 2);
            Mingling         = CreateStatusItem("Mingling", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Good, false, OverlayModes.None.ID, true, 2);
            ContactWithGerms = CreateStatusItem("ContactWithGerms", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, true, OverlayModes.Disease.ID, true, 2);
            ContactWithGerms.resolveStringCallback = delegate(string str, object data)
            {
                GermExposureMonitor.ExposureStatusData exposureStatusData4 = (GermExposureMonitor.ExposureStatusData)data;
                string name2 = Db.Get().Sicknesses.Get(exposureStatusData4.exposure_type.sickness_id).Name;
                str = str.Replace("{Sickness}", name2);
                return(str);
            };
            ContactWithGerms.statusItemClickCallback = delegate(object data)
            {
                GermExposureMonitor.ExposureStatusData exposureStatusData3 = (GermExposureMonitor.ExposureStatusData)data;
                Vector3 lastExposurePosition2 = exposureStatusData3.owner.GetLastExposurePosition(exposureStatusData3.exposure_type.germ_id);
                CameraController.Instance.CameraGoTo(lastExposurePosition2, 2f, true);
                if (OverlayScreen.Instance.mode == OverlayModes.None.ID)
                {
                    OverlayScreen.Instance.ToggleOverlay(OverlayModes.Disease.ID, true);
                }
            };
            ExposedToGerms = CreateStatusItem("ExposedToGerms", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Neutral, true, OverlayModes.Disease.ID, true, 2);
            ExposedToGerms.resolveStringCallback = delegate(string str, object data)
            {
                GermExposureMonitor.ExposureStatusData exposureStatusData2 = (GermExposureMonitor.ExposureStatusData)data;
                string                       name = Db.Get().Sicknesses.Get(exposureStatusData2.exposure_type.sickness_id).Name;
                AttributeInstance            attributeInstance = Db.Get().Attributes.GermResistance.Lookup(exposureStatusData2.owner.gameObject);
                string                       lastDiseaseSource = exposureStatusData2.owner.GetLastDiseaseSource(exposureStatusData2.exposure_type.germ_id);
                GermExposureMonitor.Instance sMI = exposureStatusData2.owner.GetSMI <GermExposureMonitor.Instance>();
                float num        = (float)exposureStatusData2.exposure_type.base_resistance + GERM_EXPOSURE.EXPOSURE_TIER_RESISTANCE_BONUSES[0];
                float totalValue = attributeInstance.GetTotalValue();
                float resistanceToExposureType = sMI.GetResistanceToExposureType(exposureStatusData2.exposure_type, -1f);
                float contractionChance        = GermExposureMonitor.GetContractionChance(resistanceToExposureType);
                float exposureTier             = sMI.GetExposureTier(exposureStatusData2.exposure_type.germ_id);
                float num2 = GERM_EXPOSURE.EXPOSURE_TIER_RESISTANCE_BONUSES[(int)exposureTier - 1] - GERM_EXPOSURE.EXPOSURE_TIER_RESISTANCE_BONUSES[0];
                str = str.Replace("{Severity}", DUPLICANTS.STATUSITEMS.EXPOSEDTOGERMS.EXPOSURE_TIERS[(int)exposureTier - 1]);
                str = str.Replace("{Sickness}", name);
                str = str.Replace("{Source}", lastDiseaseSource);
                str = str.Replace("{Base}", GameUtil.GetFormattedSimple(num, GameUtil.TimeSlice.None, null));
                str = str.Replace("{Dupe}", GameUtil.GetFormattedSimple(totalValue, GameUtil.TimeSlice.None, null));
                str = str.Replace("{Total}", GameUtil.GetFormattedSimple(resistanceToExposureType, GameUtil.TimeSlice.None, null));
                str = str.Replace("{ExposureLevelBonus}", GameUtil.GetFormattedSimple(num2, GameUtil.TimeSlice.None, null));
                str = str.Replace("{Chance}", GameUtil.GetFormattedPercent(contractionChance * 100f, GameUtil.TimeSlice.None));
                return(str);
            };
            ExposedToGerms.statusItemClickCallback = delegate(object data)
            {
                GermExposureMonitor.ExposureStatusData exposureStatusData = (GermExposureMonitor.ExposureStatusData)data;
                Vector3 lastExposurePosition = exposureStatusData.owner.GetLastExposurePosition(exposureStatusData.exposure_type.germ_id);
                CameraController.Instance.CameraGoTo(lastExposurePosition, 2f, true);
                if (OverlayScreen.Instance.mode == OverlayModes.None.ID)
                {
                    OverlayScreen.Instance.ToggleOverlay(OverlayModes.Disease.ID, true);
                }
            };
            LightWorkEfficiencyBonus = CreateStatusItem("LightWorkEfficiencyBonus", "DUPLICANTS", string.Empty, StatusItem.IconType.Info, NotificationType.Good, false, OverlayModes.None.ID, true, 2);
        }