public override void Load()
        {
            Enabled = Config.Bind("Server", "Enable custom Server", true);
            Ip      = Config.Bind("Server", "Ipv4 or Hostname", "31.3.2021.popmod.net");
            Port    = Config.Bind("Server", "Port", (ushort)22023);

            LoadAssets();
            CreateOptions();



            ReactorVersionShower.TextUpdated += (TextRenderer renderer) =>
            {
                var version = Assembly.GetExecutingAssembly().GetName().Version.ToString(3);
                renderer.Text += Environment.NewLine + "Popeyes Roles Mod v" + version;
                Coroutines.Start(CheckForUpdates(renderer, version));
            };

            CustomOption.ShamelessPlug = false;
            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);

            if (Enabled.Value)
            {
                AddCustomRegion();
            }

            Harmony.PatchAll();
        }
Пример #2
0
        public override void Load()
        {
            Harmony.PatchAll();

#if !S20210615 && !S20210630
            PluginSingleton <EssentialsPlugin> .Instance = this;

            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);
#endif

            ReactorVersionShower.TextUpdated += (text) =>
            {
#if S20201209 || S20210305 || S202103313
                string txt = text.Text;
#else
                string txt = text.text;
#endif

                int index = txt.IndexOf('\n');
                txt = txt.Insert(index == -1 ? txt.Length - 1 : index, "\nEssentials " + typeof(EssentialsPlugin).Assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>().InformationalVersion);

#if S20201209 || S20210305 || S202103313
                text.Text = txt;
#else
                text.text = txt;
#endif
            };

            HudPosition.Load();
        }
Пример #3
0
        public override void Load()
        {
            Ip   = Config.Bind("Custom", "Ipv4 or Hostname", "127.0.0.1");
            Port = Config.Bind("Custom", "Port", (ushort)22023);

            Main.Assets.bundle         = AssetBundle.LoadFromFile(Directory.GetCurrentDirectory() + "\\Assets\\bundle");
            Main.Assets.breakClip      = Main.Assets.bundle.LoadAsset <AudioClip>("SB").DontUnload();
            Main.Assets.repairIco      = Main.Assets.bundle.LoadAsset <Sprite>("RE").DontUnload();
            Main.Assets.shieldIco      = Main.Assets.bundle.LoadAsset <Sprite>("SA").DontUnload();
            Main.Assets.smallShieldIco = Main.Assets.bundle.LoadAsset <Sprite>("RESmall").DontUnload();

            //Disable the https://github.com/DorCoMaNdO/Reactor-Essentials watermark.
            //The code said that you were allowed, as long as you provided credit elsewhere.
            //I added a link in the Credits of the GitHub page, and I'm also mentioning it here.
            //If the owner of this library has any problems with this, just message me on discord and we'll find a solution

            //Hunter101#1337
            CustomOption.ShamelessPlug = false;

            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);

            AddCustomRegion();

            Harmony.PatchAll();
        }
Пример #4
0
 public override void Load()
 {
     Logger = Log;
     Harmony.PatchAll();
     AssetsLoader.LoadAssets();
     RegisterInIl2CppAttribute.Register();
     GameOptionsFormat();
 }
Пример #5
0
        public override void Load()
        {
            logger = Log;

            Harmony.PatchAll();

            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);
        }
Пример #6
0
        public override void Load()
        {
            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);

            var gameObject = new GameObject(nameof(ReactorPlugin)).DontDestroy();

            gameObject.AddComponent <ExampleComponent>().Plugin = this;
        }
Пример #7
0
        public override void Load()
        {
            PipeClient.Main();
            CustomColorLoader.AddCustomColorsToGame();

            //Used to get colors working
            RegisterInIl2CppAttribute.Register();

            Harmony.PatchAll();
        }
