using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using FishNet.Object; using HarmonyLib; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Estonia")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Seagull spawning controls for How to Fish.")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SeagullsSpawner")] [assembly: AssemblyTitle("SeagullsSpawner")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SeagullsSpawner { [BepInPlugin("estonia.howtofish.seagullsspawner", "Seagulls Spawner", "1.1.0")] [BepInProcess("How to Fish.exe")] public sealed class SeagullsSpawnerPlugin : BaseUnityPlugin { [HarmonyPatch(typeof(BirdManager), "LookForFood")] private static class BirdManagerLookForFoodPatch { private static bool Prefix() { return Random.Range(0f, 100f) <= StealAttemptChance; } } private const string PluginGuid = "estonia.howtofish.seagullsspawner"; private const string PluginName = "Seagulls Spawner"; private const string PluginVersion = "1.1.0"; private const string Author = "Estonia"; private static readonly BindingFlags PrivateStatic = BindingFlags.Static | BindingFlags.NonPublic; private static readonly BindingFlags PrivateInstance = BindingFlags.Instance | BindingFlags.NonPublic; private static SeagullsSpawnerPlugin _instance; private ConfigEntry _autoSpawn; private ConfigEntry _maxFlyingSeagulls; private ConfigEntry _spawnInterval; private ConfigEntry _spawnBurst; private ConfigEntry _spawnRadius; private ConfigEntry _spawnHeight; private ConfigEntry _stealAttemptChance; private Harmony _harmony; private PauseManager _pauseManager; private GameObject _serverSettingsScreen; private GameObject _controlsRoot; private GameObject _buttonTemplate; private TextMeshProUGUI _textTemplate; private TextMeshProUGUI _statusText; private TextMeshProUGUI _spawnText; private TextMeshProUGUI _autoButtonText; private TextMeshProUGUI _spawnBurstButtonText; private TextMeshProUGUI _maxMinusText; private TextMeshProUGUI _maxPlusText; private TextMeshProUGUI _frequencyFasterText; private TextMeshProUGUI _frequencySlowerText; private TextMeshProUGUI _burstMinusText; private TextMeshProUGUI _burstPlusText; private TextMeshProUGUI _stealMinusText; private TextMeshProUGUI _stealPlusText; private Bird _birdPrefab; private float _nextSpawnTime; private readonly List _spawnedBirds = new List(); private readonly List