Compare commits
No commits in common. "main" and "1.3.0" have entirely different histories.
@ -1,5 +1,4 @@
|
|||||||
using Aki.Reflection.Patching;
|
using Aki.Reflection.Patching;
|
||||||
using Comfort.Common;
|
|
||||||
using EFT;
|
using EFT;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
@ -9,13 +8,15 @@ namespace ValensHasThePower
|
|||||||
{
|
{
|
||||||
protected override MethodBase GetTargetMethod()
|
protected override MethodBase GetTargetMethod()
|
||||||
{
|
{
|
||||||
return typeof(GameWorld).GetMethod("OnGameStarted", BindingFlags.Public | BindingFlags.Instance);
|
var result = typeof(GameWorld).GetMethod("OnGameStarted", BindingFlags.Public | BindingFlags.Instance);
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
[PatchPostfix]
|
[PatchPostfix]
|
||||||
private static void PatchPostFix()
|
private static void PatchPostFix()
|
||||||
{
|
{
|
||||||
Singleton<GameWorld>.Instance.gameObject.AddComponent<PowerOn>();
|
PowerOn.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
14
PowerOn.cs
14
PowerOn.cs
@ -1,13 +1,16 @@
|
|||||||
using BepInEx;
|
using BepInEx;
|
||||||
using BepInEx.Configuration;
|
using BepInEx.Configuration;
|
||||||
using EFT.Interactive;
|
using EFT.Interactive;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace ValensHasThePower
|
namespace ValensHasThePower
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.Valens.HasThePower", "ValensHasThePower", "1.3.0")]
|
[BepInPlugin("com.Valens.HasThePower", "ValensHasThePower", "1.2.1")]
|
||||||
public class Plugin : BaseUnityPlugin
|
public class Plugin : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public static ConfigEntry<int> configCustoms;
|
public static ConfigEntry<int> configCustoms;
|
||||||
@ -45,11 +48,11 @@ namespace ValensHasThePower
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PowerOn : MonoBehaviour
|
public static class PowerOn
|
||||||
{
|
{
|
||||||
public void Start()
|
public static void Start()
|
||||||
{
|
{
|
||||||
List<Switch> PowerSwitches = FindObjectsOfType<Switch>().ToList();
|
List<Switch> PowerSwitches = UnityEngine.Object.FindObjectsOfType<Switch>().ToList();
|
||||||
|
|
||||||
foreach (var switcher in PowerSwitches)
|
foreach (var switcher in PowerSwitches)
|
||||||
{
|
{
|
||||||
@ -96,7 +99,8 @@ namespace ValensHasThePower
|
|||||||
}
|
}
|
||||||
private static void PowerSwitch(Switch switcher)
|
private static void PowerSwitch(Switch switcher)
|
||||||
{
|
{
|
||||||
switcher.Open();
|
switcher.GetType().GetMethod("Open", BindingFlags.NonPublic | BindingFlags.Instance)
|
||||||
|
.Invoke(switcher, new object[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,9 +26,6 @@
|
|||||||
<Reference Include="UnityEngine.CoreModule">
|
<Reference Include="UnityEngine.CoreModule">
|
||||||
<HintPath>shared\UnityEngine.CoreModule.dll</HintPath>
|
<HintPath>shared\UnityEngine.CoreModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Comfort.Common">
|
|
||||||
<HintPath>shared\Comfort.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -4,19 +4,24 @@
|
|||||||
<name>ConfigurationManager</name>
|
<name>ConfigurationManager</name>
|
||||||
</assembly>
|
</assembly>
|
||||||
<members>
|
<members>
|
||||||
|
<member name="M:ConfigurationManager.LegacySettingSearcher.GetLegacyPluginConfig(BepInEx.BaseUnityPlugin)">
|
||||||
|
<summary>
|
||||||
|
Used by bepinex 4 plugins
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="M:ConfigurationManager.SettingSearcher.GetBepInExCoreConfig">
|
<member name="M:ConfigurationManager.SettingSearcher.GetBepInExCoreConfig">
|
||||||
<summary>
|
<summary>
|
||||||
Get entries for all core BepInEx settings
|
Bepinex 5 config
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:ConfigurationManager.SettingSearcher.GetPluginConfig(BepInEx.BaseUnityPlugin)">
|
<member name="M:ConfigurationManager.SettingSearcher.GetPluginConfig(BepInEx.BaseUnityPlugin)">
|
||||||
<summary>
|
<summary>
|
||||||
Get entries for all settings of a plugin
|
Used by bepinex 5 plugins
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:ConfigurationManager.Utilities.Utils.FindPlugins">
|
<member name="M:ConfigurationManager.Utilities.Utils.FilterBrowsable``1(System.Collections.Generic.IEnumerable{``0},System.Boolean,System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
Search for all instances of BaseUnityPlugin loaded by chainloader or other means.
|
Return items with browsable attribute same as expectedBrowsable, and optionally items with no browsable attribute
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:ConfigurationManager.ConfigurationManager">
|
<member name="T:ConfigurationManager.ConfigurationManager">
|
||||||
@ -59,16 +64,17 @@
|
|||||||
Do not use any Begin / End layout methods, and avoid raising height from standard.
|
Do not use any Begin / End layout methods, and avoid raising height from standard.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:ConfigurationManager.ConfigurationManager.BuildSettingList">
|
|
||||||
<summary>
|
|
||||||
Rebuild the setting list. Use to update the config manager window if config settings were removed or added while it was open.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:ConfigurationManager.ConfigurationManager.SearchString">
|
<member name="P:ConfigurationManager.ConfigurationManager.SearchString">
|
||||||
<summary>
|
<summary>
|
||||||
String currently entered into the search box
|
String currently entered into the search box
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:ConfigurationManager.LegacySettingEntry.Wrapper">
|
||||||
|
<summary>
|
||||||
|
Instance of the object that holds this setting.
|
||||||
|
Null if setting is not in a ConfigWrapper.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:ConfigurationManager.SettingEntryBase">
|
<member name="T:ConfigurationManager.SettingEntryBase">
|
||||||
<summary>
|
<summary>
|
||||||
Class representing all data about a setting collected by ConfigurationManager.
|
Class representing all data about a setting collected by ConfigurationManager.
|
||||||
@ -91,23 +97,9 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:ConfigurationManager.SettingEntryBase.CustomDrawer">
|
<member name="P:ConfigurationManager.SettingEntryBase.CustomDrawer">
|
||||||
<summary>
|
<summary>
|
||||||
Custom setting draw action.
|
Custom setting draw action
|
||||||
Use either CustomDrawer or CustomHotkeyDrawer, using both at the same time leads to undefined behaviour.
|
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:ConfigurationManager.SettingEntryBase.CustomHotkeyDrawer">
|
|
||||||
<summary>
|
|
||||||
Custom setting draw action that allows polling keyboard input with the Input class.
|
|
||||||
Use either CustomDrawer or CustomHotkeyDrawer, using both at the same time leads to undefined behaviour.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:ConfigurationManager.SettingEntryBase.CustomHotkeyDrawerFunc">
|
|
||||||
<summary>
|
|
||||||
Custom setting draw action that allows polling keyboard input with the Input class.
|
|
||||||
</summary>
|
|
||||||
<param name="setting">Setting currently being set, is available</param>
|
|
||||||
<param name="isCurrentlyAcceptingInput">Set this ref parameter to true when you want the current setting drawer to receive Input events. Remember to set it to false after you are done!</param>
|
|
||||||
</member>
|
|
||||||
<member name="P:ConfigurationManager.SettingEntryBase.Browsable">
|
<member name="P:ConfigurationManager.SettingEntryBase.Browsable">
|
||||||
<summary>
|
<summary>
|
||||||
Show this setting in the settings screen at all? If false, don't show.
|
Show this setting in the settings screen at all? If false, don't show.
|
||||||
@ -212,5 +204,95 @@
|
|||||||
Newly assigned value
|
Newly assigned value
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:BepInEx.AcceptableValueListAttribute">
|
||||||
|
<summary>
|
||||||
|
Specify the list of acceptable values for this variable. It will allow the configuration window to show a list of available values.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.AcceptableValueListAttribute.#ctor(System.Object[])">
|
||||||
|
<summary>
|
||||||
|
Specify the list of acceptable values for this variable. It will allow the configuration window to show a list of available values.
|
||||||
|
</summary>
|
||||||
|
<param name="acceptableValues">List of acceptable values for this setting</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.AcceptableValueListAttribute.#ctor(System.String)">
|
||||||
|
<summary>
|
||||||
|
Specify a method that returns the list of acceptable values for this variable. It will allow the configuration window to show a list of available values.
|
||||||
|
</summary>
|
||||||
|
<param name="acceptableValueGetterName">Name of an instance method that takes no arguments and returns array object[] that contains the acceptable values</param>
|
||||||
|
</member>
|
||||||
|
<member name="T:BepInEx.AcceptableValueRangeAttribute">
|
||||||
|
<summary>
|
||||||
|
Specify the range of acceptable values for this variable. It will allow the configuration window to show a slider
|
||||||
|
and filter inputs.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.AcceptableValueRangeAttribute.#ctor(System.Object,System.Object,System.Boolean)">
|
||||||
|
<param name="minValue">Lowest acceptable value</param>
|
||||||
|
<param name="maxValue">Highest acceptable value</param>
|
||||||
|
<param name="showAsPercentage">
|
||||||
|
Show the current value as % between min and max values if possible. Otherwise show the
|
||||||
|
value itself.
|
||||||
|
</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.CustomSettingDrawAttribute.#ctor(System.String)">
|
||||||
|
<summary>
|
||||||
|
Register a custom field editor drawer that will replace config manager's default field editors
|
||||||
|
(The part between setting name and the default button).
|
||||||
|
</summary>
|
||||||
|
<param name="customFieldDrawMethod">Name of the method that will draw the edit field.
|
||||||
|
The method needs to be an instance method with signature <code>void Name ()</code>. Runs in OnGUI.</param>
|
||||||
|
</member>
|
||||||
|
<member name="T:BepInEx.KeyboardShortcut">
|
||||||
|
<summary>
|
||||||
|
A keyboard shortcut that can be used in Update method to check if user presses a key combo.
|
||||||
|
Use SavedKeyboardShortcut to allow user to change this shortcut and have the changes saved.
|
||||||
|
How to use: Use IsDown instead of the Imput.GetKeyDown in the Update loop.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.KeyboardShortcut.#ctor(UnityEngine.KeyCode,UnityEngine.KeyCode[])">
|
||||||
|
<summary>
|
||||||
|
Create a new keyboard shortcut.
|
||||||
|
</summary>
|
||||||
|
<param name="mainKey">Main key to press</param>
|
||||||
|
<param name="modifiers">Keys that should be held down before main key is registered</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.KeyboardShortcut.IsDown">
|
||||||
|
<summary>
|
||||||
|
Check if the main key was just pressed (Input.GetKeyDown), and specified modifier keys are all pressed
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.KeyboardShortcut.IsPressed">
|
||||||
|
<summary>
|
||||||
|
Check if the main key is currently held down (Input.GetKey), and specified modifier keys are all pressed
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.KeyboardShortcut.IsUp">
|
||||||
|
<summary>
|
||||||
|
Check if the main key was just lifted (Input.GetKeyUp), and specified modifier keys are all pressed.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:BepInEx.SavedKeyboardShortcut">
|
||||||
|
<summary>
|
||||||
|
A keyboard shortcut that is saved in the config file and can be changed by the user if ConfigurationManager plugin
|
||||||
|
is present.
|
||||||
|
How to use: Run IsPressed in Update to check if user presses the button combo.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.SavedKeyboardShortcut.IsPressed">
|
||||||
|
<summary>
|
||||||
|
Check if the main key is currently held down (Input.GetKey), and specified modifier keys are all pressed
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.SavedKeyboardShortcut.IsDown">
|
||||||
|
<summary>
|
||||||
|
Check if the main key was just pressed (Input.GetKeyDown), and specified modifier keys are all pressed
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:BepInEx.SavedKeyboardShortcut.IsUp">
|
||||||
|
<summary>
|
||||||
|
Check if the main key was just lifted (Input.GetKeyUp), and specified modifier keys are all pressed.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
</members>
|
</members>
|
||||||
</doc>
|
</doc>
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user