Пример #8
0
        public override void Load()
        {
            RegisterInIl2CppAttribute.Register();

            var gameObject = new GameObject(nameof(DebuggerPlugin)).DontDestroy();

            Component = gameObject.AddComponent <DebuggerComponent>();

            GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = Enumerable.Repeat((int)byte.MaxValue, byte.MaxValue).ToArray();
            GameOptionsData.MinPlayers   = Enumerable.Repeat(1, 4).ToArray();

            Harmony.PatchAll();
        }
        public override void Load()
        {
            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);

            log = Log;

            log.LogMessage("squarewaterlemon More Roles Mod Loaded!");

            // Credit given in the Ping Tracker & Github
            CustomOption.ShamelessPlug = false;

            Harmony.PatchAll();
        }
Пример #10
0
        public override void Load()
        {
            RegisterInIl2CppAttribute.Register();

            var gameObject = new GameObject(nameof(DebuggerPlugin)).DontDestroy();

            Component = gameObject.AddComponent <DebuggerComponent>();

            Harmony.PatchAll();

            Extensions.Extensions.once_sceneLoaded((_, _) =>
            {
                Dumping.Dump();
            });
        }
Пример #11
0
        public override void Load()
        {
            PluginSingleton <EssentialsPlugin> .Instance = this;

            Harmony.PatchAll();

            RegisterInIl2CppAttribute.Register();
            //RegisterCustomRpcAttribute.Register(this);

            ReactorVersionShower.TextUpdated += (text) =>
            {
                int index = text.Text.IndexOf('\n');
                text.Text = text.Text.Insert(index == -1 ? text.Text.Length - 1 : index, "\nEssentials " + typeof(EssentialsPlugin).Assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>().InformationalVersion);
            };
        }
Пример #12
0
        public override void Load()
        {
            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);

            var gameObject = new GameObject(nameof(ReactorPlugin)).DontDestroy();

            gameObject.AddComponent <FloofUsComponent>().Plugin = this;

            Kill = CreateSprite("FloofUs.Resources.Kill.png");

            RolesManager.InitializeRoles();


            Harmony.PatchAll();
        }
Пример #13
0
        public override void Load()
        {
            Harmony.PatchAll();

#if !S20210615 && !S20210630
            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);
#endif

            ConvertButton = new CooldownButton("Resources.Button.png", new HudPosition(GameplayButton.OffsetX, GameplayButton.OffsetY, HudAlignment.BottomRight), PlayerControl.GameOptions.KillCooldown, 0, 10)
            {
                Visible   = false,
                Clickable = false
            };
            ConvertButton.OnClick  += ConvertButton_OnClick;
            ConvertButton.OnUpdate += ConvertButton_OnUpdate;
        }
Пример #14
0
        public override void Load()
        {
            Harmony.PatchAll();

            AssetLoader.BundleLoad();

            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);

            staticvars.noColorYoinking = true;

            sensei.NameOfRole   = "Sensei";
            sensei.RoleColor    = new Color(0.51f, 0.27f, 0.79f, 1f);
            sensei.IntroText    = "Seal The Impostors in your demonic sword.";
            sensei.EjectionText = "was The Sensei.";
            sensei.isEnabled    = true;
            sensei.canVent      = false;
            sensei.Awake();

            NewRole.pingText.Add("Sensei mod V1.0.0 \n[3AA3D9]github.com/DillyzThe1[]");
            NewRole.modsText.Add("Sensei Mod <#F6FF00>1.0.0</color> by <#3AA3D9>DillyzThe1</color>.");
        }
