Esempio n. 1
0
 public ScadMod(string name, Type bepinModType, BepInEx.BaseUnityPlugin bepinPlugin)
 {
     this.name            = name;
     BepinExPluginType    = bepinModType;
     BepinPluginReference = bepinPlugin;
     SetupPluginData();
 }
Esempio n. 2
0
        public static void Awake(BepInEx.BaseUnityPlugin Plugin)
        {
            Enable = Plugin.Config.Bind("1. General", "Enable", true,
                                        new ConfigDescription("Enables or disables mod.", null,
                                                              new ConfigurationManagerAttributes {
                Order = 0, EntryColor = Lit
            }));
            DefaultTextColor = Plugin.Config.Bind("1. General", "Default Color", "#ededed",
                                                  new ConfigDescription("Changes the default text color of signs.", null,
                                                                        new ConfigurationManagerAttributes {
                Order = 1, DefaultValue = "#ededed"
            }));
            UseLibrary = Plugin.Config.Bind("1. General", "Library", true,
                                            new ConfigDescription("Read and use color_library.json", null,
                                                                  new ConfigurationManagerAttributes {
                Order = 2
            }));
            MaxFontSize = Plugin.Config.Bind("1. General", "Max Font Size", 8,
                                             new ConfigDescription("Set max size for the sign font.", null,
                                                                   new ConfigurationManagerAttributes {
                Order = 3, DefaultValue = 8
            }));

            EnableOutline = Plugin.Config.Bind("2. Outline", "Enable", true,
                                               new ConfigDescription("Enable the outlining of text in signs.", null,
                                                                     new ConfigurationManagerAttributes {
                Order = 4, EntryColor = Lit
            }));
            OutlineColor = Plugin.Config.Bind("2. Outline", "Color", "#272830",
                                              new ConfigDescription("Changes the default outline color of signs.", null,
                                                                    new ConfigurationManagerAttributes {
                Order = 5, DefaultValue = "#272830"
            }));
            OutlineSize = Plugin.Config.Bind("2. Outline", "Size", 0.15f,
                                             new ConfigDescription("Set size of the outline effect.",
                                                                   new AcceptableValueRange <float>(0f, 0.2f),
                                                                   new ConfigurationManagerAttributes {
                Order = 6, DefaultValue = 0.15f
            }));

            LoggerEnable = Plugin.Config.Bind("3. Logger", "Enable", true,
                                              new ConfigDescription("Enables or disables debugging logs.", null,
                                                                    new ConfigurationManagerAttributes {
                Order = 7, EntryColor = Lit
            }));

            Plugin.Config.SaveOnConfigSet = true;
            Plugin.Config.SettingChanged += (a, b) => ColorfulSigns.UpdateColorLib();
        }
