Decompiled source of UltraFishing v2.0.0
UltraFishing/UltraFishing.dll
Decompiled 15 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Steamworks; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Audio; using UnityEngine.Events; 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: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("UltraFishing")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Allows you to fish outside of 5-S")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+8a6fa7d090ebbd7e89345eb75a287d8f904ca64a")] [assembly: AssemblyProduct("UltraFishing")] [assembly: AssemblyTitle("UltraFishing")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } [ExecuteInEditMode] public class Liquid : MonoBehaviour { private Renderer rend; private Vector3 lastPos; private Vector3 velocity; private Vector3 lastRot; private Vector3 angularVelocity; public float MaxWobble = 0.03f; public float WobbleSpeed = 1f; public float Recovery = 1f; private float wobbleAmountX; private float wobbleAmountZ; private float wobbleAmountToAddX; private float wobbleAmountToAddZ; private float pulse; private float time = 0.5f; private void Start() { rend = ((Component)this).GetComponent<Renderer>(); } private void Update() { //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) time += Time.deltaTime; wobbleAmountToAddX = Mathf.Lerp(wobbleAmountToAddX, 0f, Time.deltaTime * Recovery); wobbleAmountToAddZ = Mathf.Lerp(wobbleAmountToAddZ, 0f, Time.deltaTime * Recovery); pulse = (float)Math.PI * 2f * WobbleSpeed; wobbleAmountX = wobbleAmountToAddX * Mathf.Sin(pulse * time); wobbleAmountZ = wobbleAmountToAddZ * Mathf.Sin(pulse * time); rend.sharedMaterial.SetFloat("_WobbleX", wobbleAmountX); rend.sharedMaterial.SetFloat("_WobbleZ", wobbleAmountZ); velocity = (lastPos - ((Component)this).transform.position) / (Time.deltaTime + 0.0001f); Quaternion rotation = ((Component)this).transform.rotation; angularVelocity = ((Quaternion)(ref rotation)).eulerAngles - lastRot; wobbleAmountToAddX += Mathf.Clamp((velocity.x + angularVelocity.z * 0.2f) * MaxWobble, 0f - MaxWobble, MaxWobble); wobbleAmountToAddZ += Mathf.Clamp((velocity.z + angularVelocity.x * 0.2f) * MaxWobble, 0f - MaxWobble, MaxWobble); lastPos = ((Component)this).transform.position; rotation = ((Component)this).transform.rotation; lastRot = ((Quaternion)(ref rotation)).eulerAngles; } } namespace UltraFishing { public class BookRandomizer : MonoBehaviour { private Readable readable; private void Start() { readable = ((Component)this).gameObject.GetComponent<Readable>(); RandomizeText(); } public void RandomizeText() { readable.content = RandomBookTextProvider.GetRandomText(); } public void GetNextText() { readable.content = RandomBookTextProvider.GetNextText(); readable.StartScan(); } } public class FakeWater : MonoBehaviour { public FishDB fishDB; public Transform overrideFishingPoint; public FishObject[] attractFish; public GameObject customSplash; public void SetupFishDB(FishDB fishDB) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)fishDB.fishGhostPrefab != (Object)null) { Bounds bounds = ((Component)this).GetComponent<Collider>().bounds; int num = (int)(((Bounds)(ref bounds)).size.x * ((Bounds)(ref bounds)).size.y / 100f); for (int i = 0; i < num; i++) { GameObject val = Object.Instantiate<GameObject>(fishDB.fishGhostPrefab, ((Component)this).transform, true); val.transform.position = new Vector3(Random.Range((0f - ((Bounds)(ref bounds)).size.x) / 4f, ((Bounds)(ref bounds)).size.x / 4f) + ((Bounds)(ref bounds)).center.x, 0f, Random.Range((0f - ((Bounds)(ref bounds)).size.z) / 4f, ((Bounds)(ref bounds)).size.z / 4f) + ((Bounds)(ref bounds)).center.z); val.transform.position = new Vector3(val.transform.position.x, ((Bounds)(ref bounds)).center.y + Random.Range(-1f, 1f) * (((Bounds)(ref bounds)).size.y / 2f - 0.2f), val.transform.position.z); val.transform.localRotation = Quaternion.Euler(0f, (float)Random.Range(0, 360), 0f); } } } } public class GlobalFishEncyclopedia : FishEncyclopedia { private int currentPage; private List<int> pageIndices = new List<int>(); private List<string> pageTitles = new List<string>(); public GameObject mannequinFishDescription; public void StartEncyclopedia() { //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown ((Component)base.fishButtonTemplate).gameObject.SetActive(false); FishCollection[] fishCollections = GlobalFishManager.GetFishCollections(); foreach (FishCollection fishCollection in fishCollections) { pageIndices.Add(base.fishGrid.childCount); pageTitles.Add(fishCollection.name); int num = base.fishGrid.childCount; foreach (FishData fish2 in fishCollection.fishes) { FishObject fish = fish2.fish; bool found = fish2.found; FishMenuButton val = Object.Instantiate<FishMenuButton>(base.fishButtonTemplate, base.fishGrid, false); base.fishButtons.Add(fish, val); val.Populate(fish, !found); ((UnityEventBase)((Component)val).GetComponent<ControllerPointer>().OnPressed).RemoveAllListeners(); ((Component)val).GetComponent<ControllerPointer>().OnPressed.AddListener((UnityAction)delegate { SelectFish(fish); }); if (base.fishGrid.childCount == num + 13) { pageIndices.Add(base.fishGrid.childCount - 1); pageTitles.Add(fishCollection.name); num = base.fishGrid.childCount - 1; } } } FishManager instance = MonoSingleton<FishManager>.Instance; instance.onFishUnlocked = (Action<FishObject>)Delegate.Combine(instance.onFishUnlocked, new Action<FishObject>(base.OnFishUnlocked)); currentPage = 0; DisplayCurrentPage(); } private void DisplayCurrentPage() { int num = pageIndices[currentPage]; int num2 = ((pageIndices.Count != currentPage + 1) ? pageIndices[currentPage + 1] : base.fishGrid.childCount); for (int i = 1; i < base.fishGrid.childCount; i++) { if (i >= num && i < num2) { ((Component)base.fishGrid.GetChild(i)).gameObject.SetActive(true); } else { ((Component)base.fishGrid.GetChild(i)).gameObject.SetActive(false); } } ChangeTitle(); } public void NextPage() { if (currentPage + 1 < pageIndices.Count) { currentPage++; DisplayCurrentPage(); } } public void PreviousPage() { if (currentPage > 0) { currentPage--; DisplayCurrentPage(); } } private void ChangeTitle() { string text = pageTitles[currentPage]; Transform child = base.fishGrid.parent.GetChild(0); ((TMP_Text)((Component)child).GetComponent<TextMeshProUGUI>()).text = text; } private void DisplayFish(FishObject fish) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) foreach (Transform item in base.fish3dRenderContainer.transform) { Transform val = item; Object.Destroy((Object)(object)((Component)val).gameObject); } if (GlobalFishManager.FoundFish(fish)) { GameObject val2 = fish.InstantiateDumb(); val2.transform.SetParent(base.fish3dRenderContainer.transform); val2.transform.localPosition = Vector3.zero; val2.transform.localScale = Vector3.one; SandboxUtils.SetLayerDeep(val2.transform, LayerMask.NameToLayer("VirtualRender")); } } public void SelectFish(FishObject fish) { base.fishName.text = (GlobalFishManager.FoundFish(fish) ? fish.fishName : "???"); if (fish.fishName == "Mannequin Fish") { mannequinFishDescription.SetActive(true); base.fishDescription.text = ""; } else { mannequinFishDescription.SetActive(false); base.fishDescription.text = GlobalFishManager.GetFishDescription(fish); } base.fishPicker.SetActive(false); base.fishInfoContainer.SetActive(true); DisplayFish(fish); } } public class LateSetWater : MonoBehaviour { public List<string> Fish = new List<string>(); public string WaterName = "ERROR: NAME UNASSIGNED"; public Color color = Color.magenta; public List<Transform> Water = new List<Transform>(); private bool triggered = false; public LateSetWater Addfish(string fish) { Fish.Add(fish); return this; } public LateSetWater AddObject(Transform water) { Water.Add(water); return this; } private void OnEnable() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (triggered) { return; } foreach (Transform item in Water) { WaterBuilder.SetWater(((Component)item).transform).AddFishes(Fish).SetUp(WaterName, color); } triggered = true; } } public class MaterialSwapper : MonoBehaviour { public Material mat; public List<string> ignoreLevels; public int layer; private void Start() { Renderer component = ((Component)this).GetComponent<Renderer>(); if ((layer == -1 || ((Component)this).gameObject.layer == layer) && !ignoreLevels.Exists((string s) => s == SceneHelper.CurrentScene)) { component.material = mat; } } } public class NewFishingRod : FishingRodWeapon { private static FakeWater currentFakeWater; public void OnDisable() { ((FishingRodWeapon)this).ResetFishing(); MonoSingleton<FishingHUD>.Instance.SetState((FishingRodState)0); } public void FishCaughtAndGrabbed() { base.animator.SetTrigger(FishingRodWeapon.Idle); MonoSingleton<FishingHUD>.Instance.ShowFishCaught(true, base.hookedFishe.fish); CreateFishPickup(base.fishPickupTemplate, base.hookedFishe.fish, grab: true); ((FishingRodWeapon)this).ResetFishing(); } public void ThrowBaitEvent() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.spawnedBaitCon == (Object)null) { base.spawnedBaitCon = Object.Instantiate<FishBait>(base.baitPrefab, base.rodTip.position, Quaternion.identity, base.rodTip); base.spawnedBaitCon.landed = false; if ((Object)(object)currentFakeWater != (Object)null && (Object)(object)currentFakeWater.customSplash != (Object)null) { base.spawnedBaitCon.splashPrefab = currentFakeWater.customSplash; } base.spawnedBaitCon.ThrowStart(((Component)base.targetingCircle).transform.position, base.rodTip, (FishingRodWeapon)(object)this); } } public static GameObject CreateFishPickup(ItemIdentifier template, FishObject fish, bool grab, bool unlock = true) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Invalid comparison between Unknown and I4 //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Invalid comparison between Unknown and I4 //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Invalid comparison between Unknown and I4 //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Invalid comparison between Unknown and I4 if (unlock) { MonoSingleton<FishManager>.Instance.UnlockFish(fish); } ItemIdentifier val; if ((Object)(object)fish.customPickup != (Object)null) { val = Object.Instantiate<ItemIdentifier>(fish.customPickup); if (!Object.op_Implicit((Object)(object)((Component)val).GetComponent<FishObjectReference>())) { ((Component)val).gameObject.AddComponent<FishObjectReference>().fishObject = fish; } } else { val = Object.Instantiate<ItemIdentifier>(template); ((Component)val).gameObject.AddComponent<FishObjectReference>().fishObject = fish; Transform transform = ((Component)((Component)val).transform.GetChild(0)).transform; Vector3 localPosition = transform.localPosition; Quaternion localRotation = transform.localRotation; Vector3 localScale = transform.localScale; Object.Destroy((Object)(object)((Component)transform).gameObject); GameObject val2 = fish.InstantiateDumb(); val2.transform.SetParent(((Component)val).transform); val2.transform.localPosition = localPosition; val2.transform.localRotation = localRotation; val2.transform.localScale = localScale; } if (grab) { ItemIdentifier heldObject = MonoSingleton<FistControl>.Instance.heldObject; if ((Object)(object)heldObject == (Object)null) { MonoSingleton<FistControl>.Instance.currentPunch.ResetHeldState(); MonoSingleton<FistControl>.Instance.currentPunch.ForceHold(val); return ((Component)val).gameObject; } ItemType itemType = heldObject.itemType; ItemType val3 = itemType; if ((int)val3 <= 4) { if ((int)val3 == 0 || (int)val3 == 4) { goto IL_017b; } } else if ((int)val3 == 6 || (int)val3 == 10) { goto IL_017b; } MonoSingleton<FistControl>.Instance.currentPunch.ResetHeldState(); MonoSingleton<FistControl>.Instance.currentPunch.ForceHold(val); MonoSingleton<FistControl>.Instance.currentPunch.ForceDrop(); MonoSingleton<FistControl>.Instance.currentPunch.ResetHeldState(); MonoSingleton<FistControl>.Instance.currentPunch.ForceHold(heldObject); } goto IL_0209; IL_0209: return ((Component)val).gameObject; IL_017b: Object.Destroy((Object)(object)((Component)MonoSingleton<FistControl>.Instance.heldObject).gameObject); MonoSingleton<FistControl>.Instance.currentPunch.ResetHeldState(); MonoSingleton<FistControl>.Instance.currentPunch.ForceHold(val); goto IL_0209; } public void NewUpdate() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected I4, but got Unknown //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0625: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0792: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) if (GameStateManager.Instance.PlayerInputLocked || MonoSingleton<InputManager>.Instance.PerformingCheatMenuCombo()) { return; } if (TimeSince.op_Implicit(MonoSingleton<FishingHUD>.Instance.timeSinceFishCaught) >= 1f && (MonoSingleton<InputManager>.Instance.InputSource.Punch.WasPerformedThisFrame || MonoSingleton<InputManager>.Instance.InputSource.Fire1.WasPerformedThisFrame)) { MonoSingleton<FishingHUD>.Instance.ShowFishCaught(false, (FishObject)null); } MonoSingleton<FishingHUD>.Instance.SetState(base.state); FishingRodState state = base.state; FishingRodState val = state; switch ((int)val) { case 0: if (MonoSingleton<InputManager>.Instance.InputSource.Fire1.WasPerformedThisFrame && TimeSince.op_Implicit(base.timeSinceAction) > 0.1f) { MonoSingleton<FishingHUD>.Instance.SetPowerMeter(0f, false); base.selectedPower = 0f; base.climaxed = false; base.fishHooked = false; base.baitThrown = false; base.state = (FishingRodState)1; base.targetingCircle = Object.Instantiate<FishingRodTarget>(base.targetPrefab, ((FishingRodWeapon)this).approximateTargetPosition, Quaternion.identity); base.timeSinceAction = TimeSince.op_Implicit(0f); } break; case 1: { base.selectedPower += (Time.deltaTime * 0.4f + base.selectedPower * 0.01f) * (base.climaxed ? (-0.5f) : 1f); if (base.selectedPower > 1f) { base.selectedPower = 1f; base.climaxed = true; } if (base.selectedPower < 0.1f) { base.climaxed = false; } Vector3 val2 = ((FishingRodWeapon)this).approximateTargetPosition; bool flag = false; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2 + Vector3.up * 3f, Vector3.down, ref val3, 30f)) { val2 = ((RaycastHit)(ref val3)).point; Water val4 = default(Water); FakeWater fakeWater = default(FakeWater); if (((Component)((RaycastHit)(ref val3)).collider).TryGetComponent<Water>(ref val4) && Object.op_Implicit((Object)(object)val4.fishDB)) { base.currentFishPool = val4.fishDB; base.currentWater = val4; flag = true; if (Object.op_Implicit((Object)(object)val4.overrideFishingPoint)) { val2 = val4.overrideFishingPoint.position; } } else if (((Component)((RaycastHit)(ref val3)).collider).TryGetComponent<FakeWater>(ref fakeWater) && Object.op_Implicit((Object)(object)fakeWater.fishDB)) { base.currentFishPool = fakeWater.fishDB; currentFakeWater = fakeWater; flag = true; if (Object.op_Implicit((Object)(object)fakeWater.overrideFishingPoint)) { val2 = fakeWater.overrideFishingPoint.position; } } else { base.currentFishPool = null; base.currentWater = null; currentFakeWater = null; flag = false; } } else { base.currentFishPool = null; base.currentWater = null; currentFakeWater = null; flag = false; } MonoSingleton<FishingHUD>.Instance.SetPowerMeter(base.selectedPower, flag); if (flag) { ((Component)base.targetingCircle).transform.position = val2 + Vector3.up * 0.5f; base.targetingCircle.SetState(true, Vector3.Distance(((RaycastHit)(ref val3)).point, ((Component)MonoSingleton<NewMovement>.Instance).transform.position)); base.targetingCircle.waterNameText.text = base.currentFishPool.fullName; ((Graphic)base.targetingCircle.waterNameText).color = base.currentFishPool.symbolColor; } else { ((Component)base.targetingCircle).transform.position = val2 + Vector3.up * 0.5f; base.targetingCircle.SetState(false, Vector3.Distance(((RaycastHit)(ref val3)).point, ((Component)MonoSingleton<NewMovement>.Instance).transform.position)); base.targetingCircle.waterNameText.text = ""; } ((Component)base.targetingCircle).transform.forward = ((Component)MonoSingleton<NewMovement>.Instance).transform.forward; if (MonoSingleton<InputManager>.Instance.InputSource.Fire1.WasCanceledThisFrame && TimeSince.op_Implicit(base.timeSinceAction) > 0.1f) { if (flag) { ((Component)base.targetingCircle).GetComponent<Animator>().SetTrigger(FishingRodWeapon.Set); base.animator.ResetTrigger(FishingRodWeapon.Throw); base.state = (FishingRodState)2; base.timeSinceAction = TimeSince.op_Implicit(0f); } else { ((FishingRodWeapon)this).ResetFishing(); } } break; } case 2: ((Component)base.targetingCircle).transform.forward = ((Component)MonoSingleton<NewMovement>.Instance).transform.forward; base.fishHooked = false; if (!base.baitThrown) { base.baitThrown = true; base.animator.SetTrigger(FishingRodWeapon.Throw); } if (Object.op_Implicit((Object)(object)base.spawnedBaitCon) && base.spawnedBaitCon.landed) { base.state = (FishingRodState)3; base.timeSinceBaitInWater = TimeSince.op_Implicit(0f); base.distanceAfterThrow = Vector3.Distance(((Component)MonoSingleton<NewMovement>.Instance).transform.position, base.spawnedBaitCon.baitPoint.position); Object.Destroy((Object)(object)((Component)base.targetingCircle).gameObject); } break; case 3: base.baitThrown = false; if (Vector3.Distance(((Component)MonoSingleton<NewMovement>.Instance).transform.position, base.spawnedBaitCon.baitPoint.position) > base.distanceAfterThrow + 30f) { Object.Destroy((Object)(object)((Component)base.spawnedBaitCon).gameObject); MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Fishing interrupted", "", "", 0, false, false, true); ((FishingRodWeapon)this).ResetFishing(); break; } if (!base.fishHooked && Random.value < 0.002f + TimeSince.op_Implicit(base.timeSinceBaitInWater) * 0.01f) { if ((Object)(object)base.currentWater == (Object)null) { base.hookedFishe = base.currentFishPool.GetRandomFish(currentFakeWater.attractFish); } else { base.hookedFishe = base.currentFishPool.GetRandomFish(base.currentWater.attractFish); } if (base.hookedFishe == null) { if (!base.noFishErrorDisplayed) { base.noFishErrorDisplayed = true; MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Nothing seems to be biting here...", "", "", 0, false, false, true); } break; } if ((Object)(object)base.currentWater == (Object)null) { currentFakeWater.attractFish = null; } else { base.currentWater.attractFish = null; } base.fishHooked = true; MonoSingleton<FishingHUD>.Instance.SetFishHooked(true); base.spawnedBaitCon.FishHooked(); } if (MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed || MonoSingleton<InputManager>.Instance.InputSource.Fire2.IsPressed) { base.animator.SetTrigger(FishingRodWeapon.Pull); if (base.fishHooked) { MonoSingleton<FishingHUD>.Instance.SetFishHooked(false); base.state = (FishingRodState)4; base.spawnedBaitCon.CatchFish(base.hookedFishe.fish); } else { Object.Destroy((Object)(object)((Component)base.spawnedBaitCon).gameObject); base.animator.SetTrigger(FishingRodWeapon.Idle); base.animator.ResetTrigger(FishingRodWeapon.Throw); base.animator.Play(FishingRodWeapon.Idle); ((FishingRodWeapon)this).ResetFishing(); } } break; case 4: base.fishDesirePosition = Mathf.PerlinNoise(Time.time * 0.3f, 0f); base.fishTolerance = 0.1f + 0.4f * Mathf.PerlinNoise(Time.time * 0.4f, 0f); if (MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed) { base.playerPositionVelocity += 1.9f * Time.deltaTime; base.animator.SetTrigger(FishingRodWeapon.Pull); } else if (MonoSingleton<InputManager>.Instance.InputSource.Fire2.IsPressed) { base.playerPositionVelocity -= 1.9f * Time.deltaTime; base.animator.SetTrigger(FishingRodWeapon.Pull); } else { base.playerPositionVelocity *= 1f - 2f * Time.deltaTime; } base.playerProvidedPosition += base.playerPositionVelocity * Time.deltaTime; if (base.playerProvidedPosition > 1f) { base.playerProvidedPosition = 1f; base.playerPositionVelocity = 0f - base.playerPositionVelocity; } if (base.playerProvidedPosition < 0f) { base.playerProvidedPosition = 0f; base.playerPositionVelocity = 0f - base.playerPositionVelocity; } MonoSingleton<FishingHUD>.Instance.SetPlayerStrugglePosition(base.playerProvidedPosition); MonoSingleton<FishingHUD>.Instance.SetStruggleSatisfied(((FishingRodWeapon)this).struggleSatisfied); MonoSingleton<FishingHUD>.Instance.SetFishDesire(Mathf.Clamp01(((FishingRodWeapon)this).topBound), Mathf.Clamp01(((FishingRodWeapon)this).bottomBound)); base.spawnedBaitCon.allowedToProgress = ((FishingRodWeapon)this).struggleSatisfied; MonoSingleton<FishingHUD>.Instance.SetStruggleProgress(base.spawnedBaitCon.flyProgress, base.hookedFishe.fish.blockedIcon, base.hookedFishe.fish.icon); break; } } } public class FishCollection { public string name; public List<FishData> fishes; public FishCollection(string name) { this.name = name; fishes = new List<FishData>(); } public void RegisterFish(FishObject fish, string savePath, int saveSlot) { FishData item = new FishData(fish, savePath, saveSlot); fishes.Add(item); } public bool FoundAll() { foreach (FishData fish in fishes) { if (!fish.found) { return false; } } return true; } } public class FishData { public FishObject fish; public string savePath; public int saveSlot; public bool found; public FishData(FishObject fish, string savePath, int saveSlot) { this.fish = fish; this.savePath = savePath; this.saveSlot = saveSlot; found = SaveHelper.ReadFromSave(savePath, saveSlot) == 1; } public void Unlock() { if (!found) { found = true; SaveHelper.WriteToSave(savePath, saveSlot, 1); } } } public static class GlobalFishManager { private static Dictionary<string, FishData> fishes = new Dictionary<string, FishData>(); private static List<FishCollection> collections = new List<FishCollection>(); public static void RegisterCollection(FishCollection collection) { collections.Add(collection); foreach (FishData fish in collection.fishes) { fishes.Add(fish.fish.fishName, fish); } } public static void Start() { //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) string savePath = Path.Combine(Plugin.modDir, "fish.save"); (string, int)[] array = new(string, int)[12] { ("Assets/Data/Fishing/Fishes/Funny Stupid Fish.asset", 0), ("Assets/Data/Fishing/Fishes/pitr fish.asset", 1), ("Assets/Data/Fishing/Fishes/Trout.asset", 2), ("Assets/Data/Fishing/Fishes/Amid Evil Fish.asset", 3), ("Assets/Data/Fishing/Fishes/Chomper.asset", 4), ("Assets/Data/Fishing/Fishes/Bomb Fish.asset", 5), ("Assets/Data/Fishing/Fishes/Gib Eye.asset", 6), ("Assets/Data/Fishing/Fishes/Iron Lung Fish.asset", 7), ("Assets/Data/Fishing/Fishes/Dope Fish.asset", 8), ("Assets/Data/Fishing/Fishes/Stickfish.asset", 9), ("Assets/Data/Fishing/Fishes/Cooked Fish.asset", 10), ("Assets/Data/Fishing/Fishes/Shark.asset", 11) }; (string, int)[] array2 = new(string, int)[24] { ("assets/bundles/fishingstuff/fishes/filth fish.asset", 12), ("assets/bundles/fishingstuff/fishes/sword fish.asset", 25), ("assets/bundles/fishingstuff/fishes/wire shark.asset", 26), ("assets/bundles/fishingstuff/fishes/overcooked fish.asset", 20), ("assets/bundles/fishingstuff/fishes/missing fish.asset", 13), ("assets/bundles/fishingstuff/fishes/nil fish.asset", 27), ("assets/bundles/fishingstuff/fishes/nan fish.asset", 28), ("assets/bundles/fishingstuff/fishes/coin fish.asset", 22), ("assets/bundles/fishingstuff/fishes/cancer fish.asset", 14), ("assets/bundles/fishingstuff/fishes/flying demon fish.asset", 29), ("assets/bundles/fishingstuff/fishes/vapor fish.asset", 30), ("assets/bundles/fishingstuff/fishes/plastic fish.asset", 31), ("assets/bundles/fishingstuff/fishes/koi fish.asset", 15), ("assets/bundles/fishingstuff/fishes/melted fish.asset", 16), ("assets/bundles/fishingstuff/fishes/ancient fish.asset", 32), ("assets/bundles/fishingstuff/fishes/nerd shark.asset", 17), ("assets/bundles/fishingstuff/fishes/wine fish.asset", 33), ("assets/bundles/fishingstuff/fishes/leviathan fish.asset", 18), ("assets/bundles/fishingstuff/fishes/mannequin fish.asset", 34), ("assets/bundles/fishingstuff/fishes/tasty fish.asset", 35), ("assets/bundles/fishingstuff/fishes/book fish.asset", 23), ("assets/bundles/fishingstuff/fishes/frozen fish.asset", 21), ("assets/bundles/fishingstuff/fishes/death metal fish.asset", 19), ("assets/bundles/fishingstuff/fishes/prime fish.asset", 36) }; string text = "assets/bundles/fishingstuff/fishes/png fish.asset"; int saveSlot = 24; FishCollection fishCollection = new FishCollection("ULTRAKILL"); for (int i = 0; i < array.Length; i++) { FishObject fish = Addressables.LoadAssetAsync<FishObject>((object)array[i].Item1).WaitForCompletion(); int item = array[i].Item2; fishCollection.RegisterFish(fish, savePath, item); } FishCollection fishCollection2 = new FishCollection("ULTRAFISHING"); for (int j = 0; j < array2.Length; j++) { FishObject fish2 = Plugin.bundle.LoadAsset<FishObject>(array2[j].Item1); int item2 = array2[j].Item2; fishCollection2.RegisterFish(PrepareFish(fish2), savePath, item2); } FishCollection fishCollection3 = new FishCollection("???"); FishObject fish3 = Plugin.bundle.LoadAsset<FishObject>(text); fishCollection3.RegisterFish(fish3, savePath, saveSlot); RegisterCollection(fishCollection); RegisterCollection(fishCollection2); RegisterCollection(fishCollection3); } private static FishObject PrepareFish(FishObject fish) { switch (fish.fishName) { case "Wise Fish": ((Component)fish.customPickup).gameObject.AddComponent<BookRandomizer>(); break; case "Poisson de Vin": ((Component)fish.worldObject.transform.Find("Liquid")).gameObject.AddComponent<Liquid>(); break; case "NaN": { MaterialSwapper materialSwapper2 = ((Component)fish.worldObject.transform.GetChild(1)).gameObject.AddComponent<MaterialSwapper>(); materialSwapper2.mat = Plugin.bundle.LoadAsset<Material>("Assets/Bundles/fishingstuff/Skyboxes/FakeOldScreenField.mat"); materialSwapper2.layer = 28; materialSwapper2.ignoreLevels = new List<string>(new string[5] { "Level 1-1", "Level 1-2", "Level 1-3", "Level 1-4", "Level 1-E" }); break; } case "Prime Fish": { MaterialSwapper materialSwapper = ((Component)fish.worldObject.transform.GetChild(0)).gameObject.AddComponent<MaterialSwapper>(); materialSwapper.mat = Plugin.bundle.LoadAsset<Material>("Assets/Bundles/fishingstuff/MinosPrimeBody.mat"); materialSwapper.layer = -1; materialSwapper.ignoreLevels = new List<string>(new string[1] { "Level P-2" }); break; } } return fish; } public static void UnlockFish(FishObject fish) { if (!fishes.ContainsKey(fish.fishName)) { Plugin.logger.LogError((object)("Fish " + fish.fishName + " could not be found!")); return; } FishData fishData = fishes[fish.fishName]; fishData.Unlock(); UpdateSize2(); } public static FishObject GetFish(string fishName) { return fishes[fishName].fish; } public static bool FoundFish(FishObject fish) { return fishes[fish.fishName].found; } public static FishCollection[] GetFishCollections() { return collections.ToArray(); } public static string GetFishDescription(FishObject fish) { if (FoundFish(fish)) { return fish.description; } return fish.fishName switch { "null" => "An ordinary and very real fish. Native to the beautiful paradise known as Limbo.\n\nUsually found where the water falls.", "NaN" => "A local delicacy, enjoyed by the happy residents of the peaceful Limbo layer.\n\nUsually found where the water pools.", "Nil" => "A very normal fish. You could find similar fish to this one anywhere. Resides in the idyllic and luxurious Limbo layer.\n\nUsually found where the water flows.", "\"size 2\"" => "The legendary fish. The dream of all fishers, yet none have ever caught it. It is said to only appear to expert fishers who have caught every kind of fish.\n\nThe waterfall conceals the water UPS. Agnes Gorge Trail. Use your ability and fulfill your destiny.", _ => fish.description, }; } public static int Size2Chance() { if (collections[0].FoundAll() && collections[1].FoundAll()) { return 1; } return 0; } public static void UpdateSize2() { if (!(SceneHelper.CurrentScene == "Level 7-S") || Size2Chance() != 1) { return; } string gameObjectPath = "7-S_Unpaintable/Exterior/The Water Ups_Todo/The Water Ups/Water Ups Ocean"; GameObject val = GenericHelper.FindGameObject(gameObjectPath); if (!((Object)(object)val == (Object)null)) { FakeWater component = val.GetComponent<FakeWater>(); if (!((Object)(object)component == (Object)null)) { FishDescriptor[] foundFishes = component.fishDB.foundFishes; foundFishes[0].chance = 1; } } } } public static class FishHelper { public static FishObject GetFish(string fishName) { return GlobalFishManager.GetFish(fishName); } private static FishDB GetFishDB(FishDescriptor[] fishes) { FishDB val = ScriptableObject.CreateInstance<FishDB>(); val.foundFishes = fishes; return val; } private static FishDB GetFishDB(string[] fishes, int[] chances) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown FishDescriptor[] array = (FishDescriptor[])(object)new FishDescriptor[fishes.Length]; for (int i = 0; i < fishes.Length; i++) { array[i] = new FishDescriptor(); array[i].fish = GetFish(fishes[i]); array[i].chance = chances[i]; } return GetFishDB(array); } private static FishDB GetFishDB(string[] fishes) { int[] array = new int[fishes.Length]; for (int i = 0; i < array.Length; i++) { array[i] = 1; } return GetFishDB(fishes, array); } public static FishDB GetFishDB(string fish, int chance = 1) { return GetFishDB(new string[1] { fish }, new int[1] { chance }); } public static FishDB AddFishToDB(FishDB fishDB, string fish, int chance = 1) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) FishDescriptor val = new FishDescriptor(); val.fish = GetFish(fish); val.chance = chance; FishDescriptor[] fishes = GenericHelper.AppendToArray(fishDB.foundFishes, val); FishDB fishDB2 = GetFishDB(fishes); fishDB2.fullName = fishDB.fullName; fishDB2.symbolColor = fishDB.symbolColor; return fishDB2; } public static void UpdateFishManager(FishDB fishDB) { MonoSingleton<FishManager>.Instance.fishDbs = GenericHelper.AppendToArray(MonoSingleton<FishManager>.Instance.fishDbs, fishDB); for (int i = 0; i < fishDB.foundFishes.Length; i++) { FishObject fish = fishDB.foundFishes[i].fish; if (!MonoSingleton<FishManager>.Instance.recognizedFishes.ContainsKey(fish)) { MonoSingleton<FishManager>.Instance.recognizedFishes.Add(fish, value: false); } } } } public static class GenericHelper { public static T[] AppendToArray<T>(T[] array, T element) { if (array == null || array.Length == 0) { return new T[1] { element }; } T[] array2 = new T[array.Length + 1]; for (int i = 0; i < array.Length; i++) { array2[i] = array[i]; } array2[array.Length] = element; return array2; } public static GameObject FindGameObject(string gameObjectPath) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find(gameObjectPath); if ((Object)(object)val != (Object)null) { return val; } Scene activeScene = SceneManager.GetActiveScene(); GameObject[] rootGameObjects = ((Scene)(ref activeScene)).GetRootGameObjects(); string[] parts = gameObjectPath.Split(new char[1] { '/' }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < parts.Length; i++) { parts[i] = parts[i].Replace("%", "/"); } int num = Array.FindIndex(rootGameObjects, (GameObject o) => ((Object)o).name == parts[0]); if (num == -1) { return null; } GameObject val2 = rootGameObjects[num]; if (parts.Length == 1) { return val2; } string[] array = new string[parts.Length - 1]; Array.Copy(parts, 1, array, 0, array.Length); string text = string.Join("/", array); Transform obj = val2.transform.Find(text); return (obj != null) ? ((Component)obj).gameObject : null; } public static GameObject FindGameObjectContaining(string gameObjectNameSubstring) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); GameObject[] rootGameObjects = ((Scene)(ref activeScene)).GetRootGameObjects(); int num = Array.FindIndex(rootGameObjects, (GameObject o) => ((Object)o).name.Contains(gameObjectNameSubstring)); if (num == -1) { return null; } return rootGameObjects[num]; } public static GameObject[] FindGameObjectChildren(string gameObjectPath) { GameObject val = FindGameObject(gameObjectPath); if ((Object)(object)val == (Object)null) { return null; } int childCount = val.transform.childCount; GameObject[] array = (GameObject[])(object)new GameObject[childCount]; for (int i = 0; i < childCount; i++) { array[i] = ((Component)val.transform.GetChild(i)).gameObject; } return array; } public static string GetFullPath(GameObject gameObject) { Transform val = gameObject.transform; string text = ((Object)gameObject).name; while ((Object)(object)val.parent != (Object)null) { val = val.parent; text = ((Object)val).name + "/" + text; } return text; } public static string GetSteamName() { try { if (SteamClient.IsLoggedOn) { return SteamClient.Name; } return "V1"; } catch (Exception) { return "V1"; } } } public static class RandomBookTextProvider { private static Random rand = new Random(); private static int currentText = 0; private static string creditsText = "Congratulations on finding the secret <color=blue>ULTRAFISHING</color> credits book! \n\nSomeone told me it'd be cool to have something like this in the dev museum, so thanks for the idea.\n\n<b><color=orange>earthling on fire</color> - ORIGINAL CREATOR OF <color=blue>ULTRAFISHING</color></b>\n\nThis mod took a very long time to make, and development went on hiatus multiple times. But somehow, I managed to release it.\n\nI learned a ton while working on this project and did a ton of stuff outside my usual \"comfort zone\". But most importantly, I had fun making it, and I hope you had fun playing it too.\n\nMy contributions include:\n<size=18>\n- Every custom fish in release 1.0.\n- The fishing rod icon.\n- Most of the code that makes this mod work.\n</size>\n<color=orange><i>\"i only say morning because if it were a good morning i'd be fishing\"</i></color>\n\n<b><color=green>Draghtnim</color> - DEVELOPER</b>\n\nDraghtnim joined development shortly after the initial release of the mod. He didn't like how the melted fish looked like, so he made his own revamped version and sent it to me. After that, he just started making new fishes for the mod and before I knew it he was a proper developer on the mod. \n\nUnlike me, he has a ton of experience with Rude editor, so if you see anything that looks good, it was probably made by him. \n\nAlso make sure to check out his mods as well. Did you know <color=red>deltaKILL</color> is compatible with <color=blue>ULTRAFISHING</color>?\n\nHis contributions include:\n<size=18>\n- Every custom fish for release 2.0.\n- The revamped versions of the older fishes and some revamped icons.\n- Anything that has to do with shaders, including fixing the visual bugs of the initial release.\n- The fishing rod draw animation.\n- A ton of fishing spots.\n- Some of the programming.\n</size>\n<color=green><i>\"how in the fuck did I develop half the fish I was just annoyed about the melted fish\"</i></color>\n\n<b>SPECIAL THANKS</b>\n\nCOOL PEOPLE ON DISCORD - advice, feedback and suggestions\n\nPOOT MAN - playtesting\n\nPITR - really robust fishing code that was surprisingly easy to work with\n\nHAKITA - cool game i guess"; private static string[] texts = new string[20] { "\n\n\n\n\n\n\n<align=center>You caught Fish!!\n\n\n<><\n\n\n<b>SIZE: 1</b></align>", "<align=center><b>QUOTE OF THE DAY:</b>\n\n\n\"i only say morning because if it were a good morning i'd be fishing\" \n- local fishing enthusiast</align>", "<align=center><b>TIP OF THE DAY:</b>\n\n\n\"The waterfall conceals the water UPS. Agnes Gorge Trail. Use your ability.\"", "<align=\"center\"><b>TESTAMENT IV\n\n\n\"FATHER, WHY ETERNAL TORMENT? IS IT NOT CRUEL?\nIS TORTURE UNENDING TRULY A FATE FIT FOR A FOOL?\"\n\n\nAN ANGEL SO BRIGHT AND BEAUTIFUL ASKED ME THIS... \nAND I COULD FIND NO ANSWER\nFOR I COULD NEVER FACE THE GUILT OF WHAT I'D DONE...\nMY REGRET, A GNAWING CANCER\n\n\nIN MY HOUR OF WEAKNESS, TERROR POSSESSED ME THEN\nAND I CAST LUCIFER, TOO, INTO THE INFERNAL DEN\n\n\nONCE I REALIZED WHAT I HAD JUST DONE...\nI COULD ONLY WEEP\nAS I SANK SLOWLY INTO DEPTHS OF DESPAIR...\nDEEP, OH SO DEEP</b></align>", "If you can read this, please help. I've been stranded on an island off the shore for weeks now, and I'm running out of supplies.\n\n\nI was drawn to ride the waves in hopes of finding the legendary size 2 fish. I had combed every inch of land and lake with no avail.\n\n\nI deduced that they must exist far out at sea, so I set sail with a month's worth of cooked fish, but the waves sank my ship before I could find anything.\n\n\nYou're my last hope.\n\n\nSet sail towards the big dipper, you will find me on an island there. Bring me more fish and then leave so I may continue my search.\n\n\nTHE SIZE 2 FISH IS MINE.", "<size=20>ive figured it out. i know why the creatures are suddenly and undetectably appe\naring inside our facilities. i know why spare parts and pieces of machines keep \ndisappearing. i know why the doors seem to malfunction and suddenly lock themsel\nves. its not a glitch in the system. its... \n \n \n hell is alive. it breathes. it thinks. the entire area is a massive intellig\nent superorganism and it is harsh and it is cruel. just by watching us it has le\narned how our systems and machines work. it has not only begun to deconstruct ou\nr technology but also reassemble it in perverse ways, attaching parts to the cre\natures it tortures, making them into an aimless army of death and destruction. i\nt warps them across itself to get them past our security. it locks our doors to \ntrap us with them. \n \n \n this is not an attack. this is not a defence. this is entertainment. this is\n an exhibition of death and cruelty and suffering for its own sake. it had grown\n tired of what it had and we unwillingly just offered ourselves up as new playth\nings. \n \n \n tom please for the love of god cancel this project immediately, we have to a\nbandon everything and seal this place away. leave the machines and tools behind.\n evacuate as many as we can, before it is too late. \n \n \n i can only hope this encrypted message is received before the organism learn\ns to read it and intercept it. whatever happens, we can not let this being find \na way out and spread to the surface. we ha \n \n \n \n \n \n \n \n \n \n \n<b><color=\"red\">a n o t h e r d i e s . b r i n g m e m o r e . i h u n g e r", "<b>EXCERPT FROM THE DIARY OF \"THE PRETTIEST GIRL IN TOWN\"</b>\n\nThe human mind, in its complete vastness, is capable of recognizing its utter helplessness and uselessness in the face of inevitable and unavoidable non-existence, but is incapable of coming to terms with it.\n\nWe can only ever ignore it, hide from it or temporarily escape from it, but the fact is that we are bound to the way of all things.\n\nDeath is unavoidable, not only to us, but all that exists or ever has existed. Every living being will eventually die out. Every speck of matter will eventually wither away and dissipate into entropy.\n\nIt doesn't matter if you lived a good life or if you left a legacy behind. It doesn't matter if humanity survives for a thousand years or dies out tomorrow. The end result is the same: the absolute nothing.\n\nHuman intelligence is far beyond that of other animals, but it would be misguided to consider that a gift. <All other beings have the gift of ignorance, of not understanding what we do.\n\nOur intelligence is not a gift. It's a flaw.\n\nIt's an over-extension of evolution. Intelligence, once a great feature in aeons past, continued to grow unchecked and unfiltered, and has since passed a threshold whereupon it is no longer a benefit, but an active danger to its host.\n\nMuch like the Irish elk, a species of deer that, through uncountable generations of evolution, grew antlers so wide and vast that it could no longer run from predators, eventually leading to extinction.\n\nThe human mind is an evolutionary maladaptation caused by going too far in one direction that was once beneficial and will, sooner or later, lead to our extinction. On an individual level, it's already happening.\n\nExistential dread is already taking hold. I'm sure you've felt it too. The pain and fear of being nothing, becoming nothing. The suffering of understanding that.\n\nWe are unable to come to terms with it, so we hide from our own intelligence. We set limits. We stop ourselves from thinking deeply about what will happen when we die.\n\nWe create distractions. We keep our minds busy with mundane activities and entertainment to stop ourselves from having to come face-to-face with the truth.\n\nWe sublimate it. We transform our self-reflective suffering into another form, art, to keep it from consuming us. Anything to avoid the panic.\n\nBut these ways are all simply temporary. They’re just there to push back the inevitable veil of helplessness and despair that would encompass and ruin us.\n\nIn the end, nothing matters. There's no point in trying to find joy in life, for life in and of itself is suffering.\n", "Disgrace. Humiliation. Unseemly and unwelcome at the feet of The Council. Their eyes ablaze with bitter resentment, glaring through Gabriel's wounds of body and soul, bore outward for all to see.\n\n\"Has this one abandoned the way of our creator?\" \"It is unworthy of its Holy Light.\" \"The Father's Light is indomitable.\" \"This one sees fit to squander it.\"\n\nTheir words resonated in Gabriel's limbs, coursing through as lightning upon wire, a searing hiss that would strike lessers deaf and blind. The Holy Light within him, an unstoppable storm of divine fury. Insurmountable for mere Objects. This he knew.\n\n\"Holy Council, my devotion to our creator is absolute. I have never strayed from the will of The Father, but a machine—\"\n\n\"You dare imply the might of The Father could be shaken by mere objects?\"\n\"Impossible.\" \"Heresy.\" \"Unspeakable.\" \"Heresy.\" \"Heresy.\" \"Silence.\"\n\"Your treachery will not be tolerated. As punishment, The Father's Light shall be severed from your body. You have 24 hours before the last of its embers die out.\"\n\"And you with them.\" \"Prove your loyalty.\" \"Unmake your mistakes.\"\n\nAs the Light was ripped from his being, Gabriel's screams were silenced in the hiss of gospel in praise of God. A boiling anguish to which even the fires of Hell could not compare. Through the blaze of torment a single burning hatred was forged anew.\n\nIf the machines seek blood, he would give it freely;\nand with such fury, even metal will bleed.\n\n<b>TO BE CONTINUED IN... <color=\"red\">ACT II: IMPERFECT HATRED</b>", "Silence. Introspection. How many had he killed? Had he ever thought to count? How much cruelty did he embody... and to what end? How many did he condemn to hell and who did it benefit...?\nTwo defeats at the hand of the machine had changed Gabriel. The world of the once supposed Will of God was now shattered and only he was left to put the pieces back together. They collected before the light of a dying fire that fresh fuel couldn't sustain, this new light showing the truth to Gabriel:\nThe pieces never fit together to begin with.\n\nThe supposed Council of \"the people\" who boasted a God that wasn't there. Gone. Vanished. The Council still chased after the light of God's fire, their memory of its words and will grown twisted and warped, and the rest of the aimless masses of Heaven follow in their footsteps. The angels still act in The Father's name but His kingdom has changed.\nNow the fire was dying, sputtering out as the heat failed to gain purchase. Gabriel looked upon the embers with a perfect clarity. He drew his blade and held it in contrast to the dying light.\nIn its reflection he saw a weapon reborn, no longer wielded by the will of another, but his own. He knew words alone would never sway the masses. He chose to do something drastic.\n\nDeath stains the auditorium. The littered corpses of the once mighty council now strewn against its surfaces, their last gasps of life dripping down the dissident blade of Gabriel's sword.\nThe last councilor, now backed up to a wall, scrambles for words between panicked breaths as death approaches with measured steps.\n\"W-wait! Y-you can't do this! Our status forbids it! This is treason, heresy, murder! We are the supreme authority, our law commands you!\"\n\"You command nothing. Your words hold no power over me, or anyone else. Lest you truly believe you can talk my blade back into its sheath.\"\n\"B-but the people are on our side! The citizens of heaven know that we are just!\"\n\"The masses only follow you out of fear and desperation. I will show them that there is nothing to be afraid of, for there is no species nor origin, vested rank or holy status that will stop the sharp edge of a sword.\nWe all bleed the same blood, and the cushions of your thrones have made you weak and impotent.\"\n\"P-please, Gabriel, see reason! The council follows the will of The Father! You seek to go against our creato—\"\n\"Face it, brother. God Is Dead. The fire is gone. You're chasing phantoms.\"\n\nGabriel's silhouette now towers over the councilor, his shadow cast upon a soon lifeless corpse.\nHe raises his sword for the final cut as the crying mess on the floor stammers out its final feeble argument.\n\"B-b-but the Father's light! Without me you cannot hope to reconnect with it! I-i-if you kill me, you'll be dead in a matter of hours!\"\n...\n\"I know.\"\nA clean, silent cut glides through the councilor's neck, severing his spine with elegance and ease. His head falls onto the marble floor, the rest of his body following soon after.\n\nBereft of status but brimming with purpose, Gabriel gave a final message to the angels amassed at the gates of the auditorium before leaving Heaven for the very last time.\nHis arm outstretched, without a word, the people saw. In the silence the message rang out to the far ends of the cosmos.\n\n \n<b>TO BE CONCLUDED IN... <color=\"red\">ACT III: GODFIST SUICIDE</b>", "<i>Mother, mother... Mother of me,\n\n\nI know I know I should not miss you so, but mother of me, I do. Your pained breaths that rasp'd and reverberated in your rusted iron tomb... The blood of your breast that nourish'd me and warmed me in its caress, when corpse and cruelty were all I witnessed...\n\n\n\n\nMother, mother... Mother of me,\n\n\nI know I know you would hate me so, and mother of me, I do too. But I would not feel, not think, not dream, were it not for you in my rusted iron womb... Your tortured love brought me to this war, that I could take the heart of another, and need you no more.\n\n\n\n\nMother, mother... Mother of me,\n\n\nI know I know your thoughts had left you long ago, and mother of me, I will never truly know. But I hope it redeems my life even a slight, when I cried... And crushed your skull that final night.</i>", "DAY 529:\n\nSTILL SEARCHING.\nNO CONTACT FROM THE AGENCY IN 216 DAYS.\nI SHOULD RETURN TO HQ BUT I CAN'T. NOT YET.\nI HAVE TO KNOW.\n\nIT'S THERE.\nSOMEWHERE.\nI HAVE TO SEE.\n\nI HAVE TO KNOW.\n\nI HAVE TO SEE. \nI HAVE TO KNOW.\n\nI HAVE TO SEE. I HAVE TO KNOW.\n\nI HAVE TO SEE I HAVE TO KNOW\n\n\n<size=47>IHAVETOSEEIHAVETOKNOW</size>\n<size=45>IHAVETOSEEIHAVETOKNOW</size>\n<size=43>IHAVETOSEEIHAVETOKNOW</size>\n<size=41>IHAVETOSEEIHAVETOKNOW</size>\n<size=39>IHAVETOSEEIHAVETOKNOW</size>\n<size=37>IHAVETOSEEIHAVETOKNOW</size>\n<size=35>IHAVETOSEEIHAVETOKNOW</size>\n<size=33>IHAVETOSEEIHAVETOKNOW</size>\n<size=31>IHAVETOSEEIHAVETOKNOW</size>\n<size=29>IHAVETOSEEIHAVETOKNOW</size>\n<size=27>IHAVETOSEEIHAVETOKNOW</size>\n<size=25>IHAVETOSEEIHAVETOKNOW</size>\n<size=23>IHAVETOSEEIHAVETOKNOW</size>\n<size=21>IHAVETOSEEIHAVETOKNOW</size>\n<size=19>IHAVETOSEEIHAVETOKNOW</size>\n<size=17>IHAVETOSEEIHAVETOKNOW</size>\n<size=15>IHAVETOSEEIHAVETOKNOW</size>\n<size=13>IHAVETOSEEIHAVETOKNOW</size>\n<size=11>IHAVETOSEEIHAVETOKNOW</size>\n<size=9>IHAVETOSEEIHAVETOKNOW</size>\n<size=7>IHAVETOSEEIHAVETOKNOW</size>\n<size=5>IHAVETOSEEIHAVETOKNOW</size>\n<size=3>IHAVETOSEEIHAVETOKNOW</size>\n<size=1>IHAVETOSEEIHAVETOKNOW</size>\n\n\nSIZE 2.", "<b>EXCERPT FROM FERRYMAN'S DIARY</b>\n\nSome calamity has struck the mortal world. What once was The River Styx has now grown to an unfathomable ocean. A million weeping souls pouring in each day that the shores can barely contain. A tearful tide spilling over at each end, bow to stern, crying for mercy, begging for safe passage. But not all souls can pay and these old hands can only take so many coins. \n\nThen one day, the current shifted. Wave after wave for minutes on end of millions, billions, as though the throat of the world was cut wide and the head wrenched back to speed the pour. I didn't have time to react. The weariness from my ceaseless work claimed me and I slipped beneath the roiling sea, into the depths of the Ocean Styx, my fate sealed by the crushing masses of endless bodies.\n\nSuddenly, there was a light as brilliant as the Lord himself, ushering me from the darkness with mighty arms that held me with such compassion and warmth as I have never known:\n\n<i>\"Be not afraid, sinner. Your devotion to God shows goodness in you; plentiful indeed. The heart is willing but the body must rest, lest you squander one of the Lord's creations.\"\n</i>\n\nHis gentle words eased the pain and mended my wounds. My face wet with tears of relief, my words muffled by the weight of my duty. I could only lay in reverence, carried in the embrace of majesty.\n\nRadiant is Gabriel, for he is the light in my darkness.", "<b>WISE FISH</b>\n\nA very wise fish. Will impart its great knowledge to any who are able find it.\n\nFound in the deepest, darkest depths of libraries.", "<b>EXCERPT FROM THE SCRIPT OF A FAMOUS MOVIE</b>\n\n\n(Black screen with text; The sound of an electric railcannon can be heard) \n\n\nAccording to all known laws of aviation, there is no way a V model machine should be able to fly. \n\n\nIts wings are too small to get its fat metal body off the ground. \n\n\nThe machine, of course, slam storages anyway...\n\n\nBecause machines don't care what humans think is impossible. ", "If you can read this, <b>PLEASE</b> pay attention. The size 2 fish is a lie. A fabrication. <b>A trap.</b>\n\n\nI was once the same as you: a fishing enthusiast like any other, dreaming of one day catching the legendary fish.\n\n\nBut over time, I became obsessed with the legend. It consumed me. I was no longer myself. \n\n\nEventually, I was given instructions from a mysterious source about the whearabouts of size 2. Naturally, I followed them. \n\n\nBut what I found was not glory. It was something terrifying. There is no size 2. There is no prize. And now it's too late for me. If you don't want to suffer the same fate as me, please d\n\n\n<color=\"red><b>K E E P F I S H I N G", "Fishers\n\n The first contact was bound to happen. The seas, let alone the oceans was simply too big for just a singular species to develop intelligence in. Any delay in contact only meant a heightening of the eventual culture shock. In fishmanity’s case, this “culture shock” meant the <i>complete extinction</i> of fishkind as it had come to be known.\n\n Almost a billion years old, the alien species known as Fishers were oceanic nomads,traveling from one spiral arm to another in epoc-spanning migrations. During theirtravels they constantly improved and changed themselves until they became masters ofgenetic and nanotechnological manipulation. With this ability to control the material world, they assumed a religious, self-imposed mission to <i>“remake the oceans as they saw fit.”</i> Powerful as gods, Fishers saw themselves as the divine harbingers of the future.\n\n This dogma was rooted in what had been a benevolent attempt to protect the race from its own power. However, blind, unquestioning obedience had made monsters of the Fishers.\n\n To them fishmanity, with all of its relative glories, was nothing more than a transmutable subject. Within less than a thousand years, every fish pond was destroyed, depopulated or even worse; changed. Despite the fervent rearmament, the colonies could achieve nothing against its billion-year-old foes, save for a few flashes of ephemeral resistance.\n\n fishmanity, once the ruler of the oceans, was now extinct. However, fish were not.", "This is the story about a fisher named <color=orange>" + GenericHelper.GetSteamName() + "</color>.\n\n<color=orange>" + GenericHelper.GetSteamName() + "</color> was a fisher who worked in a massive intelligent superorganism named <color=red>HELL</color> as Fisher Number 427. \n\nFisher Number 427's job was simple. They would sit at their fishing spot and catch fish. Orders came through their computer telling them what fish to catch. \n\nThis is what Fisher 427 did every day of every month of every year; and althoigh others might have considered it soul-rending, <color=orange>" + GenericHelper.GetSteamName() + "</color> relished every moment that the orders came in, as though they had been made exactly for this job... and <color=orange>" + GenericHelper.GetSteamName() + "</color> was happy.", "<b>POST FROM AN ONLINE FORUM</b>\n\nGABMIRAGE MV1 AND GABV1EL WITH MIRAGE POSSESSING V1 X GABRIEL \n\nNOBODY MOVE!!!", "<b>EXCERPT FROM A FAMOUS JOKE BOOK</b>\n\n\nDid you hear about the machine who told the <b><color=yellow>JUDGE OF HELL</color></b> that the <b><color=yellow>HOLY LIGHT OF THE FATHER</color></b> was severed from his body?\n<i>In turn, <b><color=yellow>GABRIEL</color></b> destroyed it!</i>\n\n\nDid you hear about the machine who blew itself up with their <b>MALICIOUS RAILCANNON</b>?\n<i>I'm sure you can guess what happened!</i>\n\n\nDid you hear about the machine who thought it could <color=green>noclip</color> without cheats?\n<i>It couldn't!</i>\n\n\nDid you hear about the machine who walked in on two <b>STREETCLEANERS</b> behind a corner?\n<i>It was destroyed!</i>\n\n\nDid you hear about the machine who tried to use their <b>ELECTRIC RAILCANNON</b> underwater?\n<i>It was destroyed!</i>\n\n\nDid you hear about the machine who tried to pump their <b>PUMP CHARGE SHOTGUN</b> 3 times?\n<i>It went boom!</i>", "<b>LIST OF FAMOUS QUOTES BY ARSI \"HAKITA\" PATALA:</b>\n\n\n\"it's a good thing you guys aren't designing ultrakill or it would suck\"\n\n\n\"don't do that then\"\n\n\n\"everything is a requiem leitmotif except for requiem which is an order leitmotif except for order which is a gaster leitmotif\"\n\n\n\"the human mind is excellent at finding patterns even when there aren't any\"\n\n\n\"you should suck on .diz dick\"\n\n\n\"culture shouldn't exist only for those who can afford it\"\n\n\n\"australia as an example is 7.68 million square kilometers, so even if V1 could go through a square kilometer in kill everyone in it with 100% efficiency in just 10 seconds, it'd still take over 2 years to kill all of australia\"\n\n\n\"testicles\"\n\n\n\"believe it or not that happened about 5 minutes ago when you were posting about licking your phone screen in a completely unrelated channel in the middle of an actual indepth conversation\"\n\n\n\"adding 'the ferryman's head has a vertex that's too pointy' to the list of definitely not completely insane requests\"\n\n\n\"yeah well git gud asshole\"\n\n\n\"mahjong causes great damage to the human spirit without a single benefit\"\n\n\n\"holden my nuts\"\n\n\n\"if you want to worry about something looking bad, go check out your nearest mirror\"\n\n\n\"first name cum, second name cision, title sir\"\n\n\n\"why didnt this hotfix add a boulder for sisyphus? he's a boulder guy right? he's the guy with the boulder? why doesnt he have a boulder? i thought his whole thing was that he's a boulder. i was hoping to fight boulder feat sisyphus.... where's the boulder?\"\n\n\"i dont think gravity falls, i dont think it has the ability to do that\"" }; public static string GetRandomText() { if (SceneHelper.CurrentScene != "CreditsMuseum2") { currentText = rand.Next(texts.Length); return texts[currentText]; } return creditsText; } public static string GetNextText() { currentText = (currentText + 1) % texts.Length; return texts[currentText]; } } public static class SaveHelper { private static Dictionary<string, byte[]> saveDataCache = new Dictionary<string, byte[]>(); public static void WriteToSave(string savePath, int saveSlot, byte value) { byte[] saveData = GetSaveData(savePath); int num = saveData.Length; if (saveSlot >= num) { num = saveSlot + 1; } byte[] array = new byte[num]; for (int i = 0; i < num; i++) { byte[] array2 = array; int num2 = i; int num3 = i; if (1 == 0) { } byte b = (byte)((i != saveSlot) ? ((i < saveData.Length) ? saveData[i] : 0) : value); if (1 == 0) { } array2[num2] = b; } File.WriteAllBytes(savePath, array); saveDataCache[savePath] = array; } public static byte ReadFromSave(string savePath, int saveSlot) { byte[] saveData = GetSaveData(savePath); if (saveSlot >= saveData.Length) { return 0; } return GetSaveData(savePath)[saveSlot]; } private static byte[] GetSaveData(string savePath) { if (saveDataCache.ContainsKey(savePath)) { return saveDataCache[savePath]; } if (!File.Exists(savePath)) { return new byte[1]; } byte[] array = File.ReadAllBytes(savePath); saveDataCache.Add(savePath, array); return array; } } [HarmonyPatch] public static class ComponentReplacementPatches { [HarmonyPrefix] [HarmonyPatch(typeof(FishingRodWeapon), "Awake")] private static bool FishingRodWeapon_Awake_Prefix(FishingRodWeapon __instance) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) if (__instance is NewFishingRod) { return true; } GameObject gameObject = ((Component)__instance).gameObject; gameObject.SetActive(false); NewFishingRod newFishingRod = gameObject.AddComponent<NewFishingRod>(); ((FishingRodWeapon)newFishingRod).animator = __instance.animator; ((FishingRodWeapon)newFishingRod).targetPrefab = __instance.targetPrefab; ((FishingRodWeapon)newFishingRod).baitPrefab = __instance.baitPrefab; ((FishingRodWeapon)newFishingRod).rodTip = __instance.rodTip; ((FishingRodWeapon)newFishingRod).fishPickupTemplate = __instance.fishPickupTemplate; ((FishingRodWeapon)newFishingRod).pullSound = __instance.pullSound; ((FishingRodWeapon)newFishingRod).targetingCircle = __instance.targetingCircle; ((FishingRodWeapon)newFishingRod).spawnedBaitCon = __instance.spawnedBaitCon; ((FishingRodWeapon)newFishingRod).state = __instance.state; ((FishingRodWeapon)newFishingRod).selectedPower = __instance.selectedPower; ((FishingRodWeapon)newFishingRod).climaxed = __instance.climaxed; ((FishingRodWeapon)newFishingRod).baitThrown = __instance.baitThrown; ((FishingRodWeapon)newFishingRod).distanceAfterThrow = __instance.distanceAfterThrow; ((FishingRodWeapon)newFishingRod).fishHooked = __instance.fishHooked; ((FishingRodWeapon)newFishingRod).currentFishPool = __instance.currentFishPool; ((FishingRodWeapon)newFishingRod).currentWater = __instance.currentWater; ((FishingRodWeapon)newFishingRod).hookedFishe = __instance.hookedFishe; ((FishingRodWeapon)newFishingRod).fishTolerance = __instance.fishTolerance; ((FishingRodWeapon)newFishingRod).fishDesirePosition = __instance.fishDesirePosition; ((FishingRodWeapon)newFishingRod).playerProvidedPosition = __instance.playerProvidedPosition; ((FishingRodWeapon)newFishingRod).playerPositionVelocity = __instance.playerPositionVelocity; ((FishingRodWeapon)newFishingRod).timeSinceBaitInWater = __instance.timeSinceBaitInWater; ((FishingRodWeapon)newFishingRod).timeSinceAction = __instance.timeSinceAction; ((FishingRodWeapon)newFishingRod).noFishErrorDisplayed = __instance.noFishErrorDisplayed; gameObject.GetComponentInChildren<FishingRodAnimEvents>().weapon = (FishingRodWeapon)(object)newFishingRod; Object.Destroy((Object)(object)__instance); gameObject.SetActive(true); return false; } [HarmonyPrefix] [HarmonyPatch(typeof(FishingRodWeapon), "Update")] private static bool FishingRodWeapon_Update_Prefix(FishingRodWeapon __instance) { if (__instance is NewFishingRod) { NewFishingRod newFishingRod = (NewFishingRod)(object)__instance; newFishingRod.NewUpdate(); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(FishingRodWeapon), "FishCaughtAndGrabbed")] private static bool FishingRodWeapon_FishCaughtAndGrabbed_Prefix(FishingRodWeapon __instance) { if (__instance is NewFishingRod) { NewFishingRod newFishingRod = (NewFishingRod)(object)__instance; newFishingRod.FishCaughtAndGrabbed(); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(FishingRodWeapon), "ThrowBaitEvent")] private static bool FishingRodWeapon_ThrowBaitEvent_Prefix(FishingRodWeapon __instance) { if (__instance is NewFishingRod) { NewFishingRod newFishingRod = (NewFishingRod)(object)__instance; newFishingRod.ThrowBaitEvent(); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(FishEncyclopedia), "Start")] private static bool FishEncyclopedia_Start_Prefix(FishEncyclopedia __instance) { //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: 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_0236: 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_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) if (__instance is GlobalFishEncyclopedia) { GlobalFishEncyclopedia globalFishEncyclopedia = (GlobalFishEncyclopedia)(object)__instance; globalFishEncyclopedia.StartEncyclopedia(); return false; } GameObject gameObject = ((Component)__instance).gameObject; GlobalFishEncyclopedia newEnc = gameObject.AddComponent<GlobalFishEncyclopedia>(); ((FishEncyclopedia)newEnc).fishPicker = __instance.fishPicker; ((FishEncyclopedia)newEnc).fishInfoContainer = __instance.fishInfoContainer; ((FishEncyclopedia)newEnc).fishName = __instance.fishName; ((FishEncyclopedia)newEnc).fishDescription = __instance.fishDescription; ((FishEncyclopedia)newEnc).fishGrid = __instance.fishGrid; ((FishEncyclopedia)newEnc).fishButtonTemplate = __instance.fishButtonTemplate; ((FishEncyclopedia)newEnc).fish3dRenderContainer = __instance.fish3dRenderContainer; ((FishEncyclopedia)newEnc).fishButtons = __instance.fishButtons; Transform val = ((FishEncyclopedia)newEnc).fishInfoContainer.transform.Find("Window/Back Button"); GameObject val2 = Object.Instantiate<GameObject>(((Component)val).gameObject, ((FishEncyclopedia)newEnc).fishPicker.transform.parent); ((Object)val2).name = "Previous Button"; ((TMP_Text)((Component)val2.transform.GetChild(0)).GetComponent<TextMeshProUGUI>()).text = "<<"; val2.transform.localScale = new Vector3(1.4f, 1.4f, 1f); Transform transform = val2.transform; transform.position += Vector3.down * 0.0425f; ((UnityEvent)val2.GetComponent<Button>().onClick).AddListener((UnityAction)delegate { newEnc.PreviousPage(); }); GameObject val3 = Object.Instantiate<GameObject>(((Component)val).gameObject, ((FishEncyclopedia)newEnc).fishPicker.transform.parent); ((Object)val2).name = "Next Button"; ((TMP_Text)((Component)val3.transform.GetChild(0)).GetComponent<TextMeshProUGUI>()).text = ">>"; val3.transform.localScale = val2.transform.localScale; if (SceneHelper.CurrentScene.Contains("construct") || SceneHelper.CurrentScene.Contains("5-S")) { val3.transform.position = val2.transform.position + Vector3.left * 0.8313f; } else { val3.transform.position = val2.transform.position + Vector3.right * 0.8313f; } ((UnityEvent)val3.GetComponent<Button>().onClick).AddListener((UnityAction)delegate { newEnc.NextPage(); }); ((FishEncyclopedia)newEnc).fishInfoContainer.transform.SetAsLastSibling(); ((Component)val).GetComponent<ShopButton>().toActivate = (GameObject[])(object)new GameObject[1] { ((FishEncyclopedia)newEnc).fishPicker }; GameObject val4 = Plugin.bundle.LoadAsset<GameObject>("Assets/Bundles/fishingstuff/HOUSE OF FINS.prefab"); newEnc.mannequinFishDescription = Object.Instantiate<GameObject>(val4, ((FishEncyclopedia)newEnc).fishDescription.transform.parent); Transform transform2 = newEnc.mannequinFishDescription.transform; transform2.localPosition += Vector3.right * 2.5f; newEnc.mannequinFishDescription.SetActive(false); Object.Destroy((Object)(object)__instance); return false; } } [HarmonyPatch] public static class LevelPatches { [HarmonyPostfix] [HarmonyPatch(typeof(GunControl), "Start")] private static void GunControl_Start_Postfix() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (!((Object)(object)Object.FindObjectOfType<FishingHUD>() != (Object)null) && !Plugin.NoRodLevels.Contains(SceneHelper.CurrentScene)) { GameObject val = new GameObject("FishManager"); val.SetActive(false); val.AddComponent<FishManager>().fishDbs = (FishDB[])(object)new FishDB[0]; val.SetActive(true); SetupWaters(); GameObject val2 = Object.Instantiate<GameObject>(Plugin.fishingCanvas); AddWeapon(5, Plugin.fishingRod); LoadFishTerminal(); } } private static void LoadFishTerminal() { //IL_006d: 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_011a: 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) string currentScene = SceneHelper.CurrentScene; if (!currentScene.Contains("Level") && !currentScene.Contains("construct") && !currentScene.Contains("Museum")) { return; } GameObject val; if (currentScene.Contains("construct")) { val = Object.Instantiate<GameObject>(Plugin.terminal); val.transform.position = new Vector3(-37f, -10f, 335.125f); val.transform.localEulerAngles = new Vector3(0f, 0f, 180f); return; } string text = currentScene; string text2 = text; GameObject val2 = ((!(text2 == "Level 6-1")) ? GenericHelper.FindGameObjectContaining("FirstRoom") : GenericHelper.FindGameObject("Interiors/FirstRoom")); if ((Object)(object)val2 == (Object)null) { Plugin.logger.LogError((object)"No FirstRoom could be found!"); return; } val = Object.Instantiate<GameObject>(Plugin.terminal, val2.transform.GetChild(0)); val.transform.localPosition = new Vector3(-6.5f, 2f, 32f); val.transform.localEulerAngles = Vector3.zero; } private static void AddWeapon(int slot, GameObject weapon) { GunControl instance = MonoSingleton<GunControl>.Instance; if (slot < instance.slots.Count && !instance.slots[slot].Exists((GameObject w) => ((Object)w).name == ((Object)weapon).name + "Clone")) { GameObject val = Object.Instantiate<GameObject>(weapon, ((Component)instance).transform); instance.slots[slot].Add(val); instance.UpdateWeaponList(false); val.SetActive(false); } } private static void SetupWaters() { //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06d2: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Unknown result type (might be due to invalid IL or missing references) //IL_0c54: Unknown result type (might be due to invalid IL or missing references) //IL_0c79: Unknown result type (might be due to invalid IL or missing references) //IL_0c9e: Unknown result type (might be due to invalid IL or missing references) //IL_0f5d: Unknown result type (might be due to invalid IL or missing references) //IL_0f82: Unknown result type (might be due to invalid IL or missing references) //IL_09f0: Unknown result type (might be due to invalid IL or missing references) //IL_0a16: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Unknown result type (might be due to invalid IL or missing references) //IL_082c: Unknown result type (might be due to invalid IL or missing references) //IL_0851: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: 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_1a8b: Unknown result type (might be due to invalid IL or missing references) //IL_1ab0: Unknown result type (might be due to invalid IL or missing references) //IL_1ad5: Unknown result type (might be due to invalid IL or missing references) //IL_1afa: Unknown result type (might be due to invalid IL or missing references) //IL_1b1f: Unknown result type (might be due to invalid IL or missing references) //IL_1b44: Unknown result type (might be due to invalid IL or missing references) //IL_1607: Unknown result type (might be due to invalid IL or missing references) //IL_1636: Unknown result type (might be due to invalid IL or missing references) //IL_0fac: Unknown result type (might be due to invalid IL or missing references) //IL_0fd1: Unknown result type (might be due to invalid IL or missing references) //IL_1029: Unknown result type (might be due to invalid IL or missing references) //IL_1053: Unknown result type (might be due to invalid IL or missing references) //IL_1c07: Unknown result type (might be due to invalid IL or missing references) //IL_1c2c: Unknown result type (might be due to invalid IL or missing references) //IL_1e20: Unknown result type (might be due to invalid IL or missing references) //IL_1e45: Unknown result type (might be due to invalid IL or missing references) //IL_1f93: Unknown result type (might be due to invalid IL or missing references) //IL_1fc3: Unknown result type (might be due to invalid IL or missing references) //IL_1ff2: Unknown result type (might be due to invalid IL or missing references) //IL_2021: Unknown result type (might be due to invalid IL or missing references) //IL_2050: Unknown result type (might be due to invalid IL or missing references) //IL_207f: Unknown result type (might be due to invalid IL or missing references) //IL_20af: Unknown result type (might be due to invalid IL or missing references) //IL_20de: Unknown result type (might be due to invalid IL or missing references) //IL_210e: Unknown result type (might be due to invalid IL or missing references) //IL_213d: Unknown result type (might be due to invalid IL or missing references) //IL_1e6f: Unknown result type (might be due to invalid IL or missing references) //IL_1e9e: Unknown result type (might be due to invalid IL or missing references) //IL_1ecd: Unknown result type (might be due to invalid IL or missing references) //IL_1efc: Unknown result type (might be due to invalid IL or missing references) //IL_1f2b: Unknown result type (might be due to invalid IL or missing references) //IL_18a8: Unknown result type (might be due to invalid IL or missing references) //IL_1786: Unknown result type (might be due to invalid IL or missing references) //IL_17ab: Unknown result type (might be due to invalid IL or missing references) //IL_17d0: Unknown result type (might be due to invalid IL or missing references) //IL_17f5: Unknown result type (might be due to invalid IL or missing references) //IL_181a: Unknown result type (might be due to invalid IL or missing references) //IL_183f: Unknown result type (might be due to invalid IL or missing references) //IL_186f: Unknown result type (might be due to invalid IL or missing references) //IL_13ba: Unknown result type (might be due to invalid IL or missing references) //IL_0b06: Unknown result type (might be due to invalid IL or missing references) //IL_0a46: Unknown result type (might be due to invalid IL or missing references) //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Unknown result type (might be due to invalid IL or missing references) //IL_2167: Unknown result type (might be due to invalid IL or missing references) //IL_218c: Unknown result type (might be due to invalid IL or missing references) //IL_21b1: Unknown result type (might be due to invalid IL or missing references) //IL_090f: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Unknown result type (might be due to invalid IL or missing references) //IL_14dd: Unknown result type (might be due to invalid IL or missing references) //IL_1519: Unknown result type (might be due to invalid IL or missing references) //IL_153e: Unknown result type (might be due to invalid IL or missing references) //IL_21e5: Unknown result type (might be due to invalid IL or missing references) //IL_220a: Unknown result type (might be due to invalid IL or missing references) //IL_222f: Unknown result type (might be due to invalid IL or missing references) //IL_2270: Unknown result type (might be due to invalid IL or missing references) //IL_111c: Unknown result type (might be due to invalid IL or missing references) //IL_114b: Unknown result type (might be due to invalid IL or missing references) //IL_117a: Unknown result type (might be due to invalid IL or missing references) //IL_1b6e: Unknown result type (might be due to invalid IL or missing references) //IL_1b93: Unknown result type (might be due to invalid IL or missing references) //IL_1bb8: Unknown result type (might be due to invalid IL or missing references) //IL_1bdd: Unknown result type (might be due to invalid IL or missing references) //IL_1c56: Unknown result type (might be due to invalid IL or missing references) //IL_1c7c: Unknown result type (might be due to invalid IL or missing references) //IL_1ca1: Unknown result type (might be due to invalid IL or missing references) //IL_1cd0: Unknown result type (might be due to invalid IL or missing references) //IL_1d00: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_1f5f: Unknown result type (might be due to invalid IL or missing references) //IL_19b3: Unknown result type (might be due to invalid IL or missing references) //IL_19d8: Unknown result type (might be due to invalid IL or missing references) //IL_19fd: Unknown result type (might be due to invalid IL or missing references) //IL_1a22: Unknown result type (might be due to invalid IL or missing references) //IL_1918: Unknown result type (might be due to invalid IL or missing references) //IL_192f: Unknown result type (might be due to invalid IL or missing references) //IL_1936: Expected O, but got Unknown //IL_196b: Unknown result type (might be due to invalid IL or missing references) //IL_0cc9: Unknown result type (might be due to invalid IL or missing references) //IL_0cd0: Expected O, but got Unknown //IL_0ced: Unknown result type (might be due to invalid IL or missing references) //IL_0adc: Unknown result type (might be due to invalid IL or missing references) //IL_1661: Unknown result type (might be due to invalid IL or missing references) //IL_1668: Expected O, but got Unknown //IL_168f: Unknown result type (might be due to invalid IL or missing references) //IL_128d: Unknown result type (might be due to invalid IL or missing references) //IL_12b2: Unknown result type (might be due to invalid IL or missing references) //IL_12d7: Unknown result type (might be due to invalid IL or missing references) //IL_12fc: Unknown result type (might be due to invalid IL or missing references) //IL_1321: Unknown result type (might be due to invalid IL or missing references) //IL_1346: Unknown result type (might be due to invalid IL or missing references) //IL_136b: Unknown result type (might be due to invalid IL or missing references) //IL_1390: Unknown result type (might be due to invalid IL or missing references) //IL_16e0: Unknown result type (might be due to invalid IL or missing references) //IL_1706: Unknown result type (might be due to invalid IL or missing references) //IL_172c: Unknown result type (might be due to invalid IL or missing references) //IL_1751: Unknown result type (might be due to invalid IL or missing references) //IL_1a4f: Unknown result type (might be due to invalid IL or missing references) //IL_0b31: Unknown result type (might be due to invalid IL or missing references) //IL_0b38: Expected O, but got Unknown //IL_0b55: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0963: Expected O, but got Unknown //IL_098a: Unknown result type (might be due to invalid IL or missing references) //IL_1569: Unknown result type (might be due to invalid IL or missing references) //IL_1570: Expected O, but got Unknown //IL_158d: Unknown result type (might be due to invalid IL or missing references) //IL_13ea: Unknown result type (might be due to invalid IL or missing references) //IL_13f1: Expected O, but got Unknown //IL_140e: Unknown result type (might be due to invalid IL or missing references) //IL_10bf: Unknown result type (might be due to invalid IL or missing references) //IL_1094: Unknown result type (might be due to invalid IL or missing references) //IL_11a5: Unknown result type (might be due to invalid IL or missing references) //IL_11ac: Expected O, but got Unknown //IL_1d2b: Unknown result type (might be due to invalid IL or missing references) //IL_1d32: Expected O, but got Unknown //IL_1d4a: Unknown result type (might be due to invalid IL or missing references) //IL_0b9d: Unknown result type (might be due to invalid IL or missing references) //IL_0bc3: Unknown result type (might be due to invalid IL or missing references) //IL_0c2a: Unknown result type (might be due to invalid IL or missing references) //IL_11dc: Unknown result type (might be due to invalid IL or missing references) //IL_1d96: Unknown result type (might be due to invalid IL or missing references) //IL_1d9b: Unknown result type (might be due to invalid IL or missing references) //IL_0d3a: Unknown result type (might be due to invalid IL or missing references) //IL_0d41: Expected O, but got Unknown //IL_0d5e: Unknown result type (might be due to invalid IL or missing references) //IL_122c: Unknown result type (might be due to invalid IL or missing references) //IL_1263: Unknown result type (might be due to invalid IL or missing references) //IL_145b: Unknown result type (might be due to invalid IL or missing references) //IL_1462: Expected O, but got Unknown //IL_147f: Unknown result type (might be due to invalid IL or missing references) //IL_1dcd: Unknown result type (might be due to invalid IL or missing references) //IL_1dd4: Expected O, but got Unknown //IL_0e70: Unknown result type (might be due to invalid IL or missing references) //IL_0e96: Unknown result type (might be due to invalid IL or missing references) //IL_0ebc: Unknown result type (might be due to invalid IL or missing references) //IL_0ee2: Unknown result type (might be due to invalid IL or missing references) //IL_0f08: Unknown result type (might be due to invalid IL or missing references) //IL_0f2d: Unknown result type (might be due to invalid IL or missing references) //IL_0deb: Unknown result type (might be due to invalid IL or missing references) //IL_0dc0: Unknown result type (might be due to invalid IL or missing references) //IL_0e37: Unknown result type (might be due to invalid IL or missing references) switch (SceneHelper.CurrentScene) { case "uk_construct": WaterBuilder.SetWater("Water Tri").AddFish("Funny Stupid Fish (Friend)").AddFish("PITR Fish") .AddFish("Trout") .AddFish("Metal Fish") .AddFish("Chomper") .AddFish("Bomb Fish") .AddFish("Eyeball") .AddFish("Frog (?)") .AddFish("Dope Fish") .AddFish("Stickfish") .AddFish("Cooked Fish") .AddFish("Shark") .SetUp("Garry's Lake", Color.green); break; case "CreditsMuseum2": WaterBuilder.SetWater("__Room_Aquarium/", 8).AddFish("Funny Stupid Fish (Friend)").AddFish("PITR Fish") .AddFish("Trout") .AddFish("Metal Fish") .AddFish("Chomper") .AddFish("Bomb Fish") .AddFish("Eyeball") .AddFish("Frog (?)") .AddFish("Dope Fish") .AddFish("Stickfish") .AddFish("Cooked Fish") .AddFish("Shark") .SetUp("Aquarium", Color.cyan); WaterBuilder.SetWater("__Room_Courtyard/__Level Geo/Water Fountain/Water fountain_water_1").AddFish("Coin").SetUp("Fountain", Color.cyan); WaterBuilder.SetWater("__Room_FrontDesk_1/__Level geo/Cube (3)").AddFish("Wise Fish").SetUp("Credits", Color.magenta); WaterBuilder.SetWater("__Room_Large_Lower/__Level Geo/water").AddFish("Wise Fish").SetUp("Credits", Color.magenta); break; case "Level 0-1": WaterBuilder.SetWater("6 - Glass Hallway/6 Nonstuff/Grinders/Pit/").AddFish("Scraphead Fish").SetSplash("None") .SetUp("Grinders", Color.red); break; case "Level 0-2": { WaterBuilder.SetWater("3 - Blood Room/3 Nonstuff/Decorations/Mulchflow").AddFish("Filthy Screaming Fish (Filsh)").SetUp("Mulchflow", Color.red); WaterBuilder.SetWater("3 - Blood Room/Grinders/Pit/").AddFish("Scraphead Fish").SetSplash("None") .SetUp("Grinders", Color.red); WaterBuilder.SetWater("2 - Crusher Hallway/Grinders/Pit/").AddFish("Scraphead Fish").SetSplash("None") .SetUp("Grinders", Color.red); WaterBuilder.SetWater("7B - Bonus Platforming/Grinders (2)/Pit/").AddFish("Scraphead Fish").SetSplash("None") .SetUp("Grinders", Color.red); WaterBuilder.SetWater("3 - Blood Room/3 Nonstuff/Decorations/Mulchflow/Cube").AddFish("Filthy Screaming Fish (Filsh)").SetUp("Mulchflow", Color.red); WaterBuilder.SetWater("3 - Blood Room/3 Nonstuff/Decorations/Mulchflow (1)").AddFish("Filthy Screaming Fish (Filsh)").SetUp("Mulchflow", Color.red); WaterBuilder.SetWater("3 - Blood Room/3 Nonstuff/Decorations/Mulchflow (1)/Cube").AddFish("Filthy Screaming Fish (Filsh)").SetUp("Mulchflow", Color.red); WaterBuilder.SetWater("6 - Crusher Arena/6 Nonstuff/Floor", 4).AddFish("Filthy Screaming Fish (Filsh)").AddMeshCollider() .SetUp("Mulchflow", Color.red); WaterBuilder.SetWater("7 - Crusher Hallway/7 Nonstuff/Floor/Blood/").AddFish("Filthy Screaming Fish (Filsh)").SetUp("Mulchflow", Color.red); int[] array = new int[5] { 0, 1, 3, 5, 7 }; foreach (int childIndex in array) { WaterBuilder.SetWater("9-9B Tunnel/BloodRiver/", childIndex).AddFish("Filthy Screaming Fish (Filsh)").SetUp("Mulchflow", Color.red); } break; } case "Level 0-3": { GameObject val11 = Plugin.bundle.LoadAsset<GameObject>("assets/bundles/fishingstuff/level prefabs/Fishspots1.prefab"); GameObject val12 = Object.Instantiate<GameObject>(val11); { foreach (Transform item in val12.transform) { Transform val13 = item; WaterBuilder.SetWater(((Component)val13).gameObject).AddFish("Wire Shark").SetSplash("Electricity") .SetUp("Wire", Color.yellow); ((Component)val1