using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Configgy;
using GameConsole;
using HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Follower")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Follower")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("deb11382-34d5-43d8-8e9f-0c5aca69ee9f")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Follower
{
public class DebugSpawnScraphead : ICommand
{
public string Name => "follower-debug";
public string Description => "";
public string Command => "follower-debug";
public void Execute(Console con, string[] args)
{
maincode.Log("how did you even find this?");
}
}
public static class ConfiggyExtensions
{
}
public static class FixConfiggyLabel
{
public static void SetLabelText(this ConfigLabel label, string text)
{
if (Object.op_Implicit((Object)(object)label.GetLabel()))
{
label.SetText(text);
label.GetLabel().text = text;
}
}
}
[BepInPlugin("plonk.follower", "Follower", "1.1.6")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class maincode : BaseUnityPlugin
{
public enum ItemsToBuy
{
BigFollower = 1
}
[HarmonyPatch]
public static class Patches
{
[HarmonyPrefix]
[HarmonyPatch(typeof(EnemyIdentifier), "Death", new Type[] { typeof(bool) })]
public static void CheckForDeath(EnemyIdentifier __instance)
{
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Expected O, but got Unknown
if (__instance.overrideFullName == "PlayerDrone")
{
if (!companionstored)
{
SendHudMessage("<color=red>" + ((ConfigValueElement<string>)(object)followername).Value + " has died...</color>", 0, silent: false);
}
if (((ConfigValueElement<int>)(object)followerevolution).Value == 2 && (Object)(object)((Component)__instance).GetComponent<Drone>() != (Object)null)
{
((Component)__instance).GetComponent<Drone>().explosion = new AssetReference("Assets/Particles/Breaks/BreakParticleMetal.prefab");
}
petdead = true;
Object.Destroy((Object)(object)followerhealth);
Object.Destroy((Object)(object)follower);
}
else if (SceneHelper.CurrentScene != "uk_construct" && !MonoSingleton<CheatsController>.instance.cheatsEnabled && !__instance.dead)
{
GiveCreditsBasedOnEnemyClass(__instance.enemyClass, __instance.enemyType, __instance.isBoss, !__instance.dontCountAsKills);
}
}
[HarmonyPatch(typeof(LeaderboardController), "SubmitCyberGrindScore")]
[HarmonyPrefix]
public static bool OnSubmitCyberGrindScore()
{
return false;
}
[HarmonyPatch(typeof(LeaderboardController), "SubmitLevelScore")]
[HarmonyPrefix]
public static bool OnSubmitLevelScore()
{
return false;
}
}
[Configgable("", "Follower Name", 0, "Your follower's name")]
private static ConfigInputField<string> followername = new ConfigInputField<string>("Pet", (Func<string, bool>)null, (Func<string, ValueTuple<bool, string>>)null);
[Configgable("", "Follower Level", 0, "Your follower's level. Purely decorative")]
private static ConfigLabel followerlevelpublic = new ConfigLabel("", 50f);
[Configgable("", "Your money", 0, "Your money. Purely decorative")]
private static ConfigLabel plymoney = new ConfigLabel("", 50f);
private static ConfiggyPersistent<int> followerlevel = new ConfiggyPersistent<int>(1);
private static ConfiggyPersistent<int> followerevolution = new ConfiggyPersistent<int>(1);
private static ConfiggyPersistent<int> creds = new ConfiggyPersistent<int>(0);
[Configgable("", "Evolve follower", 0, "Evolve companion")]
private static ConfigButton evolvecompanionbutton = new ConfigButton((Action)EvolveCompanion, "Evolve");
[Configgable("", "Upgrade follower", 0, "upgrade companion")]
private static ConfigButton upgcompanionbutton = new ConfigButton((Action)UpgradeCompanion, "Upgrade");
[Configgable("", "Refund a level", 0, "refund a level")]
private static ConfigButton refundbutton = new ConfigButton((Action)RefundUpgrade, "Refund upgrade");
[Configgable("", "Revive follower", 0, "revive companion")]
private static ConfigButton revivecompanionbutton = new ConfigButton((Action)ReviveCompanion, "Revive");
[Configgable("", "Unstuck follower", 0, "revive companion")]
private static ConfigButton unstuckcompanionbutton = new ConfigButton((Action)UnstuckCompanion, "Unstuck");
[Configgable("", "Shop", 0, "The shop.")]
private static ConfigLabel shoptext = new ConfigLabel("-- STORAGE --", 60f);
[Configgable("", "Select item to buy", 0, "Self explanatory.")]
private static ConfigButton storebutton = new ConfigButton((Action)StoreCompanion, "Store Pet");
private static int upgprice;
private static int defaultupgprice = 2500;
private static GameObject follower;
private static GameObject menufollower;
private static AssetBundle bundle;
public static GameObject gotcreds;
public static GameObject followerhealth;
public static GameObject followertargeting;
private static bool companionstored;
public static float maxhp;
public static GameObject beam;
public static BeamgunBeam bgbeam;
private bool candoshit = false;
private bool cansendhudmsg = true;
public static bool petdead = false;
private static bool stored2 = true;
public static ConfigBuilder ConfigBuilder { get; private set; }
public static T Fetch<T>(string name)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
return Addressables.LoadAssetAsync<T>((object)name).WaitForCompletion();
}
public static T FetchFromBundle<T>(string key, bool autofill = false) where T : Object
{
return bundle.LoadAsset<T>(autofill ? ("assets/formods/petfollower/" + key) : key);
}
public static void SendHudMessage(string msg, int delay, bool silent)
{
MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(msg, "", "", delay, silent);
}
public static void Log(string msg, int type = 1)
{
if (type == 1)
{
Debug.Log((object)msg);
}
else if (type == 2)
{
Debug.LogWarning((object)msg);
}
else if (type == 3)
{
Debug.LogError((object)msg);
}
else if (type > 3)
{
type = 3;
}
}
public void Awake()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Expected O, but got Unknown
ConfigBuilder = new ConfigBuilder("plonk.follower", "Follower");
ConfigBuilder.Build();
SceneManager.activeSceneChanged += OnSceneChange;
if ((Object)(object)bundle == (Object)null)
{
string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
bundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "followermod"));
Log("Got bundle " + (object)bundle);
for (int i = 0; i < bundle.GetAllAssetNames().Length; i++)
{
Log(bundle.GetAllAssetNames()[i]);
}
}
}
private void OnSceneChange(Scene before, Scene after)
{
if (SceneHelper.CurrentScene == "Main Menu" && cansendhudmsg && (Object)(object)bundle == (Object)null)
{
SendHudMessage("Follower mod failed to load.\r\n<color=green>The asset bundle (followermod) is missing or in the wrong place. please place it where the mod's .dll is located.</color>", 0, silent: false);
cansendhudmsg = false;
}
if (SceneHelper.CurrentScene == "Main Menu" && cansendhudmsg && (Object)(object)bundle != (Object)null)
{
Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/modloaded.prefab", autofill: false));
cansendhudmsg = false;
}
}
public void Start()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("plonk.follower");
val.PatchAll();
}
public void Update()
{
//IL_09c0: Unknown result type (might be due to invalid IL or missing references)
//IL_0a22: Unknown result type (might be due to invalid IL or missing references)
//IL_0a2e: Unknown result type (might be due to invalid IL or missing references)
//IL_0ad1: Unknown result type (might be due to invalid IL or missing references)
//IL_0af5: Unknown result type (might be due to invalid IL or missing references)
//IL_0b4b: Unknown result type (might be due to invalid IL or missing references)
//IL_0b57: Unknown result type (might be due to invalid IL or missing references)
//IL_0be9: Unknown result type (might be due to invalid IL or missing references)
//IL_0c0d: Unknown result type (might be due to invalid IL or missing references)
//IL_0c63: Unknown result type (might be due to invalid IL or missing references)
//IL_0c6f: Unknown result type (might be due to invalid IL or missing references)
//IL_0d01: Unknown result type (might be due to invalid IL or missing references)
//IL_0d25: Unknown result type (might be due to invalid IL or missing references)
//IL_0d7b: Unknown result type (might be due to invalid IL or missing references)
//IL_0d87: Unknown result type (might be due to invalid IL or missing references)
//IL_0e19: Unknown result type (might be due to invalid IL or missing references)
//IL_0e3d: Unknown result type (might be due to invalid IL or missing references)
//IL_0e61: Unknown result type (might be due to invalid IL or missing references)
//IL_0eb7: Unknown result type (might be due to invalid IL or missing references)
//IL_0ec3: Unknown result type (might be due to invalid IL or missing references)
//IL_0f55: Unknown result type (might be due to invalid IL or missing references)
//IL_0f79: Unknown result type (might be due to invalid IL or missing references)
//IL_0f9d: Unknown result type (might be due to invalid IL or missing references)
//IL_0ff3: Unknown result type (might be due to invalid IL or missing references)
//IL_0fff: Unknown result type (might be due to invalid IL or missing references)
//IL_1091: Unknown result type (might be due to invalid IL or missing references)
//IL_10b5: Unknown result type (might be due to invalid IL or missing references)
//IL_10d9: Unknown result type (might be due to invalid IL or missing references)
//IL_112f: Unknown result type (might be due to invalid IL or missing references)
//IL_113b: Unknown result type (might be due to invalid IL or missing references)
//IL_11cd: Unknown result type (might be due to invalid IL or missing references)
//IL_11f1: Unknown result type (might be due to invalid IL or missing references)
//IL_1215: Unknown result type (might be due to invalid IL or missing references)
//IL_0512: Unknown result type (might be due to invalid IL or missing references)
//IL_0521: Unknown result type (might be due to invalid IL or missing references)
//IL_0526: Unknown result type (might be due to invalid IL or missing references)
//IL_052b: Unknown result type (might be due to invalid IL or missing references)
//IL_0588: Unknown result type (might be due to invalid IL or missing references)
//IL_0597: Unknown result type (might be due to invalid IL or missing references)
//IL_059c: Unknown result type (might be due to invalid IL or missing references)
//IL_05a1: Unknown result type (might be due to invalid IL or missing references)
//IL_05fc: Unknown result type (might be due to invalid IL or missing references)
//IL_060b: Unknown result type (might be due to invalid IL or missing references)
//IL_0610: Unknown result type (might be due to invalid IL or missing references)
//IL_0615: Unknown result type (might be due to invalid IL or missing references)
//IL_0833: Unknown result type (might be due to invalid IL or missing references)
//IL_088f: Unknown result type (might be due to invalid IL or missing references)
//IL_08c7: Unknown result type (might be due to invalid IL or missing references)
//IL_0929: Unknown result type (might be due to invalid IL or missing references)
//IL_0903: Unknown result type (might be due to invalid IL or missing references)
upgprice = Mathf.RoundToInt((float)defaultupgprice * (float)((ConfigValueElement<int>)(object)followerlevel).Value * ((float)((ConfigValueElement<int>)(object)followerevolution).Value / 5f));
followerlevelpublic.SetLabelText("Level " + ((ConfigValueElement<int>)(object)followerlevel).Value);
evolvecompanionbutton.SetLabel("Evolve for " + Mathf.RoundToInt((float)(defaultupgprice * 4 * ((ConfigValueElement<int>)(object)followerevolution).Value) * Mathf.Round((float)(((ConfigValueElement<int>)(object)followerlevel).Value / 25)) + 1f) + "<color=yellow>'</color>");
upgcompanionbutton.SetLabel("Upgrade for " + upgprice + "<color=yellow>'</color>");
refundbutton.SetLabel("Refund Upgrade (will get " + upgprice / 2 + "<color=yellow>'</color>)");
revivecompanionbutton.SetLabel("Revive for " + 10000 * ((ConfigValueElement<int>)(object)followerevolution).Value + "<color=yellow>'</color>");
if (((ConfigValueElement<int>)(object)followerevolution).Value <= 0)
{
((ConfigValueElement<int>)(object)followerevolution).SetValue(1);
}
if (((ConfigValueElement<int>)(object)followerlevel).Value <= 0)
{
((ConfigValueElement<int>)(object)followerlevel).SetValue(1);
}
if (((ConfigValueElement<int>)(object)creds).Value < 214748364)
{
plymoney.SetLabelText("You have " + ((ConfigValueElement<int>)(object)creds).Value + "<color=yellow>'</color>");
}
else
{
plymoney.SetLabelText("A LOT OF <color=yellow>'</color>");
}
if (!candoshit && SceneHelper.CurrentScene == "Main Menu" && (Object)(object)bundle != (Object)null)
{
candoshit = true;
}
if (candoshit && SceneHelper.CurrentScene != "Main Menu" && !petdead)
{
if ((Object)(object)follower == (Object)null)
{
follower = MakeFollower();
}
else
{
EnemyIdentifier component = follower.GetComponent<EnemyIdentifier>();
if (((ConfigValueElement<int>)(object)followerevolution).Value == 1)
{
component.healthBuffModifier = ((ConfigValueElement<int>)(object)followerlevel).Value / 2 + 1;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value < 5 && ((ConfigValueElement<int>)(object)followerevolution).Value != 1)
{
component.healthBuffModifier = ((ConfigValueElement<int>)(object)followerlevel).Value / 5 + 1;
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value < 6)
{
component.healthBuffModifier = ((ConfigValueElement<int>)(object)followerlevel).Value / 5 / 2 + 1;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value >= 6)
{
component.healthBuffModifier = ((ConfigValueElement<int>)(object)followerlevel).Value / 5 / 4 + 1;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value < 4)
{
component.damageBuffModifier = (float)(((ConfigValueElement<int>)(object)followerlevel).Value / 20) * 1.5f / 5f + 1f;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value == 4)
{
component.damageBuffModifier = ((ConfigValueElement<int>)(object)followerlevel).Value / 20 / 5 / 5 + 1;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value == 5)
{
component.damageBuffModifier = (float)(((ConfigValueElement<int>)(object)followerlevel).Value / 20) * 1.25f / 5f + 1f;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value > 5)
{
component.damageBuffModifier = (float)(((ConfigValueElement<int>)(object)followerlevel).Value / 20) * 1.5f / 5f + 1f;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value < 6)
{
component.speedBuffModifier = ((ConfigValueElement<int>)(object)followerlevel).Value / 50 + 1;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value >= 6)
{
component.speedBuffModifier = ((ConfigValueElement<int>)(object)followerlevel).Value / 50 * 4 + 1;
}
if ((Object)(object)followerhealth == (Object)null)
{
if (!petdead)
{
followerhealth = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/pethealth.prefab", autofill: false));
}
}
else
{
((Component)followerhealth.transform.GetChild(0).GetChild(1)).GetComponent<Slider>().normalizedValue = component.health / maxhp;
}
if (component.target == null)
{
((Behaviour)follower.GetComponent<AlwaysLookAtCamera>()).enabled = true;
}
else
{
((Behaviour)follower.GetComponent<AlwaysLookAtCamera>()).enabled = false;
}
Vector3 val = ((Component)MonoSingleton<NewMovement>.instance).transform.position - follower.transform.position;
if (((Vector3)(ref val)).magnitude > 10f)
{
if (((ConfigValueElement<int>)(object)followerevolution).Value < 5)
{
((Behaviour)((Component)follower.transform).GetComponent<Follow>()).enabled = true;
Follow component2 = ((Component)follower.transform).GetComponent<Follow>();
val = ((Component)MonoSingleton<NewMovement>.instance).transform.position - follower.transform.position;
component2.speed = ((Vector3)(ref val)).magnitude * 3f;
}
else if (component.target == null)
{
((Behaviour)((Component)follower.transform).GetComponent<Follow>()).enabled = true;
Follow component3 = ((Component)follower.transform).GetComponent<Follow>();
val = ((Component)MonoSingleton<NewMovement>.instance).transform.position - follower.transform.position;
component3.speed = ((Vector3)(ref val)).magnitude * 3f;
}
else
{
((Behaviour)((Component)follower.transform).GetComponent<Follow>()).enabled = false;
}
}
else
{
((Behaviour)((Component)follower.transform).GetComponent<Follow>()).enabled = false;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value == 5 && component.target == null && follower.GetComponent<Mindflayer>().target == null && follower.GetComponent<Mindflayer>().rightHand.childCount != 0 && (Object)(object)follower.GetComponent<Mindflayer>().rightHand.GetChild(0) != (Object)null)
{
Object.Destroy((Object)(object)((Component)follower.GetComponent<Mindflayer>().rightHand.GetChild(0)).gameObject);
}
if (((ConfigValueElement<int>)(object)followerevolution).Value == 5 && ((ConfigValueElement<int>)(object)followerlevel).Value == 50)
{
follower.GetComponent<Mindflayer>().homingProjectile = maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/projectile homing.prefab", autofill: false);
follower.GetComponent<Mindflayer>().beam = maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/mindflayer beam 2.prefab", autofill: false);
}
if (((ConfigValueElement<int>)(object)followerevolution).Value == 5 && ((ConfigValueElement<int>)(object)followerlevel).Value != 50)
{
follower.GetComponent<Mindflayer>().homingProjectile = Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Projectile Homing.prefab");
follower.GetComponent<Mindflayer>().beam = maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/mindflayer beam.prefab", autofill: false);
}
if (component.target != null)
{
if ((Object)(object)followertargeting == (Object)null)
{
followertargeting = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/followertargeting.prefab", autofill: false));
}
else
{
if ((Object)(object)follower.GetComponent<Machine>() != (Object)null && (Object)(object)follower.GetComponent<Machine>().chest == (Object)null)
{
followertargeting.GetComponent<LineRenderer>().SetPosition(0, follower.transform.position);
}
if ((Object)(object)follower.GetComponent<Machine>() != (Object)null && (Object)(object)follower.GetComponent<Machine>().chest != (Object)null)
{
followertargeting.GetComponent<LineRenderer>().SetPosition(0, follower.GetComponent<Machine>().chest.transform.position);
}
if ((Object)(object)follower.GetComponent<Machine>() == (Object)null)
{
followertargeting.GetComponent<LineRenderer>().SetPosition(0, follower.transform.position);
}
if ((Object)(object)component.target.headTransform == (Object)null)
{
followertargeting.GetComponent<LineRenderer>().SetPosition(1, component.target.targetTransform.position);
}
else
{
followertargeting.GetComponent<LineRenderer>().SetPosition(1, component.target.headTransform.position);
}
}
}
else if ((Object)(object)followertargeting != (Object)null)
{
Object.Destroy((Object)(object)followertargeting);
}
}
}
if (candoshit && SceneHelper.CurrentScene == "Main Menu" && (Object)(object)MonoSingleton<NewMovement>.instance != (Object)null)
{
((Component)MonoSingleton<NewMovement>.instance).GetComponent<Rigidbody>().constraints = (RigidbodyConstraints)2;
((Component)MonoSingleton<NewMovement>.instance).GetComponent<Rigidbody>().constraints = (RigidbodyConstraints)8;
((Component)MonoSingleton<NewMovement>.instance).transform.rotation = Quaternion.identity;
if (!petdead)
{
if (((ConfigValueElement<int>)(object)followerevolution).Value == 1)
{
NewMovement instance = MonoSingleton<NewMovement>.instance;
if ((Object)(object)menufollower == (Object)null)
{
menufollower = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/dronefleshsnakeeye.prefab", autofill: false), ((Component)instance).transform.position, ((Component)instance).transform.rotation, ((Component)instance).transform);
((Behaviour)menufollower.GetComponent<EnemyIdentifier>()).enabled = false;
((Behaviour)menufollower.GetComponent<Drone>()).enabled = false;
((Behaviour)menufollower.GetComponent<DroneFlesh>()).enabled = false;
menufollower.GetComponent<Rigidbody>().isKinematic = true;
((Behaviour)menufollower.GetComponent<KeepInBounds>()).enabled = false;
menufollower.transform.parent = GameObject.Find("Player").transform;
menufollower.transform.localPosition = new Vector3(3.1345f, 0.9891f, 3f);
menufollower.transform.localRotation = Quaternion.Euler(0f, 218.357f, 0f);
}
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 2)
{
NewMovement instance2 = MonoSingleton<NewMovement>.instance;
if ((Object)(object)menufollower == (Object)null)
{
menufollower = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Drone.prefab"), ((Component)instance2).transform.position, ((Component)instance2).transform.rotation, ((Component)instance2).transform);
((Behaviour)menufollower.GetComponent<EnemyIdentifier>()).enabled = false;
((Behaviour)menufollower.GetComponent<Drone>()).enabled = false;
menufollower.GetComponent<Rigidbody>().isKinematic = true;
((Behaviour)menufollower.GetComponent<KeepInBounds>()).enabled = false;
menufollower.transform.parent = GameObject.Find("Player").transform;
menufollower.transform.localPosition = new Vector3(3.1345f, 0.9891f, 3f);
menufollower.transform.localRotation = Quaternion.Euler(0f, 218.357f, 0f);
}
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 3)
{
NewMovement instance3 = MonoSingleton<NewMovement>.instance;
if ((Object)(object)menufollower == (Object)null)
{
menufollower = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/DroneSkull Variant.prefab"), ((Component)instance3).transform.position, ((Component)instance3).transform.rotation, ((Component)instance3).transform);
((Behaviour)menufollower.GetComponent<EnemyIdentifier>()).enabled = false;
((Behaviour)menufollower.GetComponent<Drone>()).enabled = false;
menufollower.GetComponent<Rigidbody>().isKinematic = true;
((Behaviour)menufollower.GetComponent<KeepInBounds>()).enabled = false;
menufollower.transform.parent = GameObject.Find("Player").transform;
menufollower.transform.localPosition = new Vector3(3.1345f, 0.9891f, 3f);
menufollower.transform.localRotation = Quaternion.Euler(0f, 218.357f, 0f);
}
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 4)
{
NewMovement instance4 = MonoSingleton<NewMovement>.instance;
if ((Object)(object)menufollower == (Object)null)
{
menufollower = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Virtue.prefab"), ((Component)instance4).transform.position, ((Component)instance4).transform.rotation, ((Component)instance4).transform);
((Behaviour)menufollower.GetComponent<EnemyIdentifier>()).enabled = false;
((Behaviour)menufollower.GetComponent<Drone>()).enabled = false;
menufollower.GetComponent<Rigidbody>().isKinematic = true;
((Behaviour)menufollower.GetComponent<KeepInBounds>()).enabled = false;
menufollower.transform.parent = GameObject.Find("Player").transform;
menufollower.transform.localPosition = new Vector3(3.1345f, 0.9891f, 3f);
menufollower.transform.localRotation = Quaternion.Euler(0f, 218.357f, 0f);
menufollower.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
}
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 5)
{
NewMovement instance5 = MonoSingleton<NewMovement>.instance;
if ((Object)(object)menufollower == (Object)null)
{
menufollower = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Mindflayer.prefab"), ((Component)instance5).transform.position, ((Component)instance5).transform.rotation, ((Component)instance5).transform);
((Behaviour)menufollower.GetComponent<EnemyIdentifier>()).enabled = false;
((Behaviour)menufollower.GetComponent<Mindflayer>()).enabled = false;
menufollower.GetComponent<Rigidbody>().isKinematic = true;
((Behaviour)menufollower.GetComponent<Machine>()).enabled = false;
menufollower.transform.parent = GameObject.Find("Player").transform;
menufollower.transform.localPosition = new Vector3(3.1345f, 0.9891f, 3f);
menufollower.transform.localRotation = Quaternion.Euler(0f, 218.357f, 0f);
menufollower.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
}
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 6)
{
NewMovement instance6 = MonoSingleton<NewMovement>.instance;
if ((Object)(object)menufollower == (Object)null)
{
menufollower = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Gabriel.prefab"), ((Component)instance6).transform.position, ((Component)instance6).transform.rotation, ((Component)instance6).transform);
((Behaviour)menufollower.GetComponent<EnemyIdentifier>()).enabled = false;
((Behaviour)menufollower.GetComponent<Gabriel>()).enabled = false;
menufollower.GetComponent<Rigidbody>().isKinematic = true;
((Behaviour)menufollower.GetComponent<Machine>()).enabled = false;
menufollower.transform.parent = GameObject.Find("Player").transform;
menufollower.transform.localPosition = new Vector3(3.1345f, 0.9891f, 3f);
menufollower.transform.localRotation = Quaternion.Euler(0f, 218.357f, 0f);
menufollower.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
}
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 7)
{
NewMovement instance7 = MonoSingleton<NewMovement>.instance;
if ((Object)(object)menufollower == (Object)null)
{
menufollower = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Gabriel 2nd Variant.prefab"), ((Component)instance7).transform.position, ((Component)instance7).transform.rotation, ((Component)instance7).transform);
((Behaviour)menufollower.GetComponent<EnemyIdentifier>()).enabled = false;
((Behaviour)menufollower.GetComponent<GabrielSecond>()).enabled = false;
menufollower.GetComponent<Rigidbody>().isKinematic = true;
((Behaviour)menufollower.GetComponent<Machine>()).enabled = false;
menufollower.transform.parent = GameObject.Find("Player").transform;
menufollower.transform.localPosition = new Vector3(3.1345f, 0.9891f, 3f);
menufollower.transform.localRotation = Quaternion.Euler(0f, 218.357f, 0f);
menufollower.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
}
}
if ((Object)(object)menufollower == (Object)null)
{
Log("Failed to create Menu Follower", 3);
}
}
if (petdead && (Object)(object)menufollower != (Object)null)
{
Object.Destroy((Object)(object)menufollower);
}
}
if (!candoshit || SceneHelper.CurrentScene != "Main Menu")
{
}
if ((Object)(object)follower == (Object)null && (Object)(object)followertargeting != (Object)null)
{
Object.Destroy((Object)(object)followertargeting);
}
}
public static GameObject MakeFollower()
{
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_0135: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
//IL_017a: Unknown result type (might be due to invalid IL or missing references)
//IL_023b: Unknown result type (might be due to invalid IL or missing references)
//IL_0246: Unknown result type (might be due to invalid IL or missing references)
//IL_0205: Unknown result type (might be due to invalid IL or missing references)
//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
//IL_027b: Unknown result type (might be due to invalid IL or missing references)
//IL_0302: Unknown result type (might be due to invalid IL or missing references)
NewMovement instance = MonoSingleton<NewMovement>.instance;
GameObject val = null;
if (((ConfigValueElement<int>)(object)followerevolution).Value == 1)
{
val = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/dronefleshsnakeeye.prefab", autofill: false), ((Component)instance).transform.position + Vector3.up * 3f, ((Component)instance).transform.rotation);
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 2)
{
val = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Drone.prefab"), ((Component)instance).transform.position + Vector3.up * 3f, ((Component)instance).transform.rotation);
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 3)
{
val = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/DroneSkull Variant.prefab"), ((Component)instance).transform.position + Vector3.up * 3f, ((Component)instance).transform.rotation);
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 4)
{
val = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Virtue.prefab"), ((Component)instance).transform.position + Vector3.up * 3f, ((Component)instance).transform.rotation);
if (((ConfigValueElement<int>)(object)followerlevel).Value < 50)
{
val.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
}
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 5)
{
val = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/mindflayer.prefab", autofill: false), ((Component)instance).transform.position + Vector3.up * 3f, ((Component)instance).transform.rotation);
if (((ConfigValueElement<int>)(object)followerlevel).Value < 50)
{
val.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
}
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 6)
{
val = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Gabriel.prefab"), ((Component)instance).transform.position, ((Component)instance).transform.rotation);
if (((ConfigValueElement<int>)(object)followerlevel).Value < 50)
{
val.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
}
val.GetComponent<AudioSource>().volume = 0f;
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value == 7)
{
val = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Enemies/Gabriel 2nd Variant.prefab"), ((Component)instance).transform.position, ((Component)instance).transform.rotation);
if (((ConfigValueElement<int>)(object)followerlevel).Value < 50)
{
val.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
}
val.GetComponent<AudioSource>().volume = 0f;
}
if ((Object)(object)val != (Object)null)
{
EnemyIdentifier component = ((Component)val.transform).GetComponent<EnemyIdentifier>();
component.attackEnemies = true;
component.ignorePlayer = true;
component.healthBuff = true;
component.damageBuff = true;
component.speedBuff = true;
val.AddComponent<Follow>();
val.GetComponent<Follow>().followX = true;
val.GetComponent<Follow>().followY = true;
val.GetComponent<Follow>().followZ = true;
((Behaviour)val.GetComponent<Follow>()).enabled = false;
val.AddComponent<AlwaysLookAtCamera>();
val.GetComponent<AlwaysLookAtCamera>().speed = 100f;
val.GetComponent<AlwaysLookAtCamera>().dontRotateIfBlind = true;
((Behaviour)val.GetComponent<AlwaysLookAtCamera>()).enabled = false;
((Component)val.transform).tag = "Untagged";
component.overrideFullName = "PlayerDrone";
component.difficultyOverride = 3;
component.ignoredByEnemies = true;
maxhp = component.health;
return val;
}
Log("Failed to create follower", 3);
return null;
}
public static void UpgradeCompanion()
{
if (((ConfigValueElement<int>)(object)followerlevel).Value >= 50)
{
SendHudMessage("<color=red>" + ((ConfigValueElement<string>)(object)followername).Value + " is at maximum level (</color><color=green>50</color><color=red>)!</color>", 0, silent: false);
}
else if (((ConfigValueElement<int>)(object)creds).Value < upgprice)
{
SendHudMessage("<color=red> Not enough money.\n You need " + (upgprice - ((ConfigValueElement<int>)(object)creds).Value) + " more </color>", 0, silent: false);
}
if (((ConfigValueElement<int>)(object)creds).Value >= upgprice && ((ConfigValueElement<int>)(object)followerlevel).Value < 50)
{
SendHudMessage("<color=green>Successfully upgraded " + ((ConfigValueElement<string>)(object)followername).Value + " for </color>" + upgprice + "<color=yellow>'</color>", 0, silent: false);
((ConfigValueElement<int>)(object)followerlevel).SetValue(((ConfigValueElement<int>)(object)followerlevel).Value + 1);
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value - upgprice);
if (!petdead && SceneHelper.CurrentScene != "Main Menu")
{
Object.Destroy((Object)(object)follower);
follower = MakeFollower();
}
}
}
public static void ReviveCompanion()
{
if (!petdead)
{
SendHudMessage("<color=red>" + ((ConfigValueElement<string>)(object)followername).Value + " is not dead!</color>", 0, silent: false);
}
else if (((ConfigValueElement<int>)(object)creds).Value < 10000 * ((ConfigValueElement<int>)(object)followerevolution).Value)
{
SendHudMessage("<color=red> Not enough money.\n You need " + (10000 * ((ConfigValueElement<int>)(object)followerevolution).Value - ((ConfigValueElement<int>)(object)creds).Value) + " more </color>", 0, silent: false);
}
if (((ConfigValueElement<int>)(object)creds).Value >= 10000 * ((ConfigValueElement<int>)(object)followerevolution).Value && petdead)
{
SendHudMessage("<color=green>Successfully Revived " + ((ConfigValueElement<string>)(object)followername).Value + " for </color>" + 10000 * ((ConfigValueElement<int>)(object)followerevolution).Value + "<color=yellow>'</color>", 0, silent: false);
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value - 10000 * ((ConfigValueElement<int>)(object)followerevolution).Value);
petdead = false;
}
}
public static void UnstuckCompanion()
{
if (!petdead && SceneHelper.CurrentScene != "Main Menu")
{
float health = follower.GetComponent<EnemyIdentifier>().health;
Object.Destroy((Object)(object)follower);
follower = MakeFollower();
follower.GetComponent<EnemyIdentifier>().health = health;
if (((ConfigValueElement<int>)(object)followerevolution).Value < 5)
{
follower.GetComponent<Drone>().health = health;
}
if (((ConfigValueElement<int>)(object)followerevolution).Value >= 5)
{
follower.GetComponent<Machine>().health = health;
}
}
}
public static void RefundUpgrade()
{
if (((ConfigValueElement<int>)(object)followerlevel).Value > 1)
{
SendHudMessage("<color=green>Successfully refunded an upgrade for </color>" + upgprice / 2 + "<color=yellow>'</color>", 0, silent: false);
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + upgprice / 2);
((ConfigValueElement<int>)(object)followerlevel).SetValue(((ConfigValueElement<int>)(object)followerlevel).Value - 1);
if (!petdead && SceneHelper.CurrentScene != "Main Menu")
{
Object.Destroy((Object)(object)follower);
follower = MakeFollower();
}
}
}
public static void EvolveCompanion()
{
if (((ConfigValueElement<int>)(object)followerlevel).Value < 50)
{
SendHudMessage("<color=red>" + ((ConfigValueElement<string>)(object)followername).Value + " needs to be at maximum level (</color><color=green>50</color><color=red>)!</color>", 0, silent: false);
}
else if (((ConfigValueElement<int>)(object)followerevolution).Value >= 5)
{
SendHudMessage("<color=red>" + ((ConfigValueElement<string>)(object)followername).Value + " already at maximum evolution (</color><color=green>5</color><color=red>)!</color>", 0, silent: false);
}
else if (((ConfigValueElement<int>)(object)creds).Value < Mathf.RoundToInt((float)(defaultupgprice * 4 * ((ConfigValueElement<int>)(object)followerevolution).Value) * Mathf.Round((float)(((ConfigValueElement<int>)(object)followerlevel).Value / 25)) + 1f))
{
SendHudMessage("<color=red> Not enough money.\n You need " + (Mathf.RoundToInt((float)(defaultupgprice * 4 * ((ConfigValueElement<int>)(object)followerevolution).Value) * Mathf.Round((float)(((ConfigValueElement<int>)(object)followerlevel).Value / 25)) + 1f) - ((ConfigValueElement<int>)(object)creds).Value) + " more </color>", 0, silent: false);
}
if (((ConfigValueElement<int>)(object)followerlevel).Value >= 50 && ((ConfigValueElement<int>)(object)followerevolution).Value < 5 && ((ConfigValueElement<int>)(object)creds).Value >= Mathf.RoundToInt((float)(defaultupgprice * 4 * ((ConfigValueElement<int>)(object)followerevolution).Value) * Mathf.Round((float)(((ConfigValueElement<int>)(object)followerlevel).Value / 25)) + 1000f))
{
SendHudMessage("<color=green>Successfully evolved " + ((ConfigValueElement<string>)(object)followername).Value + " for </color>" + Mathf.RoundToInt((float)(defaultupgprice * 4 * ((ConfigValueElement<int>)(object)followerevolution).Value) * Mathf.Round((float)(((ConfigValueElement<int>)(object)followerlevel).Value / 25)) + 1f) + "<color=yellow>'</color>", 0, silent: false);
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value - Mathf.RoundToInt((float)(defaultupgprice * 4 * ((ConfigValueElement<int>)(object)followerevolution).Value) * Mathf.Round((float)(((ConfigValueElement<int>)(object)followerlevel).Value / 25)) + 1f));
EvolveCompanion2();
if ((Object)(object)menufollower != (Object)null)
{
Object.Destroy((Object)(object)menufollower);
}
}
}
public static void EvolveCompanion2()
{
((ConfigValueElement<int>)(object)followerevolution).SetValue(((ConfigValueElement<int>)(object)followerevolution).Value + 1);
((ConfigValueElement<int>)(object)followerlevel).SetValue(1);
Object.Destroy((Object)(object)follower);
follower = MakeFollower();
}
public static void StoreCompanion()
{
if (petdead && companionstored && !stored2)
{
Log("check 0 try");
petdead = false;
companionstored = false;
if ((Object)(object)follower != (Object)null)
{
Object.Destroy((Object)(object)follower);
if ((Object)(object)followerhealth != (Object)null)
{
Object.Destroy((Object)(object)followerhealth);
}
}
storebutton.SetLabel("Store pet");
}
Log("check 0 = dead " + petdead + " stored " + companionstored);
if (!petdead && !companionstored && stored2)
{
Log("check 1 try");
companionstored = true;
petdead = true;
if ((Object)(object)follower != (Object)null)
{
Object.Destroy((Object)(object)follower);
if ((Object)(object)followerhealth != (Object)null)
{
Object.Destroy((Object)(object)followerhealth);
}
}
storebutton.SetLabel("Remove pet from storage");
}
if (!petdead || companionstored)
{
stored2 = !stored2;
}
Log("check 1 = dead " + petdead + " stored " + companionstored);
}
public static void GiveCreditsBasedOnEnemyClass(EnemyClass eclass, EnemyType etype, bool isboss, bool countasenemy)
{
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Invalid comparison between Unknown and I4
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Invalid comparison between Unknown and I4
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Invalid comparison between Unknown and I4
//IL_0150: Unknown result type (might be due to invalid IL or missing references)
//IL_0152: Invalid comparison between Unknown and I4
//IL_023c: Unknown result type (might be due to invalid IL or missing references)
//IL_023e: Invalid comparison between Unknown and I4
//IL_0328: Unknown result type (might be due to invalid IL or missing references)
//IL_032a: Invalid comparison between Unknown and I4
//IL_0414: Unknown result type (might be due to invalid IL or missing references)
//IL_0416: Invalid comparison between Unknown and I4
Log("creds " + ((ConfigValueElement<int>)(object)creds).Value);
int @int = MonoSingleton<PrefsManager>.instance.GetInt("difficulty", 1);
if (countasenemy)
{
if ((int)etype != 29 && (int)etype != 18)
{
if (!isboss)
{
if ((int)eclass == 0)
{
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + 1000 * @int);
if ((Object)(object)gotcreds == (Object)null)
{
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 1000 * @int + "<color=yellow>'</color>";
}
else
{
Object.Destroy((Object)(object)gotcreds);
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 1000 * @int + "<color=yellow>'</color>";
}
}
if ((int)eclass == 1)
{
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + 1500 * @int);
if ((Object)(object)gotcreds == (Object)null)
{
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 1500 * @int + "<color=yellow>'</color>";
}
else
{
Object.Destroy((Object)(object)gotcreds);
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 1500 * @int + "<color=yellow>'</color>";
}
}
if ((int)eclass == 2)
{
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + 2000 * @int);
if ((Object)(object)gotcreds == (Object)null)
{
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 2000 * @int + "<color=yellow>'</color>";
}
else
{
Object.Destroy((Object)(object)gotcreds);
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 2000 * @int + "<color=yellow>'</color>";
}
}
if ((int)eclass == 3)
{
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + 3000 * @int);
if ((Object)(object)gotcreds == (Object)null)
{
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 3000 * @int + "<color=yellow>'</color>";
}
else
{
Object.Destroy((Object)(object)gotcreds);
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 3000 * @int + "<color=yellow>'</color>";
}
}
if ((int)eclass == 4)
{
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + 1000 * @int);
if ((Object)(object)gotcreds == (Object)null)
{
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 1000 * @int + "<color=yellow>'</color>";
}
else
{
Object.Destroy((Object)(object)gotcreds);
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 1000 * @int + "<color=yellow>'</color>";
}
}
}
else
{
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + 5000 * @int);
if ((Object)(object)gotcreds == (Object)null)
{
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 5000 * @int + "<color=yellow>'</color>";
}
else
{
Object.Destroy((Object)(object)gotcreds);
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 5000 * @int + "<color=yellow>'</color>";
}
}
}
else
{
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + 10000 * @int);
if ((Object)(object)gotcreds == (Object)null)
{
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 10000 * @int + "<color=yellow>'</color>";
}
else
{
Object.Destroy((Object)(object)gotcreds);
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 10000 * @int + "<color=yellow>'</color>";
}
}
}
else
{
((ConfigValueElement<int>)(object)creds).SetValue(((ConfigValueElement<int>)(object)creds).Value + 100 * @int);
if ((Object)(object)gotcreds == (Object)null)
{
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 100 * @int + "<color=yellow>'</color>";
}
else
{
Object.Destroy((Object)(object)gotcreds);
gotcreds = Object.Instantiate<GameObject>(maincode.FetchFromBundle<GameObject>("assets/formods/petfollower/gotcredits.prefab", autofill: false));
((TMP_Text)((Component)gotcreds.transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>()).text = 100 * @int + "<color=yellow>'</color>";
}
}
Log("class " + ((object)(EnemyClass)(ref eclass)).ToString() + " type " + ((object)(EnemyType)(ref etype)).ToString() + " boss " + isboss + " diff " + @int + " creds " + ((ConfigValueElement<int>)(object)creds).Value);
}
}
}
namespace Follower.OtherCode
{
internal class BeamID : MonoBehaviour
{
}
}