Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of StalkerGoku v1.0.2
StalkerGoku.dll
Decompiled a year agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("StalkerGoku")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("StalkerGoku")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("37892a43-6bf0-4b0f-af25-0f36400bcdaa")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace StalkerGoku { [BepInPlugin("SteamBlizzard.StalkerGoku", "Stalker Goku", "1.0.2")] public class StalkerGokuBase : BaseUnityPlugin { private const string modUID = "SteamBlizzard.StalkerGoku"; private const string modName = "Stalker Goku"; private const string modVersion = "1.0.2"; private readonly Harmony harmony = new Harmony("SteamBlizzard.StalkerGoku"); internal static StalkerGokuBase instance; internal ManualLogSource logger; internal static AudioClip[] SoundNotice; internal static AudioClip[] SoundTeleportIn; internal static AudioClip[] SoundTeleportOut; internal static AudioClip[] SoundHey; internal static AudioClip[] SoundNone; internal static GameObject GokuModel; private void Awake() { logger = Logger.CreateLogSource("Stalker Goku"); logger.LogInfo((object)"Loading Stalker Goku mod..."); if ((Object)(object)instance == (Object)null) { instance = this; } else { Object.Destroy((Object)(object)this); } harmony.PatchAll(); string location = ((BaseUnityPlugin)instance).Info.Location; location = location.TrimEnd("StalkerGoku.dll".ToCharArray()); AssetBundle val = AssetBundle.LoadFromFile(location + "stalkergoku"); if ((Object)(object)val == (Object)null) { logger.LogError((object)"Failed to load asset bundle!"); return; } SoundNotice = (AudioClip[])(object)new AudioClip[2] { val.LoadAsset<AudioClip>("goku_ui"), val.LoadAsset<AudioClip>("prowler") }; SoundTeleportIn = (AudioClip[])(object)new AudioClip[1] { val.LoadAsset<AudioClip>("teleport_in") }; SoundTeleportOut = (AudioClip[])(object)new AudioClip[1] { val.LoadAsset<AudioClip>("teleport_out") }; SoundNone = (AudioClip[])(object)new AudioClip[1] { val.LoadAsset<AudioClip>("no_sound") }; SoundHey = (AudioClip[])(object)new AudioClip[1] { val.LoadAsset<AudioClip>("its_me_goku") }; GokuModel = val.LoadAsset<GameObject>("goku"); logger.LogInfo((object)"Successfully loaded assets and started Stalker Goku mod!"); } } } namespace StalkerGoku.Patches { [HarmonyPatch(typeof(EnemyThinMan))] internal class EnemyThinManPatch { [HarmonyPatch("Awake")] [HarmonyPostfix] private static void ReplaceAssets(EnemyThinMan __instance, ref EnemyThinManAnim ___anim) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) StalkerGokuBase.instance.logger.LogInfo((object)"Attempting to replace assets for EnemyThinMan..."); if ((Object)(object)StalkerGokuBase.GokuModel == (Object)null) { StalkerGokuBase.instance.logger.LogError((object)"Failed to load visuals for EnemyThinMan! Aborting asset replacement..."); return; } Transform child = ((Component)__instance).transform.parent.GetChild(2).GetChild(4).GetChild(0); GameObject val = Object.Instantiate<GameObject>(StalkerGokuBase.GokuModel, child); Transform transform = val.transform; transform.localPosition += new Vector3(0f, 0f - val.transform.position.y, 0f); val.transform.localRotation = Quaternion.identity; Transform transform2 = val.transform; transform2.localScale *= 7f; Renderer[] componentsInChildren = ((Component)child.GetChild(0)).gameObject.GetComponentsInChildren<Renderer>(); Renderer[] componentsInChildren2 = ((Component)child.GetChild(1)).gameObject.GetComponentsInChildren<Renderer>(); Renderer[] components = ((Component)child.GetChild(0).GetChild(1).GetChild(0)).gameObject.GetComponents<Renderer>(); Renderer[] array = componentsInChildren; foreach (Renderer val2 in array) { val2.enabled = false; } Renderer[] array2 = componentsInChildren2; foreach (Renderer val3 in array2) { val3.enabled = false; } Renderer[] array3 = components; foreach (Renderer val4 in array3) { val4.enabled = false; } ___anim.notice.Sounds = StalkerGokuBase.SoundNotice; ___anim.notice.PitchRandom = 0f; ___anim.teleportIn.Sounds = StalkerGokuBase.SoundTeleportIn; ___anim.teleportOut.Sounds = StalkerGokuBase.SoundTeleportOut; ___anim.screamLocal.Sounds = StalkerGokuBase.SoundHey; ___anim.screamLocal.PitchRandom = 0f; ___anim.screamGlobal.Sounds = StalkerGokuBase.SoundHey; ___anim.screamGlobal.PitchRandom = 0f; ___anim.attack.Sounds = StalkerGokuBase.SoundNone; ___anim.growLoop.Sounds = StalkerGokuBase.SoundNone; ((Component)___anim).transform.parent = val.transform.parent; GameObject gameObject = ((Component)((Component)__instance).transform.parent.GetChild(2).GetChild(3)).gameObject; PropLight component = gameObject.GetComponent<PropLight>(); component.lightRangeMultiplier = 0f; StalkerGokuBase.instance.logger.LogInfo((object)"Replaced assets for EnemyThinMan"); } [HarmonyPatch("Update")] [HarmonyPostfix] private static void Update(EnemyThinMan __instance, ref EnemyThinManAnim ___anim) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((Component)__instance).transform.position = ((Component)___anim).transform.position; } } }