Esempio n. 3
0
        public static void Awake(BepInEx.BaseUnityPlugin Plugin)
        {
            Plugin.Config.SaveOnConfigSet = true;

            GUI_TogglePanel = Plugin.Config.Bind("GUI", "Panel Toggle", KeyCode.PageUp,
                                                 new ConfigDescription("Set the key binding to open and close Areas GUI.", null,
                                                                       new ConfigurationManagerAttributes {
                IsAdminOnly = false
            }));
            GUI_ToggleMouse = Plugin.Config.Bind("GUI", "Mouse Toggle", KeyCode.PageDown,
                                                 new ConfigDescription("Set the key binding to show and hide mouse.", null,
                                                                       new ConfigurationManagerAttributes {
                IsAdminOnly = false
            }));
            GUI_DefaultPosition = Plugin.Config.Bind("GUI", "Default Position", "0:0",
                                                     new ConfigDescription("Default position at which Areas GUI will appear.", null,
                                                                           new ConfigurationManagerAttributes {
                IsAdminOnly = false
            }));
            GUI_DefaultSize = Plugin.Config.Bind("GUI", "Default Size", "1600:800",
                                                 new ConfigDescription("Default size at which Areas GUI will appear.", null,
                                                                       new ConfigurationManagerAttributes {
                IsAdminOnly = false
            }));

            LootEnable = Plugin.Config.Bind("Loot Fix", "Enable", true,
                                            new ConfigDescription("Enables or disables loot fixing.", null,
                                                                  new ConfigurationManagerAttributes {
                IsAdminOnly = true
            }));
            LootFix = Plugin.Config.Bind("Loot Fix", "Value", 10,
                                         new ConfigDescription("Number of levels it takes to get the next vanilla level reward. Only for Lv.3+. For example \"5\" will result in: [Lv.5 monster = Lv.4 reward] [Lv.10 monster = Lv.5 reward] [Lv.15 monster = Lv.6 reward]",
                                                               new AcceptableValueRange <int>(1, 50),
                                                               new ConfigurationManagerAttributes {
                IsAdminOnly = true
            }));

            LoggerEnable = Plugin.Config.Bind("Logger", "Enable", true,
                                              new ConfigDescription("Enables or disables debugging logs.", null,
                                                                    new ConfigurationManagerAttributes {
                IsAdminOnly = false
            }));
            if (LoggerEnable.Value)
            {
                BepInEx.Logging.Logger.Sources.Add(Main.Log);
            }
        }
Esempio n. 4
0
        public static void Awake(BepInEx.BaseUnityPlugin Plugin)
        {
            Enable = Plugin.Config.Bind("1. General", "Enable", true,
                                        new ConfigDescription("Enables or disables dungeon regeneration.", null,
                                                              new ConfigurationManagerAttributes {
                Order = 0, IsAdminOnly = true, EntryColor = Lit
            }));
            Interval = Plugin.Config.Bind("1. General", "Interval", 82800f,
                                          new ConfigDescription("Set the amount of seconds it takes each dungeon to try to regenerate.", null,
                                                                new ConfigurationManagerAttributes {
                Order = 1, IsAdminOnly = true
            }));
            AllowedThemes = Plugin.Config.Bind("1. General", "Themes", "Crypt, SunkenCrypt, Cave, ForestCrypt",
                                               new ConfigDescription("Set allowed dungeon themes to reset. Possible themes are: Crypt, SunkenCrypt, Cave, ForestCrypt, GoblinCamp, MeadowsVillage, MeadowsFarm", null,
                                                                     new ConfigurationManagerAttributes {
                Order = 2, IsAdminOnly = true
            }));
            PlayerProtection = Plugin.Config.Bind("1. General", "Player Protection", true,
                                                  new ConfigDescription("If enabled, dungeons won't reset while players are inside.", null,
                                                                        new ConfigurationManagerAttributes {
                Order = 3, IsAdminOnly = true
            }));
            PlayerProtectionInterval = Plugin.Config.Bind("1. General", "Player Protection Interval", 600f,
                                                          new ConfigDescription("Time it takes to retry a reset on a dungeon that wasn't reset due to Player Protection.", null,
                                                                                new ConfigurationManagerAttributes {
                Order = 4, IsAdminOnly = true
            }));

            CommandsEnable = Plugin.Config.Bind("2. Commands", "Enable", true,
                                                new ConfigDescription("Enables or disables commands.", null,
                                                                      new ConfigurationManagerAttributes {
                Order = 5, IsAdminOnly = true, EntryColor = Lit
            }));

            LoggerEnable = Plugin.Config.Bind("3. Logger", "Enable", true,
                                              new ConfigDescription("Enables or disables debugging logs.", null,
                                                                    new ConfigurationManagerAttributes {
                Order = 6, IsAdminOnly = false, EntryColor = Lit
            }));

            Plugin.Config.SaveOnConfigSet = true;
        }
