diff --git a/BeatSaberNoHealthAndSafety/BeatSaberNoHealthAndSafety.csproj b/BeatSaberNoHealthAndSafety/BeatSaberNoHealthAndSafety.csproj deleted file mode 100644 index bb27b08..0000000 --- a/BeatSaberNoHealthAndSafety/BeatSaberNoHealthAndSafety.csproj +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Debug - AnyCPU - {7BC4A8D2-92ED-4017-93F6-014F1747AEA2} - Library - Properties - BeatSaberSkipSafety - NoHealthAndSafety - v4.6 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\Assembly-CSharp.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Plugins\BeatSaberCustomUI.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\IllusionInjector.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\IllusionPlugin.dll - - - - - - - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\TextMeshPro-1.0.55.2017.1.0b12.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UI.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UIElementsModule.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UIModule.dll - - - D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.VRModule.dll - - - - - - - - - - copy /Y "$(TargetDir)$(TargetFileName)" "D:\SteamLibrary\SteamApps\common\Beat Saber\Plugins" - - \ No newline at end of file diff --git a/BeatSaberNoHealthAndSafety/Plugin.cs b/BeatSaberNoHealthAndSafety/Plugin.cs deleted file mode 100644 index ac88f95..0000000 --- a/BeatSaberNoHealthAndSafety/Plugin.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Media; -using TMPro; -using UnityEngine; -using UnityEngine.SceneManagement; -using IllusionPlugin; -using UnityEngine.UI; - -namespace BeatSaberNoHealthAndSafety -{ - public class Plugin : IPlugin - { - public string Name => "NoHealthAndSafety"; - public string Version => "0.0.1"; - - public void OnApplicationStart() - { - SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged; - SceneManager.sceneLoaded += SceneManager_sceneLoaded; - - } - - private void SceneManagerOnActiveSceneChanged(Scene oldScene, Scene newScene) - { - if (newScene.name == "HealthWarning") - { - new GameObject("ButtonPresser").AddComponent(); - } - } - - private void SceneManager_sceneLoaded(Scene scene, LoadSceneMode arg1) - { - } - - public void OnApplicationQuit() - { - SceneManager.activeSceneChanged -= SceneManagerOnActiveSceneChanged; - SceneManager.sceneLoaded -= SceneManager_sceneLoaded; - } - - public void OnLevelWasLoaded(int level) - { - } - - public void OnLevelWasInitialized(int level) - { - } - - public void OnUpdate() - { - } - - public void OnFixedUpdate() - { - } - } -} diff --git a/BeatSaberNoHealthAndSafety.sln b/NoHealthAndSafety.sln similarity index 56% rename from BeatSaberNoHealthAndSafety.sln rename to NoHealthAndSafety.sln index 5d7192e..55bc8dc 100644 --- a/BeatSaberNoHealthAndSafety.sln +++ b/NoHealthAndSafety.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28307.168 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeatSaberNoHealthAndSafety", "BeatSaberNoHealthAndSafety\BeatSaberNoHealthAndSafety.csproj", "{7BC4A8D2-92ED-4017-93F6-014F1747AEA2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoHealthAndSafety", "NoHealthAndSafety\NoHealthAndSafety.csproj", "{866134A1-8162-471F-9D42-9063732B7515}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,15 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7BC4A8D2-92ED-4017-93F6-014F1747AEA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7BC4A8D2-92ED-4017-93F6-014F1747AEA2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7BC4A8D2-92ED-4017-93F6-014F1747AEA2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7BC4A8D2-92ED-4017-93F6-014F1747AEA2}.Release|Any CPU.Build.0 = Release|Any CPU + {866134A1-8162-471F-9D42-9063732B7515}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {866134A1-8162-471F-9D42-9063732B7515}.Debug|Any CPU.Build.0 = Debug|Any CPU + {866134A1-8162-471F-9D42-9063732B7515}.Release|Any CPU.ActiveCfg = Release|Any CPU + {866134A1-8162-471F-9D42-9063732B7515}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {76A776E7-432E-410D-BA0F-21A3EC7CB6B8} + SolutionGuid = {C7EC7C65-EBBC-4FBB-891C-71158258A71B} EndGlobalSection EndGlobal diff --git a/BeatSaberNoHealthAndSafety/ButtonPresser.cs b/NoHealthAndSafety/ButtonPresser.cs similarity index 63% rename from BeatSaberNoHealthAndSafety/ButtonPresser.cs rename to NoHealthAndSafety/ButtonPresser.cs index 751e0e8..8c2374a 100644 --- a/BeatSaberNoHealthAndSafety/ButtonPresser.cs +++ b/NoHealthAndSafety/ButtonPresser.cs @@ -1,13 +1,8 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections; using UnityEngine; using UnityEngine.UI; -namespace BeatSaberNoHealthAndSafety +namespace NoHealthAndSafety { class ButtonPresser : MonoBehaviour { @@ -18,7 +13,6 @@ private IEnumerator clickIt() { if (button.name == "Continue") { - Console.WriteLine("[NoHealthAndSafety]: Clicking 'continue' through the safety warning"); button.onClick.Invoke(); } } @@ -29,4 +23,4 @@ void Awake() StartCoroutine(clickIt()); } } -} +} \ No newline at end of file diff --git a/NoHealthAndSafety/Logger.cs b/NoHealthAndSafety/Logger.cs new file mode 100644 index 0000000..b82cd4f --- /dev/null +++ b/NoHealthAndSafety/Logger.cs @@ -0,0 +1,9 @@ +using IPALogger = IPA.Logging.Logger; + +namespace NoHealthAndSafety +{ + internal static class Logger + { + public static IPALogger log { get; set; } + } +} diff --git a/NoHealthAndSafety/NoHealthAndSafety.csproj b/NoHealthAndSafety/NoHealthAndSafety.csproj new file mode 100644 index 0000000..ed67a99 --- /dev/null +++ b/NoHealthAndSafety/NoHealthAndSafety.csproj @@ -0,0 +1,66 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {866134A1-8162-471F-9D42-9063732B7515} + Library + Properties + NoHealthAndSafety + NoHealthAndSafety + v4.6.1 + 512 + $(SolutionDir)=C:\ + portable + + + true + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\IPA.Loader.dll + + + + + + + + + + False + D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.dll + + + D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll + + + D:\SteamLibrary\SteamApps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UI.dll + + + + + + + + + + + + + \ No newline at end of file diff --git a/NoHealthAndSafety/Plugin.cs b/NoHealthAndSafety/Plugin.cs new file mode 100644 index 0000000..fa274c7 --- /dev/null +++ b/NoHealthAndSafety/Plugin.cs @@ -0,0 +1,56 @@ +using IPA; +using IPA.Config; +using IPA.Utilities; +using UnityEngine; +using UnityEngine.SceneManagement; +using UnityEngine.UI; +using IPALogger = IPA.Logging.Logger; + +namespace NoHealthAndSafety +{ + public class Plugin : IBeatSaberPlugin + { + public void Init(IPALogger logger, [Config.Prefer("json")] IConfigProvider cfgProvider) + { + Logger.log = logger; + } + + public void OnApplicationStart() + { + + } + + public void OnApplicationQuit() + { + + } + + public void OnFixedUpdate() + { + + } + + public void OnUpdate() + { + + } + + public void OnActiveSceneChanged(Scene prevScene, Scene nextScene) + { + if (nextScene.name == "HealthWarning") + { + new GameObject("ButtonPresser").AddComponent(); + } + } + + public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) + { + + } + + public void OnSceneUnloaded(Scene scene) + { + + } + } +} diff --git a/BeatSaberNoHealthAndSafety/Properties/AssemblyInfo.cs b/NoHealthAndSafety/Properties/AssemblyInfo.cs similarity index 73% rename from BeatSaberNoHealthAndSafety/Properties/AssemblyInfo.cs rename to NoHealthAndSafety/Properties/AssemblyInfo.cs index 3f74c19..ff52952 100644 --- a/BeatSaberNoHealthAndSafety/Properties/AssemblyInfo.cs +++ b/NoHealthAndSafety/Properties/AssemblyInfo.cs @@ -2,35 +2,35 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("BeatSaberNoHealthAndSafety")] +[assembly: AssemblyTitle("NoHealthAndSafety")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("BeatSaberNoHealthAndSafety")] -[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyProduct("NoHealthAndSafety")] +[assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7bc4a8d2-92ed-4017-93f6-014f1747aea2")] +[assembly: Guid("866134a1-8162-471f-9d42-9063732b7515")] // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.0")] +[assembly: AssemblyFileVersion("1.0.0")] diff --git a/NoHealthAndSafety/manifest.json b/NoHealthAndSafety/manifest.json new file mode 100644 index 0000000..7b8be17 --- /dev/null +++ b/NoHealthAndSafety/manifest.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://raw.githubusercontent.com/nike4613/ModSaber-MetadataFileSchema/master/Schema.json", + "author": "Hyphen-ated", + "description": "Skips the Health and Safety warning screen", + "gameVersion": "0.13.2", + "id": null, + "name": "NoHealthAndSafety", + "version": "1.0.0", + "features": [] +} \ No newline at end of file