Пример #15
0
        public override void Load()
        {
            RegisterInIl2CppAttribute.Register();

            var gameObject = new GameObject(nameof(DebuggerPlugin)).DontDestroy();

            Component = gameObject.AddComponent <DebuggerComponent>();

            GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = Enumerable.Repeat((int)byte.MaxValue, byte.MaxValue).ToArray();
            GameOptionsData.MinPlayers   = Enumerable.Repeat(1, 4).ToArray();

            System.Console.WriteLine("Patching started.");
            List <string> blacklist = new List <string>();

            blacklist.Add("FixedUpdate");
            blacklist.Add("Awake");
            foreach (var method in typeof(ShipStatus).GetMethods())
            {
                if (method.ReturnType == typeof(void) && method.GetParameters().Length == 0 && !blacklist.Contains(method.Name))
                {
                    System.Console.WriteLine("Patching method " + method.Name + " ( PATCHED )");
                }
            }
            System.Console.WriteLine("AAAAAAAAAAAAAAAAAAAAAAa");
            foreach (var method in typeof(ShipStatus).GetMethods())
            {
                if (method.ReturnType == typeof(void) && method.GetParameters().Length == 2 && !blacklist.Contains(method.Name))
                {
                    System.Console.WriteLine("Patching method " + method.Name + " ( PATCHED " + method.GetParameters()[0].ParameterType.Name + " - " + method.GetParameters()[1].ParameterType.Name + " )");
                }
            }

            System.Console.WriteLine("Patching ended.");

            Harmony.PatchAll();
        }
        //this is where we start the adding colors
        //there will be a new color called "fortgreen"
        public override void Load()
        {
            //this are the short names
            string[] shortColorNames =
            {
                //we need to add the vanilla colors so that the new color won't replace it
                "RED",
                "DBLUE",
                "GRN",
                "PINK",
                "ORNG",
                "YLOW",
                "BLAK",
                "WHTE",
                "PURP",
                "BRWN",
                "CYAN",
                "LIME",
                //at the buttom of this text is the fortgreen
                "FRTE",
            };
            //this are the long names
            string[] colorNames =
            {
                "Red",
                "Dark Blue",
                "Green",
                "Pink",
                "Orange",
                "Yellow",
                "Black",
                "White",
                "Purple",
                "Brown",
                "Cyan",
                "Lime",
                //at the buttom of this text is the fortgreen (with full name)
                "Fortegreen"
            };
            Color32[] playerColors =
            {
                //this one are the colors
                new Color32(240,  19,  19, byte.MaxValue),
                new Color32(19,   46, 210, byte.MaxValue),
                new Color32(0,    92,  23, byte.MaxValue),
                new Color32(238,  84, 187, byte.MaxValue),
                new Color32(250, 167,   0, byte.MaxValue),
                new Color32(246, 246,  87, byte.MaxValue),
                new Color32(63,   71,  78, byte.MaxValue),
                new Color32(215, 225, 241, byte.MaxValue),
                new Color32(107,  47, 188, byte.MaxValue),
                new Color32(77,   50,  21, byte.MaxValue),
                new Color32(56,  254, 220, byte.MaxValue),
                new Color32(80,  240,  57, byte.MaxValue),
                //at the buttom of this text is the number color of the fortgreen
                new Color32(29,  152,  83, byte.MaxValue),

                //this are the one who add the shadow detail, if you remove them all (except the one thats in very buttom)
                //the shadow detail will desappear
            };
            Color32[] shadowColors =
            {
                new Color32(122,   8,  56, byte.MaxValue),
                new Color32(9,    21, 142, byte.MaxValue),
                new Color32(0,    56,  14, byte.MaxValue),
                new Color32(172,  43, 174, byte.MaxValue),
                new Color32(180,  62,  21, byte.MaxValue),
                new Color32(195, 136,  34, byte.MaxValue),
                new Color32(30,   31,  38, byte.MaxValue),
                new Color32(132, 149, 192, byte.MaxValue),
                new Color32(59,   23, 124, byte.MaxValue),
                new Color32(56,   37,  16, byte.MaxValue),
                new Color32(36,  168, 190, byte.MaxValue),
                new Color32(21,  168,  66, byte.MaxValue),
                new Color32(18,   63,  27, byte.MaxValue),
            };
            //this one is the one who loads the colors
            Palette.ShortColorNames    = shortColorNames;
            Palette.PlayerColors       = playerColors;
            Palette.ShadowColors       = shadowColors;
            MedScanMinigame.ColorNames = colorNames;
            Telemetry.ColorNames       = colorNames;

            //a default code
            RegisterInIl2CppAttribute.Register();
            Harmony.PatchAll();
        }
Пример #17
0
 public override void Load()
 {
     RegisterInIl2CppAttribute.Register();
     Harmony.PatchAll();
 }