Esempio n. 5
0
 /// <summary>
 /// A simple helper to generate a unique mod prefix for you.
 /// </summary>
 /// <param name="plugin">A reference to your plugin. (this.GetModPrefix)</param>
 /// <param name="bundleName">A unique name for the bundle (Unique within your mod)</param>
 /// <returns>The generated prefix</returns>
 public static String GetModPrefix(this BepInEx.BaseUnityPlugin plugin, String bundleName)
 {
     return(String.Format("@{0}+{1}", plugin.Info.Metadata.Name, bundleName));
 }
Esempio n. 6
0
        public static void Awake(BepInEx.BaseUnityPlugin Plugin)
        {
            #region 1. General
            Enable = Plugin.Config.Bind("1. General", "Enable", true,
                                        new ConfigDescription("Enables or disables mod.", null,
                                                              new ConfigurationManagerAttributes {
                Order = 0, EntryColor = Lit
            }));

            DontPinWhenInvIsEmpty = Plugin.Config.Bind("1. General", "Generate with empty inventory", true,
                                                       new ConfigDescription("Death Pin will won't be generated if your inventory was empty.", null,
                                                                             new ConfigurationManagerAttributes {
                Order = 1
            }));
            RemoveAtRetrieval = Plugin.Config.Bind("1. General", "Remove at retrieval", true,
                                                   new ConfigDescription("Death Pin will dissapear automatically when Tombstone is retrieved.", null,
                                                                         new ConfigurationManagerAttributes {
                Order = 2
            }));
            #endregion

            #region 2. Colors
            EnableColors = Plugin.Config.Bind("2. Colors", "Enable", true,
                                              new ConfigDescription("Enables or disables pin colorization", null,
                                                                    new ConfigurationManagerAttributes {
                Order = 3, EntryColor = Lit
            }));

            ColorDeath = Plugin.Config.Bind("2. Colors", "Death Color", "#d43d3d", // Red
                                            new ConfigDescription("Color for the death pin.", null,
                                                                  new ConfigurationManagerAttributes {
                Order = 4, DefaultValue = "#d43d3d"
            }));
            ColorBed = Plugin.Config.Bind("2. Colors", "Bed Color", "#35b5cc", // Cyan
                                          new ConfigDescription("Color for the bed pin.", null,
                                                                new ConfigurationManagerAttributes {
                Order = 5, DefaultValue = "#35b5cc"
            }));

            ColorFireplace = Plugin.Config.Bind("2. Colors", "Fireplace Color", "#d6b340", // Orange
                                                new ConfigDescription("Color for the first freely placeable pin: Fireplace.", null,
                                                                      new ConfigurationManagerAttributes {
                Order = 6, DefaultValue = "#d6b340"
            }));
            ColorHouse = Plugin.Config.Bind("2. Colors", "House Color", "#35b5cc", // Cyan
                                            new ConfigDescription("Color for the second freely placeable pin: House.", null,
                                                                  new ConfigurationManagerAttributes {
                Order = 7, DefaultValue = "#35b5cc"
            }));
            ColorHammer = Plugin.Config.Bind("2. Colors", "Hammer Color", "#737373", // Light Dusk
                                             new ConfigDescription("Color for the third freely placeable pin: Hammer.", null,
                                                                   new ConfigurationManagerAttributes {
                Order = 8, DefaultValue = "#737373"
            }));
            ColorBall = Plugin.Config.Bind("2. Colors", "Ball Color", "#c95151", // Red
                                           new ConfigDescription("Color for the fourth freely placeable pin: Ball.", null,
                                                                 new ConfigurationManagerAttributes {
                Order = 9, DefaultValue = "#c95151"
            }));
            ColorCave = Plugin.Config.Bind("2. Colors", "Cave Color", "#a86840", // Brown
                                           new ConfigDescription("Color for the fifth freely placeable pin: Cave.", null,
                                                                 new ConfigurationManagerAttributes {
                Order = 10, DefaultValue = "#a86840"
            }));

            ColorBoss = Plugin.Config.Bind("2. Colors", "Boss Color", "#9c39ed", // Purple
                                           new ConfigDescription("Color for the boss pin.", null,
                                                                 new ConfigurationManagerAttributes {
                Order = 11, DefaultValue = "#9c39ed"
            }));
            ColorPlayer = Plugin.Config.Bind("2. Colors", "Player Color", "#ffffff", // Purple
                                             new ConfigDescription("Color for the player pin.", null,
                                                                   new ConfigurationManagerAttributes {
                Order = 12, DefaultValue = "#ffffff"
            }));
            ColorShout = Plugin.Config.Bind("2. Colors", "Shout Color", "#ffffff", // White
                                            new ConfigDescription("Color for the shout pin.", null,
                                                                  new ConfigurationManagerAttributes {
                Order = 13, DefaultValue = "#ffffff"
            }));
            ColorRandomEvent = Plugin.Config.Bind("2. Colors", "Random Event Color", "#ffffff", // White
                                                  new ConfigDescription("Color for the random event pin.", null,
                                                                        new ConfigurationManagerAttributes {
                Order = 14, DefaultValue = "#ffffff"
            }));
            ColorPing = Plugin.Config.Bind("2. Colors", "Ping Color", "#ffffff", // White
                                           new ConfigDescription("Color for the ping pin.", null,
                                                                 new ConfigurationManagerAttributes {
                Order = 15, DefaultValue = "#ffffff"
            }));
            ColorEventArea = Plugin.Config.Bind("2. Colors", "Event Area Color", "#ffffff", // White
                                                new ConfigDescription("Color for the event area pin.", null,
                                                                      new ConfigurationManagerAttributes {
                Order = 16, DefaultValue = "#ffffff"
            }));
            #endregion

            #region 3. AutoPin
            EnableAutoPin = Plugin.Config.Bind("3. AutoPin", "Enable", true,
                                               new ConfigDescription("Enables or disables automatic pin placement.", null,
                                                                     new ConfigurationManagerAttributes {
                Order = 17, EntryColor = Lit
            }));

            AutoTin = Plugin.Config.Bind("3. AutoPin", "Autopin Tin ore", "Hammer:Tin",
                                         new ConfigDescription("Pin tin when hit with something. Type of pin at the left, pin name at the right.", null,
                                                               new ConfigurationManagerAttributes {
                Order = 18, DefaultValue = "Hammer:Tin"
            }));
            AutoCopper = Plugin.Config.Bind("3. AutoPin", "Autopin Copper ore", "Hammer:Copper",
                                            new ConfigDescription("Pin copper when hit with something. Type of pin at the left, pin name at the right.", null,
                                                                  new ConfigurationManagerAttributes {
                Order = 19, DefaultValue = "Hammer:Copper"
            }));
            AutoSilver = Plugin.Config.Bind("3. AutoPin", "Autopin Silver ore", "Hammer:Silver",
                                            new ConfigDescription("Pin silver when hit with something. Type of pin at the left, pin name at the right.", null,
                                                                  new ConfigurationManagerAttributes {
                Order = 20, DefaultValue = "Hammer:Silver"
            }));
            AutoDungeon = Plugin.Config.Bind("3. AutoPin", "Autopin Dungeons", "Cave:",
                                             new ConfigDescription("Pin dungeons when interacting with their entrance. Leave right side unassigned for automatic naming.", null,
                                                                   new ConfigurationManagerAttributes {
                Order = 21, DefaultValue = "Cave:"
            }));
            #endregion

            #region 4. Logger
            LoggerEnable = Plugin.Config.Bind("4. Logger", "Enable", true,
                                              new ConfigDescription("Enables or disables debugging logs.", null,
                                                                    new ConfigurationManagerAttributes {
                Order = 99, EntryColor = Lit
            }));
            #endregion

            Plugin.Config.SaveOnConfigSet = true;
            Plugin.Config.SettingChanged += (a, b) => PinColor.UpdateColorLib();
            Plugin.Config.SettingChanged += (a, b) => PinAuto.UpdateAutoPinData();
        }