The BepInEx console will not appear when launching like it does for other games on Thunderstore (you can turn it back on in your BepInEx.cfg file). If your PEAK crashes on startup, add -dx12 to your launch parameters.
Decompiled source of ItemInfoDisplay v1.0.8
plugins/com.github.jkqt.ItemInfoDisplay.dll
Decompiled 2 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Peak.Afflictions; using TMPro; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.github.jkqt.ItemInfoDisplay")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.8.0")] [assembly: AssemblyInformationalVersion("1.0.8+4b667db108426f0f9371d54faa286639f816977f")] [assembly: AssemblyProduct("com.github.jkqt.ItemInfoDisplay")] [assembly: AssemblyTitle("ItemInfoDisplay")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.8.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace ItemInfoDisplay { [BepInPlugin("com.github.jkqt.ItemInfoDisplay", "ItemInfoDisplay", "1.0.8")] public class Plugin : BaseUnityPlugin { private static class ItemInfoDisplayUpdatePatch { [HarmonyPatch(typeof(CharacterItems), "Update")] [HarmonyPostfix] private static void ItemInfoDisplayUpdate(CharacterItems __instance) { try { if ((Object)(object)guiManager == (Object)null) { AddDisplayObject(); } else if ((Object)(object)Character.observedCharacter.data.currentItem != (Object)null) { if (hasChanged) { hasChanged = false; ProcessItemGameObject(); } else if (Mathf.Abs(Character.observedCharacter.data.sinceItemAttach - lastKnownSinceItemAttach) >= configForceUpdateTime.Value) { hasChanged = true; lastKnownSinceItemAttach = Character.observedCharacter.data.sinceItemAttach; } if (!((Component)itemInfoDisplayTextMesh).gameObject.activeSelf) { ((Component)itemInfoDisplayTextMesh).gameObject.SetActive(true); } } else if (((Component)itemInfoDisplayTextMesh).gameObject.activeSelf) { ((Component)itemInfoDisplayTextMesh).gameObject.SetActive(false); } } catch (Exception ex) { Log.LogError((object)(ex.Message + ex.StackTrace)); } } } private static class ItemInfoDisplayEquipPatch { [HarmonyPatch(typeof(CharacterItems), "Equip")] [HarmonyPostfix] private static void ItemInfoDisplayEquip(CharacterItems __instance) { try { if (Character.observedCharacter == __instance.character) { hasChanged = true; } } catch (Exception ex) { Log.LogError((object)(ex.Message + ex.StackTrace)); } } } private static class ItemInfoDisplayFinishCookingPatch { [HarmonyPatch(typeof(ItemCooking), "FinishCooking")] [HarmonyPostfix] private static void ItemInfoDisplayFinishCooking(ItemCooking __instance) { try { if (Character.observedCharacter == ((ItemComponent)__instance).item.holderCharacter) { hasChanged = true; } } catch (Exception ex) { Log.LogError((object)(ex.Message + ex.StackTrace)); } } } private static class ItemInfoDisplayReduceUsesRPCPatch { [HarmonyPatch(typeof(Action_ReduceUses), "ReduceUsesRPC")] [HarmonyPostfix] private static void ItemInfoDisplayReduceUsesRPC(Action_ReduceUses __instance) { try { if (Character.observedCharacter == ((ItemActionBase)__instance).character) { hasChanged = true; } } catch (Exception ex) { Log.LogError((object)(ex.Message + ex.StackTrace)); } } } private static GUIManager guiManager; private static TextMeshProUGUI itemInfoDisplayTextMesh; private static Dictionary<string, string> effectColors = new Dictionary<string, string>(); private static float lastKnownSinceItemAttach; private static bool hasChanged; private static ConfigEntry<float> configFontSize; private static ConfigEntry<float> configOutlineWidth; private static ConfigEntry<float> configLineSpacing; private static ConfigEntry<float> configSizeDeltaX; private static ConfigEntry<float> configForceUpdateTime; public const string Id = "com.github.jkqt.ItemInfoDisplay"; internal static ManualLogSource Log { get; private set; } = null; public static string Name => "ItemInfoDisplay"; public static string Version => "1.0.8"; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; InitEffectColors(effectColors); lastKnownSinceItemAttach = 0f; hasChanged = true; configFontSize = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Font Size", 20f, "Customize the Font Size for description text."); configOutlineWidth = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Outline Width", 0.08f, "Customize the Outline Width for item description text."); configLineSpacing = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Line Spacing", -35f, "Customize the Line Spacing for item description text."); configSizeDeltaX = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Size Delta X", 550f, "Customize the horizontal length of the container for the mod. Increasing moves text left, decreasing moves text right."); configForceUpdateTime = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Force Update Time", 1f, "Customize the time in seconds until the mod forces an update for the item."); Harmony.CreateAndPatchAll(typeof(ItemInfoDisplayUpdatePatch), (string)null); Harmony.CreateAndPatchAll(typeof(ItemInfoDisplayEquipPatch), (string)null); Harmony.CreateAndPatchAll(typeof(ItemInfoDisplayFinishCookingPatch), (string)null); Harmony.CreateAndPatchAll(typeof(ItemInfoDisplayReduceUsesRPCPatch), (string)null); Log.LogInfo((object)("Plugin " + Name + " is loaded!")); } private static void ProcessItemGameObject() { //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Expected O, but got Unknown //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Expected O, but got Unknown //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Expected O, but got Unknown //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Expected O, but got Unknown //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Expected O, but got Unknown //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Expected O, but got Unknown //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Expected O, but got Unknown //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Expected O, but got Unknown //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Expected O, but got Unknown //IL_0687: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Expected O, but got Unknown //IL_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: Expected O, but got Unknown //IL_0758: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Expected O, but got Unknown //IL_0909: Unknown result type (might be due to invalid IL or missing references) //IL_0910: Expected O, but got Unknown //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Unknown result type (might be due to invalid IL or missing references) //IL_0b0c: Unknown result type (might be due to invalid IL or missing references) //IL_0b13: Expected O, but got Unknown //IL_0bd6: Unknown result type (might be due to invalid IL or missing references) //IL_0bdd: Expected O, but got Unknown //IL_0d27: Unknown result type (might be due to invalid IL or missing references) //IL_0d2e: Expected O, but got Unknown //IL_0dfd: Unknown result type (might be due to invalid IL or missing references) //IL_0e04: Expected O, but got Unknown //IL_0e82: Unknown result type (might be due to invalid IL or missing references) //IL_0e89: Expected O, but got Unknown //IL_0ef8: Unknown result type (might be due to invalid IL or missing references) //IL_0eff: Expected O, but got Unknown //IL_12c5: Unknown result type (might be due to invalid IL or missing references) //IL_12cc: Expected O, but got Unknown //IL_14e7: Unknown result type (might be due to invalid IL or missing references) //IL_14ee: Expected O, but got Unknown //IL_166c: Unknown result type (might be due to invalid IL or missing references) //IL_1673: Expected O, but got Unknown //IL_1789: Unknown result type (might be due to invalid IL or missing references) //IL_1790: Expected O, but got Unknown //IL_1844: Unknown result type (might be due to invalid IL or missing references) //IL_184b: Expected O, but got Unknown //IL_1aa9: Unknown result type (might be due to invalid IL or missing references) //IL_1ab0: Expected O, but got Unknown //IL_1b90: Unknown result type (might be due to invalid IL or missing references) //IL_1b97: Expected O, but got Unknown //IL_1c96: Unknown result type (might be due to invalid IL or missing references) //IL_1c9d: Expected O, but got Unknown Item currentItem = Character.observedCharacter.data.currentItem; GameObject gameObject = ((Component)currentItem).gameObject; Component[] components = gameObject.GetComponents(typeof(Component)); bool flag = false; string text = ""; string text2 = ""; string text3 = ""; string text4 = ""; string text5 = ""; ((TMP_Text)itemInfoDisplayTextMesh).text = ""; text2 = ((Ascents.itemWeightModifier <= 0) ? (text2 + effectColors["Weight"] + ((float)currentItem.carryWeight * 2.5f).ToString("F1").Replace(".0", "") + " WEIGHT</color>") : (text2 + effectColors["Weight"] + ((float)(currentItem.carryWeight + Ascents.itemWeightModifier) * 2.5f).ToString("F1").Replace(".0", "") + " WEIGHT</color>")); if (((Object)gameObject).name.Equals("Bugle(Clone)")) { TextMeshProUGUI obj = itemInfoDisplayTextMesh; ((TMP_Text)obj).text = ((TMP_Text)obj).text + "MAKE SOME NOISE\n"; } else if (((Object)gameObject).name.Equals("Pirate Compass(Clone)")) { TextMeshProUGUI obj2 = itemInfoDisplayTextMesh; ((TMP_Text)obj2).text = ((TMP_Text)obj2).text + effectColors["Injury"] + "POINTS</color> TO THE NEAREST LUGGAGE\n"; } else if (((Object)gameObject).name.Equals("Compass(Clone)")) { TextMeshProUGUI obj3 = itemInfoDisplayTextMesh; ((TMP_Text)obj3).text = ((TMP_Text)obj3).text + effectColors["Injury"] + "POINTS</color> NORTH TO THE PEAK\n"; } else if (((Object)gameObject).name.Equals("Shell Big(Clone)")) { TextMeshProUGUI obj4 = itemInfoDisplayTextMesh; ((TMP_Text)obj4).text = ((TMP_Text)obj4).text + "TRY " + effectColors["Hunger"] + "THROWING</color> AT A COCONUT\n"; } TextMeshProUGUI val10; for (int i = 0; i < components.Length; i++) { if (((object)components[i]).GetType() == typeof(ItemUseFeedback)) { ItemUseFeedback val = (ItemUseFeedback)components[i]; if (val.useAnimation.Equals("Eat") || val.useAnimation.Equals("Drink") || val.useAnimation.Equals("Heal")) { flag = true; } } else if (((object)components[i]).GetType() == typeof(Action_Consume)) { flag = true; } else if (((object)components[i]).GetType() == typeof(Action_RestoreHunger)) { Action_RestoreHunger val2 = (Action_RestoreHunger)components[i]; text += ProcessEffect(val2.restorationAmount * -1f, "Hunger"); } else if (((object)components[i]).GetType() == typeof(Action_GiveExtraStamina)) { Action_GiveExtraStamina val3 = (Action_GiveExtraStamina)components[i]; text += ProcessEffect(val3.amount, "Extra Stamina"); } else if (((object)components[i]).GetType() == typeof(Action_InflictPoison)) { Action_InflictPoison val4 = (Action_InflictPoison)components[i]; text = text + "AFTER " + val4.delay + "s, " + ProcessEffectOverTime(val4.poisonPerSecond, 1f, val4.inflictionTime, "Poison"); } else if (((object)components[i]).GetType() == typeof(Action_AddOrRemoveThorns)) { Action_AddOrRemoveThorns val5 = (Action_AddOrRemoveThorns)components[i]; text += ProcessEffect((float)val5.thornCount * 0.05f, "Thorns"); } else if (((object)components[i]).GetType() == typeof(Action_ModifyStatus)) { Action_ModifyStatus val6 = (Action_ModifyStatus)components[i]; text += ProcessEffect(val6.changeAmount, ((object)(STATUSTYPE)(ref val6.statusType)).ToString()); } else if (((object)components[i]).GetType() == typeof(Action_ApplyMassAffliction)) { Action_ApplyMassAffliction val7 = (Action_ApplyMassAffliction)components[i]; text5 += "<#CCCCCC>NEARBY PLAYERS WILL RECEIVE:</color>\n"; text5 += ProcessAffliction(((Action_ApplyAffliction)val7).affliction); if (((Action_ApplyAffliction)val7).extraAfflictions.Length == 0) { continue; } for (int j = 0; j < ((Action_ApplyAffliction)val7).extraAfflictions.Length; j++) { if (text5.EndsWith('\n')) { text5 = text5.Remove(text5.Length - 1); } text5 = text5 + ",\n" + ProcessAffliction(((Action_ApplyAffliction)val7).extraAfflictions[j]); } } else if (((object)components[i]).GetType() == typeof(Action_ApplyAffliction)) { Action_ApplyAffliction val8 = (Action_ApplyAffliction)components[i]; text5 += ProcessAffliction(val8.affliction); } else if (((object)components[i]).GetType() == typeof(Action_ClearAllStatus)) { Action_ClearAllStatus val9 = (Action_ClearAllStatus)components[i]; TextMeshProUGUI obj5 = itemInfoDisplayTextMesh; ((TMP_Text)obj5).text = ((TMP_Text)obj5).text + effectColors["ItemInfoDisplayPositive"] + "CLEAR ALL STATUS</color>"; if (val9.excludeCurse) { TextMeshProUGUI obj6 = itemInfoDisplayTextMesh; ((TMP_Text)obj6).text = ((TMP_Text)obj6).text + " EXCEPT " + effectColors["Curse"] + "CURSE</color>"; } if (val9.otherExclusions.Count > 0) { foreach (STATUSTYPE otherExclusion in val9.otherExclusions) { STATUSTYPE current = otherExclusion; val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + ", " + effectColors[((object)(STATUSTYPE)(ref current)).ToString()] + ((object)(STATUSTYPE)(ref current)).ToString().ToUpper() + "</color>"; } } ((TMP_Text)itemInfoDisplayTextMesh).text = ((TMP_Text)itemInfoDisplayTextMesh).text.Replace(", <#E13542>CRAB</color>", "") + "\n"; } else if (((object)components[i]).GetType() == typeof(Action_ConsumeAndSpawn)) { Action_ConsumeAndSpawn val11 = (Action_ConsumeAndSpawn)components[i]; if (((object)val11.itemToSpawn).ToString().Contains("Peel")) { TextMeshProUGUI obj7 = itemInfoDisplayTextMesh; ((TMP_Text)obj7).text = ((TMP_Text)obj7).text + "<#CCCCCC>GAIN A PEEL WHEN EATEN</color>\n"; } } else if (((object)components[i]).GetType() == typeof(Action_ReduceUses)) { OptionableIntItemData val12 = (OptionableIntItemData)currentItem.data.data[(DataEntryKey)2]; if (val12.HasData && val12.Value > 1) { text3 = text3 + " " + val12.Value + " USES"; } } else if (((object)components[i]).GetType() == typeof(Lantern)) { Lantern val13 = (Lantern)components[i]; if (((Object)gameObject).name.Equals("Torch(Clone)")) { TextMeshProUGUI obj8 = itemInfoDisplayTextMesh; ((TMP_Text)obj8).text = ((TMP_Text)obj8).text + "CAN BE LIT\n"; } else { text5 += "<#CCCCCC>WHEN LIT, NEARBY PLAYERS RECEIVE:</color>\n"; } if (((Object)gameObject).name.Equals("Lantern_Faerie(Clone)")) { StatusField component = ((Component)gameObject.transform.Find("FaerieLantern/Light/Heat")).GetComponent<StatusField>(); text5 += ProcessEffectOverTime(component.statusAmountPerSecond, 1f, val13.startingFuel, ((object)(STATUSTYPE)(ref component.statusType)).ToString()); foreach (StatusFieldStatus additionalStatus in component.additionalStatuses) { if (text5.EndsWith('\n')) { text5 = text5.Remove(text5.Length - 1); } text5 = text5 + ",\n" + ProcessEffectOverTime(additionalStatus.statusAmountPerSecond, 1f, val13.startingFuel, ((object)(STATUSTYPE)(ref additionalStatus.statusType)).ToString()); } } else if (((Object)gameObject).name.Equals("Lantern(Clone)")) { StatusField component2 = ((Component)gameObject.transform.Find("GasLantern/Light/Heat")).GetComponent<StatusField>(); text5 += ProcessEffectOverTime(component2.statusAmountPerSecond, 1f, val13.startingFuel, ((object)(STATUSTYPE)(ref component2.statusType)).ToString()); } } else if (((object)components[i]).GetType() == typeof(Action_RaycastDart)) { Action_RaycastDart val14 = (Action_RaycastDart)components[i]; flag = true; text5 += "<#CCCCCC>SHOOT A DART THAT WILL APPLY:</color>\n"; for (int k = 0; k < val14.afflictionsOnHit.Length; k++) { text5 += ProcessAffliction(val14.afflictionsOnHit[k]); if (text5.EndsWith('\n')) { text5 = text5.Remove(text5.Length - 1); } text5 += ",\n"; } if (text5.EndsWith('\n')) { text5 = text5.Remove(text5.Length - 2); } text5 += "\n"; } else if (((object)components[i]).GetType() == typeof(MagicBugle)) { TextMeshProUGUI obj9 = itemInfoDisplayTextMesh; ((TMP_Text)obj9).text = ((TMP_Text)obj9).text + "WHILE PLAYING THE BUGLE,"; } else if (((object)components[i]).GetType() == typeof(ClimbingSpikeComponent)) { TextMeshProUGUI obj10 = itemInfoDisplayTextMesh; ((TMP_Text)obj10).text = ((TMP_Text)obj10).text + "PLACE A PITON YOU CAN GRAB\nTO " + effectColors["Extra Stamina"] + "REGENERATE STAMINA</color>\n"; } else if (((object)components[i]).GetType() == typeof(Action_Flare)) { TextMeshProUGUI obj11 = itemInfoDisplayTextMesh; ((TMP_Text)obj11).text = ((TMP_Text)obj11).text + "CAN BE LIT\n"; } else if (((object)components[i]).GetType() == typeof(Backpack)) { TextMeshProUGUI obj12 = itemInfoDisplayTextMesh; ((TMP_Text)obj12).text = ((TMP_Text)obj12).text + "DROP TO PLACE ITEMS INSIDE\n"; } else if (((object)components[i]).GetType() == typeof(BananaPeel)) { TextMeshProUGUI obj13 = itemInfoDisplayTextMesh; ((TMP_Text)obj13).text = ((TMP_Text)obj13).text + effectColors["Hunger"] + "SLIP</color> WHEN STEPPED ON\n"; } else if (((object)components[i]).GetType() == typeof(Constructable)) { Constructable val15 = (Constructable)components[i]; if (((Object)val15.constructedPrefab).name.Equals("PortableStovetop_Placed")) { val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + "PLACE A " + effectColors["Injury"] + "COOKING</color> STOVE FOR " + val15.constructedPrefab.GetComponent<Campfire>().burnsFor + "s\n"; } else { TextMeshProUGUI obj14 = itemInfoDisplayTextMesh; ((TMP_Text)obj14).text = ((TMP_Text)obj14).text + "CAN BE PLACED\n"; } } else if (((object)components[i]).GetType() == typeof(RopeSpool)) { RopeSpool val16 = (RopeSpool)components[i]; if (val16.isAntiRope) { TextMeshProUGUI obj15 = itemInfoDisplayTextMesh; ((TMP_Text)obj15).text = ((TMP_Text)obj15).text + "PLACE A ROPE THAT FLOATS UP\n"; } else { TextMeshProUGUI obj16 = itemInfoDisplayTextMesh; ((TMP_Text)obj16).text = ((TMP_Text)obj16).text + "PLACE A ROPE\n"; } val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + "FROM " + (val16.minSegments / 4f).ToString("F2").Replace(".0", "") + "m LONG, UP TO " + ((float)Rope.MaxSegments / 4f).ToString("F1").Replace(".0", "") + "m LONG\n"; if (configForceUpdateTime.Value <= 1f) { text3 = text3 + " " + (val16.RopeFuel / 4f).ToString("F2").Replace(".00", "") + "m LEFT"; } } else if (((object)components[i]).GetType() == typeof(RopeShooter)) { RopeShooter val17 = (RopeShooter)components[i]; TextMeshProUGUI obj17 = itemInfoDisplayTextMesh; ((TMP_Text)obj17).text = ((TMP_Text)obj17).text + "SHOOT A ROPE ANCHOR WHICH PLACES\nA ROPE THAT "; if (((Object)val17.ropeAnchorWithRopePref).name.Equals("RopeAnchorForRopeShooterAnti")) { TextMeshProUGUI obj18 = itemInfoDisplayTextMesh; ((TMP_Text)obj18).text = ((TMP_Text)obj18).text + "FLOATS UP "; } else { TextMeshProUGUI obj19 = itemInfoDisplayTextMesh; ((TMP_Text)obj19).text = ((TMP_Text)obj19).text + "DROPS DOWN "; } TextMeshProUGUI obj20 = itemInfoDisplayTextMesh; ((TMP_Text)obj20).text = ((TMP_Text)obj20).text + (val17.maxLength / 4f).ToString("F1").Replace(".0", "") + "m\n"; } else if (((object)components[i]).GetType() == typeof(Antigrav)) { Antigrav val18 = (Antigrav)components[i]; if (val18.intensity != 0f) { text5 = text5 + effectColors["Injury"] + "WARNING:</color> <#CCCCCC>FLIES AWAY IF DROPPED</color>\n"; } } else if (((object)components[i]).GetType() == typeof(Action_Balloon)) { text5 += "CAN ATTACH TO CHARACTER\n"; } else if (((object)components[i]).GetType() == typeof(VineShooter)) { VineShooter val19 = (VineShooter)components[i]; TextMeshProUGUI obj21 = itemInfoDisplayTextMesh; ((TMP_Text)obj21).text = ((TMP_Text)obj21).text + "SHOOT A CHAIN THAT CONNECTS FROM\nYOUR POSITION TO WHERE YOU SHOOT\nUP TO " + (val19.maxLength / 1.6666666f).ToString("F1").Replace(".0", "") + "m AWAY\n"; } else if (((object)components[i]).GetType() == typeof(ShelfShroom)) { ShelfShroom val20 = (ShelfShroom)components[i]; if (((Object)val20.instantiateOnBreak).name.Equals("HealingPuffShroomSpawn")) { GameObject gameObject2 = ((Component)val20.instantiateOnBreak.transform.Find("VFX_SporeHealingExplo")).gameObject; AOE component3 = gameObject2.GetComponent<AOE>(); GameObject gameObject3 = ((Component)gameObject2.transform.Find("VFX_SporePoisonExplo")).gameObject; AOE component4 = gameObject3.GetComponent<AOE>(); AOE[] components2 = gameObject3.GetComponents<AOE>(); TimeEvent component5 = gameObject3.GetComponent<TimeEvent>(); RemoveAfterSeconds component6 = gameObject3.GetComponent<RemoveAfterSeconds>(); TextMeshProUGUI obj22 = itemInfoDisplayTextMesh; ((TMP_Text)obj22).text = ((TMP_Text)obj22).text + effectColors["Hunger"] + "THROW</color> TO RELEASE GAS THAT WILL:\n"; TextMeshProUGUI obj23 = itemInfoDisplayTextMesh; ((TMP_Text)obj23).text = ((TMP_Text)obj23).text + ProcessEffect(Mathf.Round(component3.statusAmount * 0.9f * 40f) / 40f, ((object)(STATUSTYPE)(ref component3.statusType)).ToString()); TextMeshProUGUI obj24 = itemInfoDisplayTextMesh; ((TMP_Text)obj24).text = ((TMP_Text)obj24).text + ProcessEffectOverTime(Mathf.Round(component4.statusAmount * (1f / component5.rate) * 40f) / 40f, 1f, component6.seconds, ((object)(STATUSTYPE)(ref component4.statusType)).ToString()); if (components2.Length > 1) { TextMeshProUGUI obj25 = itemInfoDisplayTextMesh; ((TMP_Text)obj25).text = ((TMP_Text)obj25).text + ProcessEffectOverTime(Mathf.Round(components2[1].statusAmount * (1f / component5.rate) * 40f) / 40f, 1f, component6.seconds + 1f, ((object)(STATUSTYPE)(ref components2[1].statusType)).ToString()); } } else if (((Object)val20.instantiateOnBreak).name.Equals("ShelfShroomSpawn")) { TextMeshProUGUI obj26 = itemInfoDisplayTextMesh; ((TMP_Text)obj26).text = ((TMP_Text)obj26).text + effectColors["Hunger"] + "THROW</color> TO DEPLOY A PLATFORM\n"; } else if (((Object)val20.instantiateOnBreak).name.Equals("BounceShroomSpawn")) { TextMeshProUGUI obj27 = itemInfoDisplayTextMesh; ((TMP_Text)obj27).text = ((TMP_Text)obj27).text + effectColors["Hunger"] + "THROW</color> TO DEPLOY A BOUNCE PAD\n"; } } else if (((object)components[i]).GetType() == typeof(ScoutEffigy)) { TextMeshProUGUI obj28 = itemInfoDisplayTextMesh; ((TMP_Text)obj28).text = ((TMP_Text)obj28).text + effectColors["Extra Stamina"] + "REVIVE</color> A DEAD PLAYER\n"; } else if (((object)components[i]).GetType() == typeof(Action_Die)) { TextMeshProUGUI obj29 = itemInfoDisplayTextMesh; ((TMP_Text)obj29).text = ((TMP_Text)obj29).text + "YOU " + effectColors["Curse"] + "DIE</color> WHEN USED\n"; } else if (((object)components[i]).GetType() == typeof(Action_SpawnGuidebookPage)) { flag = true; TextMeshProUGUI obj30 = itemInfoDisplayTextMesh; ((TMP_Text)obj30).text = ((TMP_Text)obj30).text + "CAN BE OPENED\n"; } else if (((object)components[i]).GetType() == typeof(Action_Guidebook)) { TextMeshProUGUI obj31 = itemInfoDisplayTextMesh; ((TMP_Text)obj31).text = ((TMP_Text)obj31).text + "CAN BE READ\n"; } else if (((object)components[i]).GetType() == typeof(Action_CallScoutmaster)) { TextMeshProUGUI obj32 = itemInfoDisplayTextMesh; ((TMP_Text)obj32).text = ((TMP_Text)obj32).text + effectColors["Injury"] + "BREAKS RULE 0 WHEN USED</color>\n"; } else if (((object)components[i]).GetType() == typeof(Action_MoraleBoost)) { Action_MoraleBoost val21 = (Action_MoraleBoost)components[i]; if (val21.boostRadius < 0f) { val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + effectColors["ItemInfoDisplayPositive"] + "GAIN</color> " + effectColors["Extra Stamina"] + (val21.baselineStaminaBoost * 100f).ToString("F1").Replace(".0", "") + " EXTRA STAMINA</color>\n"; } else if (val21.boostRadius > 0f) { val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + "<#CCCCCC>NEARBY PLAYERS</color>" + effectColors["ItemInfoDisplayPositive"] + " GAIN</color> " + effectColors["Extra Stamina"] + (val21.baselineStaminaBoost * 100f).ToString("F1").Replace(".0", "") + " EXTRA STAMINA</color>\n"; } } else if (((object)components[i]).GetType() == typeof(Breakable)) { TextMeshProUGUI obj33 = itemInfoDisplayTextMesh; ((TMP_Text)obj33).text = ((TMP_Text)obj33).text + effectColors["Hunger"] + "THROW</color> TO CRACK OPEN\n"; } else if (((object)components[i]).GetType() == typeof(Bonkable)) { val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + effectColors["Hunger"] + "THROW</color> AT HEAD TO " + effectColors["Injury"] + "BONK</color>\n"; } else if (((object)components[i]).GetType() == typeof(MagicBean)) { MagicBean val22 = (MagicBean)components[i]; val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + effectColors["Hunger"] + "THROW</color> TO PLANT A VINE THAT GROWS\nPERPENDICULAR TO TERRAIN UP TO\n" + (val22.plantPrefab.maxLength / 2f).ToString("F1").Replace(".0", "") + "m OR UNTIL IT HITS SOMETHING\n"; } else if (((object)components[i]).GetType() == typeof(BingBong)) { TextMeshProUGUI obj34 = itemInfoDisplayTextMesh; ((TMP_Text)obj34).text = ((TMP_Text)obj34).text + "MASCOT OF BINGBONG AIRWAYS\n"; } else if (((object)components[i]).GetType() == typeof(Action_Passport)) { TextMeshProUGUI obj35 = itemInfoDisplayTextMesh; ((TMP_Text)obj35).text = ((TMP_Text)obj35).text + "OPEN TO CUSTOMIZE CHARACTER\n"; } else if (((object)components[i]).GetType() == typeof(Actions_Binoculars)) { TextMeshProUGUI obj36 = itemInfoDisplayTextMesh; ((TMP_Text)obj36).text = ((TMP_Text)obj36).text + "USE TO LOOK FURTHER\n"; } else if (((object)components[i]).GetType() == typeof(Action_WarpToRandomPlayer)) { TextMeshProUGUI obj37 = itemInfoDisplayTextMesh; ((TMP_Text)obj37).text = ((TMP_Text)obj37).text + "WARP TO RANDOM PLAYER\n"; } else if (((object)components[i]).GetType() == typeof(Action_WarpToBiome)) { Action_WarpToBiome val23 = (Action_WarpToBiome)components[i]; TextMeshProUGUI obj38 = itemInfoDisplayTextMesh; ((TMP_Text)obj38).text = ((TMP_Text)obj38).text + "WARP TO " + ((object)(Segment)(ref val23.segmentToWarpTo)).ToString().ToUpper() + "\n"; } else if (((object)components[i]).GetType() == typeof(Parasol)) { TextMeshProUGUI obj39 = itemInfoDisplayTextMesh; ((TMP_Text)obj39).text = ((TMP_Text)obj39).text + "OPEN TO SLOW YOUR DESCENT\n"; } else if (((object)components[i]).GetType() == typeof(Frisbee)) { TextMeshProUGUI obj40 = itemInfoDisplayTextMesh; ((TMP_Text)obj40).text = ((TMP_Text)obj40).text + effectColors["Hunger"] + "THROW</color> IT\n"; } else if (((object)components[i]).GetType() == typeof(Action_ConstructableScoutCannonScroll)) { TextMeshProUGUI obj41 = itemInfoDisplayTextMesh; ((TMP_Text)obj41).text = ((TMP_Text)obj41).text + "\n<#CCCCCC>WHEN PLACED, LIGHT FUSE TO:</color>\nLAUNCH SCOUTS IN BARREL\n"; } else if (((object)components[i]).GetType() == typeof(Dynamite)) { Dynamite val24 = (Dynamite)components[i]; val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + effectColors["Injury"] + "EXPLODES</color> FOR UP TO " + effectColors["Injury"] + (val24.explosionPrefab.GetComponent<AOE>().statusAmount * 100f).ToString("F1").Replace(".0", "") + " INJURY</color>\n<#CCCCCC>ADDITIONAL DAMAGE TAKEN IF HELD</color>\n"; } else if (((object)components[i]).GetType() == typeof(Scorpion)) { Scorpion val25 = (Scorpion)components[i]; if (configForceUpdateTime.Value <= 1f) { float num = Mathf.Max(0.5f, 1f - currentItem.holderCharacter.refs.afflictions.statusSum + 0.05f) * 100f; val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + "IF ALIVE, " + effectColors["Poison"] + "STINGS</color> YOU\n" + effectColors["Curse"] + "DIES</color> WHEN " + effectColors["Heat"] + "COOKED</color>\n\n<#CCCCCC>NEXT STING WILL DEAL:</color>\n" + effectColors["Poison"] + num.ToString("F1").Replace(".0", "") + " POISON</color> OVER " + val25.totalPoisonTime.ToString("F1").Replace(".0", "") + "s\n<#CCCCCC>(MORE DAMAGE IF HEALTHY)</color>\n"; } else { val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + "IF ALIVE, " + effectColors["Poison"] + "STINGS</color> YOU\n" + effectColors["Curse"] + "DIES</color> WHEN " + effectColors["Heat"] + "COOKED</color>\n\n<#CCCCCC>NEXT STING WILL DEAL:</color>\nAT LEAST " + effectColors["Poison"] + "50 POISON</color> OVER " + val25.totalPoisonTime.ToString("F1").Replace(".0", "") + "s\nAT MOST " + effectColors["Poison"] + "105 POISON</color> OVER " + val25.totalPoisonTime.ToString("F1").Replace(".0", "") + "s\n<#CCCCCC>(MORE DAMAGE IF HEALTHY)</color>\n"; } } else if (((object)components[i]).GetType() == typeof(Action_Spawn)) { Action_Spawn val26 = (Action_Spawn)components[i]; if (((Object)val26.objectToSpawn).name.Equals("VFX_Sunscreen")) { AOE component7 = ((Component)val26.objectToSpawn.transform.Find("AOE")).GetComponent<AOE>(); RemoveAfterSeconds component8 = ((Component)val26.objectToSpawn.transform.Find("AOE")).GetComponent<RemoveAfterSeconds>(); val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + "<#CCCCCC>SPRAY A " + component8.seconds.ToString("F1").Replace(".0", "") + "s MIST THAT APPLIES:</color>\n" + ProcessAffliction(component7.affliction); } } else if (((object)components[i]).GetType() == typeof(CactusBall)) { CactusBall val27 = (CactusBall)components[i]; val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + effectColors["Thorns"] + "STICKS</color> TO YOUR BODY\n\nCAN " + effectColors["Hunger"] + "THROW</color> BY USING\nAT LEAST " + (((StickyItemComponent)val27).throwChargeRequirement * 100f).ToString("F1").Replace(".0", "") + "% POWER\n"; } else if (((object)components[i]).GetType() == typeof(BingBongShieldWhileHolding)) { TextMeshProUGUI obj42 = itemInfoDisplayTextMesh; ((TMP_Text)obj42).text = ((TMP_Text)obj42).text + "<#CCCCCC>WHILE EQUIPPED, GRANTS:</color>\n" + effectColors["Shield"] + "SHIELD</color> (INVINCIBILITY)\n"; } else if (((object)components[i]).GetType() == typeof(ItemCooking)) { ItemCooking val28 = (ItemCooking)components[i]; if (val28.wreckWhenCooked && val28.timesCookedLocal >= 1) { text4 = text4 + "\n" + effectColors["Curse"] + "BROKEN FROM COOKING</color>"; } else if (val28.wreckWhenCooked) { text4 = text4 + "\n" + effectColors["Curse"] + "BREAKS IF COOKED</color>"; } else if (val28.timesCookedLocal >= 12) { text4 = text4 + " " + effectColors["Curse"] + val28.timesCookedLocal + "x COOKED\nCANNOT BE COOKED</color>"; } else if (val28.timesCookedLocal == 0) { text4 = text4 + "\n" + effectColors["Extra Stamina"] + "CAN BE COOKED</color>"; } else if (val28.timesCookedLocal == 1) { text4 = text4 + " " + effectColors["Extra Stamina"] + val28.timesCookedLocal + "x COOKED</color>\n" + effectColors["Hunger"] + "CAN BE COOKED</color>"; } else if (val28.timesCookedLocal == 2) { text4 = text4 + " " + effectColors["Hunger"] + val28.timesCookedLocal + "x COOKED</color>\n" + effectColors["Injury"] + "CAN BE COOKED</color>"; } else if (val28.timesCookedLocal == 3) { text4 = text4 + " " + effectColors["Injury"] + val28.timesCookedLocal + "x COOKED</color>\n" + effectColors["Poison"] + "CAN BE COOKED</color>"; } else if (val28.timesCookedLocal >= 4) { text4 = text4 + " " + effectColors["Poison"] + val28.timesCookedLocal + "x COOKED\nCAN BE COOKED</color>"; } } } if (text.Length > 0 && flag) { ((TMP_Text)itemInfoDisplayTextMesh).text = text + "\n" + ((TMP_Text)itemInfoDisplayTextMesh).text; } if (text5.Length > 0) { TextMeshProUGUI obj43 = itemInfoDisplayTextMesh; ((TMP_Text)obj43).text = ((TMP_Text)obj43).text + "\n" + text5; } val10 = itemInfoDisplayTextMesh; ((TMP_Text)val10).text = ((TMP_Text)val10).text + "\n" + text2 + text3 + text4; ((TMP_Text)itemInfoDisplayTextMesh).text = ((TMP_Text)itemInfoDisplayTextMesh).text.Replace("\n\n\n", "\n\n"); } private static string ProcessEffect(float amount, string effect) { string text = ""; if (amount == 0f) { return text; } if (amount > 0f) { text = ((!effect.Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayNegative"]) : (text + effectColors["ItemInfoDisplayPositive"])); text += "GAIN</color> "; } else if (amount < 0f) { text = ((!effect.Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayPositive"]) : (text + effectColors["ItemInfoDisplayNegative"])); text += "REMOVE</color> "; } return text + effectColors[effect] + (Mathf.Abs(amount) * 100f).ToString("F1").Replace(".0", "") + " " + effect.ToUpper() + "</color>\n"; } private static string ProcessEffectOverTime(float amountPerSecond, float rate, float time, string effect) { string text = ""; if (amountPerSecond == 0f || time == 0f) { return text; } if (amountPerSecond > 0f) { text = ((!effect.Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayNegative"]) : (text + effectColors["ItemInfoDisplayPositive"])); text += "GAIN</color> "; } else if (amountPerSecond < 0f) { text = ((!effect.Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayPositive"]) : (text + effectColors["ItemInfoDisplayNegative"])); text += "REMOVE</color> "; } return text + effectColors[effect] + (Mathf.Abs(amountPerSecond) * time * (1f / rate) * 100f).ToString("F1").Replace(".0", "") + " " + effect.ToUpper() + "</color> OVER " + time + "s\n"; } private static string ProcessAffliction(Affliction affliction) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Invalid comparison between Unknown and I4 //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Expected O, but got Unknown //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Invalid comparison between Unknown and I4 //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Expected O, but got Unknown //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Invalid comparison between Unknown and I4 //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Expected O, but got Unknown //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Invalid comparison between Unknown and I4 //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Expected O, but got Unknown //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Invalid comparison between Unknown and I4 //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Expected O, but got Unknown //IL_0777: Unknown result type (might be due to invalid IL or missing references) //IL_077d: Invalid comparison between Unknown and I4 //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Expected O, but got Unknown //IL_086e: Unknown result type (might be due to invalid IL or missing references) //IL_0875: Invalid comparison between Unknown and I4 //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Expected O, but got Unknown string text = ""; if ((int)affliction.GetAfflictionType() == 2) { Affliction_FasterBoi val = (Affliction_FasterBoi)affliction; text = text + effectColors["ItemInfoDisplayPositive"] + "GAIN</color> " + (((Affliction)val).totalTime + val.climbDelay).ToString("F1").Replace(".0", "") + "s OF " + effectColors["Extra Stamina"] + Mathf.Round(val.moveSpeedMod * 100f).ToString("F1").Replace(".0", "") + "% BONUS RUN SPEED</color> OR\n" + effectColors["ItemInfoDisplayPositive"] + "GAIN</color> " + ((Affliction)val).totalTime.ToString("F1").Replace(".0", "") + "s OF " + effectColors["Extra Stamina"] + Mathf.Round(val.climbSpeedMod * 100f).ToString("F1").Replace(".0", "") + "% BONUS CLIMB SPEED</color>\nAFTERWARDS, " + effectColors["ItemInfoDisplayNegative"] + "GAIN</color> " + effectColors["Drowsy"] + (val.drowsyOnEnd * 100f).ToString("F1").Replace(".0", "") + " DROWSY</color>\n"; } else if ((int)affliction.GetAfflictionType() == 8) { Affliction_ClearAllStatus val2 = (Affliction_ClearAllStatus)affliction; text = text + effectColors["ItemInfoDisplayPositive"] + "CLEAR ALL STATUS</color>"; if (val2.excludeCurse) { text = text + " EXCEPT " + effectColors["Curse"] + "CURSE</color>"; } text += "\n"; } else if ((int)affliction.GetAfflictionType() == 10) { Affliction_AddBonusStamina val3 = (Affliction_AddBonusStamina)affliction; text = text + effectColors["ItemInfoDisplayPositive"] + "GAIN</color> " + effectColors["Extra Stamina"] + (val3.staminaAmount * 100f).ToString("F1").Replace(".0", "") + " EXTRA STAMINA</color>\n"; } else if ((int)affliction.GetAfflictionType() == 1) { Affliction_InfiniteStamina val4 = (Affliction_InfiniteStamina)affliction; text = ((!(val4.climbDelay > 0f)) ? (text + effectColors["ItemInfoDisplayPositive"] + "GAIN</color> " + ((Affliction)val4).totalTime.ToString("F1").Replace(".0", "") + "s OF " + effectColors["Extra Stamina"] + "INFINITE STAMINA\n") : (text + effectColors["ItemInfoDisplayPositive"] + "GAIN</color> " + (((Affliction)val4).totalTime + val4.climbDelay).ToString("F1").Replace(".0", "") + "s OF " + effectColors["Extra Stamina"] + "INFINITE RUN STAMINA</color> OR\n" + effectColors["ItemInfoDisplayPositive"] + "GAIN</color> " + ((Affliction)val4).totalTime.ToString("F1").Replace(".0", "") + "s OF " + effectColors["Extra Stamina"] + "INFINITE CLIMB STAMINA</color>\n")); if (val4.drowsyAffliction != null) { text = text + "AFTERWARDS, " + ProcessAffliction(val4.drowsyAffliction); } } else if ((int)affliction.GetAfflictionType() == 7) { Affliction_AdjustStatus val5 = (Affliction_AdjustStatus)affliction; if (val5.statusAmount > 0f) { text = ((!((object)val5).Equals((object?)"Extra Stamina")) ? (text + effectColors["ItemInfoDisplayNegative"]) : (text + effectColors["ItemInfoDisplayPositive"])); text += "GAIN</color> "; } else { text = ((!((object)val5).Equals((object?)"Extra Stamina")) ? (text + effectColors["ItemInfoDisplayPositive"]) : (text + effectColors["ItemInfoDisplayNegative"])); text += "REMOVE</color> "; } text = text + effectColors[((object)(STATUSTYPE)(ref val5.statusType)).ToString()] + (Mathf.Abs(val5.statusAmount) * 100f).ToString("F1").Replace(".0", "") + " " + ((object)(STATUSTYPE)(ref val5.statusType)).ToString().ToUpper() + "</color>\n"; } else if ((int)affliction.GetAfflictionType() == 11) { Affliction_AdjustDrowsyOverTime val6 = (Affliction_AdjustDrowsyOverTime)affliction; text = ((!(val6.statusPerSecond > 0f)) ? (text + effectColors["ItemInfoDisplayPositive"] + "REMOVE</color> ") : (text + effectColors["ItemInfoDisplayNegative"] + "GAIN</color> ")); text = text + effectColors["Drowsy"] + (Mathf.Round(Mathf.Abs(val6.statusPerSecond) * ((Affliction)val6).totalTime * 100f * 0.4f) / 0.4f).ToString("F1").Replace(".0", "") + " DROWSY</color> OVER " + ((Affliction)val6).totalTime.ToString("F1").Replace(".0", "") + "s\n"; } else if ((int)affliction.GetAfflictionType() == 5) { Affliction_AdjustColdOverTime val7 = (Affliction_AdjustColdOverTime)affliction; text = ((!(val7.statusPerSecond > 0f)) ? (text + effectColors["ItemInfoDisplayPositive"] + "REMOVE</color> ") : (text + effectColors["ItemInfoDisplayNegative"] + "GAIN</color> ")); text = text + effectColors["Cold"] + (Mathf.Abs(val7.statusPerSecond) * ((Affliction)val7).totalTime * 100f).ToString("F1").Replace(".0", "") + " COLD</color> OVER " + ((Affliction)val7).totalTime.ToString("F1").Replace(".0", "") + "s\n"; } else if ((int)affliction.GetAfflictionType() == 6) { text = text + effectColors["ItemInfoDisplayPositive"] + "CLEAR ALL STATUS</color>, THEN RANDOMIZE\n" + effectColors["Hunger"] + "HUNGER</color>, " + effectColors["Extra Stamina"] + "EXTRA STAMINA</color>, " + effectColors["Injury"] + "INJURY</color>,\n" + effectColors["Poison"] + "POISON</color>, " + effectColors["Cold"] + "COLD</color>, " + effectColors["Hot"] + "HEAT</color>, " + effectColors["Drowsy"] + "DROWSY</color>\n"; } else if ((int)affliction.GetAfflictionType() == 13) { Affliction_Sunscreen val8 = (Affliction_Sunscreen)affliction; text = text + "PREVENT " + effectColors["Heat"] + "HEAT</color> IN MESA'S SUN FOR " + ((Affliction)val8).totalTime.ToString("F1").Replace(".0", "") + "s\n"; } return text; } private static void AddDisplayObject() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("GAME/GUIManager"); guiManager = val.GetComponent<GUIManager>(); TMP_FontAsset font = ((TMP_Text)guiManager.heroDayText).font; GameObject gameObject = ((Component)val.transform.Find("Canvas_HUD/Prompts/ItemPromptLayout")).gameObject; GameObject val2 = new GameObject("ItemInfoDisplay"); val2.transform.SetParent(gameObject.transform); itemInfoDisplayTextMesh = val2.AddComponent<TextMeshProUGUI>(); RectTransform component = val2.GetComponent<RectTransform>(); component.sizeDelta = new Vector2(configSizeDeltaX.Value, 0f); ((TMP_Text)itemInfoDisplayTextMesh).font = font; ((TMP_Text)itemInfoDisplayTextMesh).fontSize = configFontSize.Value; ((TMP_Text)itemInfoDisplayTextMesh).alignment = (TextAlignmentOptions)1025; ((TMP_Text)itemInfoDisplayTextMesh).lineSpacing = configLineSpacing.Value; ((TMP_Text)itemInfoDisplayTextMesh).text = ""; ((TMP_Text)itemInfoDisplayTextMesh).outlineWidth = configOutlineWidth.Value; } private static void InitEffectColors(Dictionary<string, string> dict) { dict.Add("Hunger", "<#FFBD16>"); dict.Add("Extra Stamina", "<#BFEC1B>"); dict.Add("Injury", "<#FF5300>"); dict.Add("Crab", "<#E13542>"); dict.Add("Poison", "<#A139FF>"); dict.Add("Cold", "<#00BCFF>"); dict.Add("Heat", "<#C80918>"); dict.Add("Hot", "<#C80918>"); dict.Add("Sleepy", "<#FF5CA4>"); dict.Add("Drowsy", "<#FF5CA4>"); dict.Add("Curse", "<#1B0043>"); dict.Add("Weight", "<#A65A1C>"); dict.Add("Thorns", "<#768E00>"); dict.Add("Shield", "<#D48E00>"); dict.Add("ItemInfoDisplayPositive", "<#DDFFDD>"); dict.Add("ItemInfoDisplayNegative", "<#FFCCCC>"); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }