Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44f96a1490 | |||
| 1c4dd32ea8 |
@@ -4,7 +4,7 @@
|
|||||||
<AssemblyName>AutomaticShipSystems</AssemblyName>
|
<AssemblyName>AutomaticShipSystems</AssemblyName>
|
||||||
<Description>
|
<Description>
|
||||||
</Description>
|
</Description>
|
||||||
<Version>0.0.1</Version>
|
<Version>0.0.2</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<RestoreAdditionalProjectSources>
|
<RestoreAdditionalProjectSources>
|
||||||
|
|||||||
@@ -4,19 +4,23 @@ namespace AutomaticShipSystems
|
|||||||
{
|
{
|
||||||
internal class Configs
|
internal class Configs
|
||||||
{
|
{
|
||||||
internal const double CircuitBreakerDelay = 30 * 1000;
|
|
||||||
internal const double ThrusterBoosterDelay = 60 * 1000;
|
|
||||||
internal const double TrimDelay = 5 * 60 * 1000;
|
|
||||||
|
|
||||||
internal static ConfigEntry<bool> CircuitBreakerConfig;
|
internal static ConfigEntry<bool> CircuitBreakerConfig;
|
||||||
internal static ConfigEntry<bool> ThrusterBoosterConfig;
|
internal static ConfigEntry<bool> ThrusterBoosterConfig;
|
||||||
internal static ConfigEntry<bool> TrimConfig;
|
internal static ConfigEntry<bool> TrimConfig;
|
||||||
|
|
||||||
|
internal static ConfigEntry<double> CircuitBreakerDelay;
|
||||||
|
internal static ConfigEntry<double> ThrusterBoosterDelay;
|
||||||
|
internal static ConfigEntry<double> TrimDelay;
|
||||||
|
|
||||||
internal static void Load(BepinPlugin plugin)
|
internal static void Load(BepinPlugin plugin)
|
||||||
{
|
{
|
||||||
CircuitBreakerConfig = plugin.Config.Bind("AutomaticShipSystems", "CircuitBreakers", true);
|
CircuitBreakerConfig = plugin.Config.Bind("AutomaticShipSystems", "CircuitBreakers", true);
|
||||||
ThrusterBoosterConfig = plugin.Config.Bind("AutomaticShipSystems", "ThrusterBooster", true);
|
ThrusterBoosterConfig = plugin.Config.Bind("AutomaticShipSystems", "ThrusterBooster", true);
|
||||||
TrimConfig = plugin.Config.Bind("AutomaticShipSystems", "Trim", true);
|
TrimConfig = plugin.Config.Bind("AutomaticShipSystems", "Trim", true);
|
||||||
|
|
||||||
|
CircuitBreakerDelay = plugin.Config.Bind("AutomaticShipSystems", "CircuitBreakersTimer", (double)(30 * 1000));
|
||||||
|
ThrusterBoosterDelay = plugin.Config.Bind("AutomaticShipSystems", "ThrusterBoosterTimer", (double)(60 * 1000));
|
||||||
|
TrimDelay = plugin.Config.Bind("AutomaticShipSystems", "TrimTimer", (double)(5 * 60 * 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace AutomaticShipSystems
|
|||||||
ClientGame.Current?.PlayerShip?.GetModule<Helm>()?.Engine?.GetComponentsInChildren<Enhancement>()?.Contains(__instance) == true &&
|
ClientGame.Current?.PlayerShip?.GetModule<Helm>()?.Engine?.GetComponentsInChildren<Enhancement>()?.Contains(__instance) == true &&
|
||||||
newState == EnhancementState.Inactive)
|
newState == EnhancementState.Inactive)
|
||||||
{
|
{
|
||||||
Tools.DelayDoUnique(__instance, () => ResetTrim(__instance), Configs.TrimDelay);
|
Tools.DelayDoUnique(__instance, () => ResetTrim(__instance), Configs.TrimDelay.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ namespace AutomaticShipSystems
|
|||||||
{
|
{
|
||||||
if (trim.CurrentState.Value == EnhancementState.Inactive)
|
if (trim.CurrentState.Value == EnhancementState.Inactive)
|
||||||
{
|
{
|
||||||
Tools.DelayDoUnique(trim, () => ResetTrim(trim), Configs.TrimDelay);
|
Tools.DelayDoUnique(trim, () => ResetTrim(trim), Configs.TrimDelay.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using VoidManager.CustomGUI;
|
using UnityEngine;
|
||||||
|
using VoidManager.CustomGUI;
|
||||||
using VoidManager.Utilities;
|
using VoidManager.Utilities;
|
||||||
|
|
||||||
namespace AutomaticShipSystems
|
namespace AutomaticShipSystems
|
||||||
@@ -9,9 +10,16 @@ namespace AutomaticShipSystems
|
|||||||
|
|
||||||
public override void Draw()
|
public override void Draw()
|
||||||
{
|
{
|
||||||
GUITools.DrawCheckbox("Circuit Breakers", ref Configs.CircuitBreakerConfig);
|
GUILayout.Label("Timers in MS. 1000 is equal to 1 second.\n");
|
||||||
GUITools.DrawCheckbox("Thruster Boosters", ref Configs.ThrusterBoosterConfig);
|
|
||||||
GUITools.DrawCheckbox("Trims", ref Configs.TrimConfig);
|
GUITools.DrawCheckbox("Auto Circuit Breakers Enabled", ref Configs.CircuitBreakerConfig);
|
||||||
|
GUITools.DrawTextField("Circut Breaker Timer", ref Configs.CircuitBreakerDelay);
|
||||||
|
GUILayout.Label(string.Empty);
|
||||||
|
GUITools.DrawCheckbox("Auto Thruster Boosters Enabled", ref Configs.ThrusterBoosterConfig);
|
||||||
|
GUITools.DrawTextField("Thruster Booster Timer", ref Configs.ThrusterBoosterDelay);
|
||||||
|
GUILayout.Label(string.Empty);
|
||||||
|
GUITools.DrawCheckbox("Auto Trims Enabled", ref Configs.TrimConfig);
|
||||||
|
GUITools.DrawTextField("Trim Timer", ref Configs.TrimDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ namespace AutomaticShipSystems
|
|||||||
public const string PLUGIN_GUID = $"{PLUGIN_ORIGINAL_AUTHOR}.{PLUGIN_NAME}";
|
public const string PLUGIN_GUID = $"{PLUGIN_ORIGINAL_AUTHOR}.{PLUGIN_NAME}";
|
||||||
public const string PLUGIN_NAME = "AutomaticShipSystems";
|
public const string PLUGIN_NAME = "AutomaticShipSystems";
|
||||||
public const string USERS_PLUGIN_NAME = "Automatic Ship Systems";
|
public const string USERS_PLUGIN_NAME = "Automatic Ship Systems";
|
||||||
public const string PLUGIN_VERSION = "0.0.1";
|
public const string PLUGIN_VERSION = "0.0.2";
|
||||||
public const string PLUGIN_DESCRIPTION = "Makes circuit breakers, thruster boosters, and trims self reset. Disables Progression.";
|
public const string PLUGIN_DESCRIPTION = "Makes circuit breakers, thruster boosters, and trims self reset. Disables Progression.";
|
||||||
public const string PLUGIN_ORIGINAL_AUTHOR = "18107";
|
public const string PLUGIN_ORIGINAL_AUTHOR = "18107";
|
||||||
public const string PLUGIN_AUTHORS = "18107";
|
public const string PLUGIN_AUTHORS = "18107, Dragon";
|
||||||
public const string PLUGIN_THUNDERSTORE_ID = "VoidCrewModdingTeam/Automatic_Ship_Systems";
|
public const string PLUGIN_THUNDERSTORE_ID = "VoidCrewModdingTeam/Automatic_Ship_Systems";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace AutomaticShipSystems
|
|||||||
|
|
||||||
if (!isOn && Configs.CircuitBreakerConfig.Value)
|
if (!isOn && Configs.CircuitBreakerConfig.Value)
|
||||||
{
|
{
|
||||||
Tools.DelayDoUnique(__instance, () => ResetCircuitBreakers(__instance), Configs.CircuitBreakerDelay);
|
Tools.DelayDoUnique(__instance, () => ResetCircuitBreakers(__instance), Configs.CircuitBreakerDelay.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ namespace AutomaticShipSystems
|
|||||||
{
|
{
|
||||||
if (!powerBreaker.IsOn.Value)
|
if (!powerBreaker.IsOn.Value)
|
||||||
{
|
{
|
||||||
Tools.DelayDoUnique(powerBreaker, () => powerBreaker.IsOn.RequestChange(true), Configs.CircuitBreakerDelay);
|
Tools.DelayDoUnique(powerBreaker, () => powerBreaker.IsOn.RequestChange(true), Configs.CircuitBreakerDelay.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
## 0.0.2
|
||||||
|
- Added config for timer duration.
|
||||||
|
|
||||||
## 0.0.1
|
## 0.0.1
|
||||||
- Updated for Void Crew 0.27.0 (Update 5).
|
- Updated for Void Crew 0.27.0 (Update 5).
|
||||||
- Disables Progression when starting a session as host.
|
- Disables Progression when starting a session as host.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ UserPluginName=Automatic Ship Systems
|
|||||||
ThunderstorePluginName=Automatic_Ship_Systems
|
ThunderstorePluginName=Automatic_Ship_Systems
|
||||||
|
|
||||||
; The current version of the mod. Used for File Version, BepinPlugin, Thunderstore manifest, and README.
|
; The current version of the mod. Used for File Version, BepinPlugin, Thunderstore manifest, and README.
|
||||||
PluginVersion=0.0.1
|
PluginVersion=0.0.2
|
||||||
|
|
||||||
; Version of the game this mod is built for. Used for README
|
; Version of the game this mod is built for. Used for README
|
||||||
GameVersion=0.27.0
|
GameVersion=0.27.0
|
||||||
@@ -24,7 +24,7 @@ PluginDescription=Makes circuit breakers, thruster boosters, and trims self rese
|
|||||||
PluginOriginalAuthor=18107
|
PluginOriginalAuthor=18107
|
||||||
|
|
||||||
; The various authors/editors of the mod, used for MyPluginInfo.cs. Leave blank to Auto-Fill from PluginOrignalAuthor
|
; The various authors/editors of the mod, used for MyPluginInfo.cs. Leave blank to Auto-Fill from PluginOrignalAuthor
|
||||||
PluginAuthors=
|
PluginAuthors=18107, Dragon
|
||||||
|
|
||||||
; WebpageLink - Used by manifest for thunderstore page. Can be left blank.
|
; WebpageLink - Used by manifest for thunderstore page. Can be left blank.
|
||||||
WebpageLink=https://github.com/Void-Crew-Modding-Team/AutomaticShipSystems
|
WebpageLink=https://github.com/Void-Crew-Modding-Team/AutomaticShipSystems
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Intended for solo players.
|
|||||||
- Automatically fixes trims after 5 minutes of being inactive
|
- Automatically fixes trims after 5 minutes of being inactive
|
||||||
- Automatically fixes circuit breakers after 30 seconds of being tripped
|
- Automatically fixes circuit breakers after 30 seconds of being tripped
|
||||||
- Automatcally charges boosts 1 minute after fully discharged.
|
- Automatcally charges boosts 1 minute after fully discharged.
|
||||||
- GUI to disable features
|
- GUI to configure features
|
||||||
- Disables progression when starting a session as host.
|
- Disables progression when starting a session as host.
|
||||||
|
|
||||||
### 🎮 Client Usage
|
### 🎮 Client Usage
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace AutomaticShipSystems
|
|||||||
|
|
||||||
if (state == ThrusterBoosterState.Off && Configs.ThrusterBoosterConfig.Value)
|
if (state == ThrusterBoosterState.Off && Configs.ThrusterBoosterConfig.Value)
|
||||||
{
|
{
|
||||||
Tools.DelayDoUnique(__instance, () => ChargeThrusterBooster(__instance), Configs.ThrusterBoosterDelay);
|
Tools.DelayDoUnique(__instance, () => ChargeThrusterBooster(__instance), Configs.ThrusterBoosterDelay.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ namespace AutomaticShipSystems
|
|||||||
{
|
{
|
||||||
if (booster.State == ThrusterBoosterState.Off)
|
if (booster.State == ThrusterBoosterState.Off)
|
||||||
{
|
{
|
||||||
Tools.DelayDoUnique(booster, () => ChargeThrusterBooster(booster), Configs.ThrusterBoosterDelay);
|
Tools.DelayDoUnique(booster, () => ChargeThrusterBooster(booster), Configs.ThrusterBoosterDelay.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
# Automatic Ship Systems
|
# Automatic Ship Systems
|
||||||
|
|
||||||
Version 0.0.1
|
Version 0.0.2
|
||||||
For Game Version 0.27.0
|
For Game Version 0.27.0
|
||||||
Developed by 18107
|
Developed by 18107, Dragon
|
||||||
Requires: BepInEx-BepInExPack-5.4.2100, VoidCrewModdingTeam-VoidManager-1.2.2
|
Requires: BepInEx-BepInExPack-5.4.2100, VoidCrewModdingTeam-VoidManager-1.2.2
|
||||||
|
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ Intended for solo players.
|
|||||||
- Automatically fixes trims after 5 minutes of being inactive
|
- Automatically fixes trims after 5 minutes of being inactive
|
||||||
- Automatically fixes circuit breakers after 30 seconds of being tripped
|
- Automatically fixes circuit breakers after 30 seconds of being tripped
|
||||||
- Automatcally charges boosts 1 minute after fully discharged.
|
- Automatcally charges boosts 1 minute after fully discharged.
|
||||||
- GUI to disable features
|
- GUI to configure features
|
||||||
- Disables progression when starting a session as host.
|
- Disables progression when starting a session as host.
|
||||||
|
|
||||||
### 🎮 Client Usage
|
### 🎮 Client Usage
|
||||||
|
|||||||
Reference in New Issue
Block a user