void Awake()
        {
            //this.repositoryUrl = "https://github.com/Conqu3red/BungeeRopeMod/"; // repo to check for updates from
            if (instance == null)
            {
                instance = this;
            }
            // Use this if you wish to make the mod trigger cheat mode ingame.
            // Set this true if your mod effects physics or allows mods that you can't normally do.
            isCheat = true;

            modEnabled    = Config.Bind(PluginName, "Mod Enabled", true, "Enable Mod");
            bungeeKeyBind = Config.Bind(PluginName, "Bungee Rope keybind", new BepInEx.Configuration.KeyboardShortcut(KeyCode.Alpha8));


            modEnabled.SettingChanged += onEnableDisable;
            onEnableDisable(null, null);

            harmony = new Harmony("org.bepinex.plugins.Material8Mod");
            harmony.PatchAll(Assembly.GetExecutingAssembly());

            this.authors = new string[] { "Conqu3red" };

            PolyTechMain.registerMod(this);

            /* -- NOTES --
             *  bungee rope (material 8)
             *      edge.m_Material.m_EdgeMaterial.isSpring = true
             *      edge.m_SpringCoilVisualization = null
             *      it has to be a (BridgeSpring)
             *
             *  Panel_Materials
             */
        }
Exemple #2
0
        void Awake()
        {
            if (instance == null)
            {
                instance = this;
            }
            // Use this if you wish to make the mod trigger cheat mode ingame.
            // Set this true if your mod effects physics or allows mods that you can't normally do.
            isCheat = false;
            // Set this to whether the mod is currently enabled or not.
            // Usually you want this to be true by default.


            // Register the mod to PTF, that way it will be able to be configured using PTF ingame.

            modEnabled = Config.Bind(modEnabledDef, true, new ConfigDescription("Enable Mod"));
            modEnabled.SettingChanged += onEnableDisable;

            harmony = new Harmony("org.bepinex.plugins.ConsoleCinematicCamera");
            harmony.PatchAll(Assembly.GetExecutingAssembly());
            Logger.LogInfo("Console Initiated.");
            // ConsoleCommands.Init();

            PolyTechMain.registerMod(this);
        }
Exemple #3
0
        private static void toggleCheat()
        {
            bool val = uConsole.GetBool();

            PolyTechMain.setCheat(instance, val);
            PopUpMessage.DisplayOkOnly("Set Console mod cheat? to " + val.ToString(), null);
        }
Exemple #4
0
        void Awake()
        {
            this.repositoryUrl = "https://github.com/Conqu3red/Template-Mod/"; // repo to check for updates from
            if (instance == null)
            {
                instance = this;
            }
            // Use this if you wish to make the mod trigger cheat mode ingame.
            // Set this true if your mod effects physics or allows mods that you can't normally do.
            isCheat = false;

            modEnabled = Config.Bind("Template Mod", "modEnabled", true, "Enable Mod");

            modEnabled.SettingChanged += onEnableDisable;

            harmony = new Harmony("org.bepinex.plugins.TemplateMod");
            harmony.PatchAll(Assembly.GetExecutingAssembly());

            this.authors = new string[] { "Conqu3red" };

            // just a log statement
            Logger.LogInfo("aaa");

            PolyTechMain.registerMod(this);
        }
Exemple #5
0
        void Awake()
        {
            staticLogger = Logger;

            var harmony = new Harmony(PluginGuid);

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            SetupTotalHotkeys();
            SetupSettings();

            PolyTechMain.registerMod(this);
        }
        void Awake()
        {
            mEnabled = (ConfigEntry <bool>)Config[mEnabledDefinition];
            // Use this if you wish to make the mod trigger cheat mode ingame.
            // Set this true if your mod effects physics or allows mods that you can't normally do.
            this.isCheat = false;
            // Set this to whether the mod is currently enabled or not.
            // Usually you want this to be true by default.
            this.isEnabled = true;

            saved_Edges             = new List <List <ClipboardEdge> >();
            saved_Joints            = new List <List <ClipboardJoint> >();
            clipboard_History_Index = 0;

            // Register the mod to PTF, that way it will be able to be configured using PTF ingame.
            PolyTechMain.registerMod(this);
            Logger.LogInfo("Clipboard History mod registered");

            // Implement code changes
            Harmony.CreateAndPatchAll(typeof(ClipboardHistory));
        }
        void Awake()
        {
            if (instance == null)
            {
                instance = this;
            }
            MainPath = Application.dataPath.Replace("Poly Bridge 2_Data", "BepInEx/plugins/CampaignMod/");

            int order = 0;

            Config.Bind(modEnableDef, true, new ConfigDescription("Controls if the mod should be enabled or disabled", null, new ConfigurationManagerAttributes {
                Order = order
            }));
            mEnabled = (ConfigEntry <bool>)Config[modEnableDef];
            mEnabled.SettingChanged += onEnableDisable;
            order--;

            Config.Bind(NameDef, "", new ConfigDescription("Controls your name", null, new ConfigurationManagerAttributes {
                Order = order
            }));
            mName = (ConfigEntry <string>)Config[NameDef];
            order--;


            Config.SettingChanged += onSettingChanged;
            onSettingChanged(null, null);

            Harmony harmony = new Harmony(pluginGuid);

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            isCheat   = false;
            isEnabled = mEnabled.Value;

            try
            {
                Debug.Log("Creatng folders");
                if (!Directory.Exists(MainPath))
                {
                    Directory.CreateDirectory(MainPath);
                    Debug.Log("CampaignMod folder Created!");
                }
                else
                {
                    Debug.Log("CampaignMod folder already exists!");
                }

                if (!Directory.Exists(MainPath + "Campaigns"))
                {
                    Directory.CreateDirectory(MainPath + "Campaigns");
                    Debug.Log("Campaigns folder Created!");
                }
                else
                {
                    Debug.Log("Campaigns folder already exists!");
                }

                if (!Directory.Exists(MainPath + "Exports"))
                {
                    Directory.CreateDirectory(MainPath + "Exports");
                    Debug.Log("Exports folder Created!");
                }
                else
                {
                    Debug.Log("Exports folder already exists!");
                }
            }
            catch (Exception e)
            {
                Debug.Log("Something went wrong while creating folders\n" + e);
            }

            PolyTechMain.registerMod(this);
        }
        void Awake()
        {
            stressExponent = new ConfigEntry <float> [3];

            modEnabled = Config.Bind("", "Mod Enabled", true, new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 15
            }));
            replayStress = Config.Bind("", "Replay records stress view", false, new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 14
            }));
            highlightWorst = Config.Bind("", "Highlight worst stress during sim", false, new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 13
            }));
            markWorst = Config.Bind("", "Mark worst stress in editor (if no break)", false, new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 12
            }));
            stressSmoothing = Config.Bind("", "Current stress smoothing", 0.8f, new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 11
            }));
            maxStressHotkey = Config.Bind("", "Toggle max stress / current stress", new BepInEx.Configuration.KeyboardShortcut(KeyCode.X), new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 10
            }));
            stressExponent[0] = Config.Bind("", "Stress exponent 1", 0.33f, new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 9
            }));
            stressExponent[1] = Config.Bind("", "Stress exponent 2", 1.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 8
            }));
            stressExponent[2] = Config.Bind("", "Stress exponent 3", 3.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 7
            }));
            stressExponentKey = Config.Bind("", "Stress exponent key", new BepInEx.Configuration.KeyboardShortcut(KeyCode.J), new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 6
            }));
            colCompressionMax = Config.Bind("", "Compression Max", new Vector3(0.0f, 1.0f, 0.8f), new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 5, CustomDrawer = HsvDrawer
            }));
            colCompressionMin = Config.Bind("", "Compression Min", new Vector3(0.0f, 1.0f, 0.0f), new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 4, CustomDrawer = HsvDrawer
            }));
            colTensionMin = Config.Bind("", "Tension Min", new Vector3(0.5f, 1.0f, 0.0f), new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 3, CustomDrawer = HsvDrawer
            }));
            colTensionMax = Config.Bind("", "Tension Max", new Vector3(0.5f, 1.0f, 0.8f), new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 2, CustomDrawer = HsvDrawer
            }));
            colHighlight = Config.Bind("", "Worst stress highlight color", new Color(1.0f, 0.0f, 1.0f), new ConfigDescription("", null, new ConfigurationManagerAttributes {
                Order = 1
            }));

            modEnabled.SettingChanged += onEnableDisable;

            staticLogger = Logger;

            var harmony = new Harmony(PluginGuid);

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            this.isCheat   = false;
            this.isEnabled = true;
            PolyTechMain.registerMod(this);
        }