예제 #1
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();
        }
        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();
        }
예제 #3
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();
        }
예제 #4
0
        public override void Load()
        {
            GameOptionsData.RecommendedImpostors = GameOptionsData.MaxImpostors = Enumerable.Repeat(127, 127).ToArray();
            GameOptionsData.MinPlayers           = Enumerable.Repeat(4, 127).ToArray();
            RegisterCustomRpcAttribute.Register(this);

            Harmony.PatchAll();
        }
예제 #5
0
        public override void Load()
        {
            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);

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

            gameObject.AddComponent <ExampleComponent>().Plugin = this;
        }
예제 #6
0
        public override void Load()
        {
            logger = Log;

            Harmony.PatchAll();

            RegisterInIl2CppAttribute.Register();
            RegisterCustomRpcAttribute.Register(this);
        }
        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();
        }
        public override void Load()
        {
            logger = Log;

            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);
            };
        }
예제 #9
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();
        }
예제 #10
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;
        }
예제 #11
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>.");
        }
예제 #12
0
 public override void Load()
 {
     RegisterCustomRpcAttribute.Register(this);
     Harmony.PatchAll();
 }