Skip to content

Commit af18906

Browse files
committed
Bump version, add logging
1 parent 03af4cb commit af18906

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

plugin_template/swinfo.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"name": "Skip Splash Screen",
66
"description": "Skips the splash screen and health warning. To be used only for developing mods (faster iteration).",
77
"source": "https://github.com/Falki-git/SkipSplashScreen",
8-
"version": "1.1.1",
8+
"version": "1.1.2",
99
"version_check": "https://raw.githubusercontent.com/Falki-git/SkipSplashScreen/master/plugin_template/swinfo.json",
1010
"ksp2_version": {
11-
"min": "0.1.3",
11+
"min": "0.1.5",
1212
"max": "*"
1313
},
1414
"dependencies": [
1515
{
1616
"id": "com.github.x606.spacewarp",
1717
"version": {
18-
"min": "1.4.0",
18+
"min": "1.5.2",
1919
"max": "*"
2020
}
2121
}

src/SkipSplashScreen/SkipSplashScreenPlugin.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using KSP.Game;
66
using SpaceWarp;
77
using SpaceWarp.API.Mods;
8+
using BepInEx.Logging;
89

910
namespace SkipSplashScreen;
1011

@@ -17,6 +18,8 @@ public class SkipSplashScreenPlugin : BaseSpaceWarpPlugin
1718
[PublicAPI] public const string ModName = MyPluginInfo.PLUGIN_NAME;
1819
[PublicAPI] public const string ModVer = MyPluginInfo.PLUGIN_VERSION;
1920

21+
private static ManualLogSource _logger = BepInEx.Logging.Logger.CreateLogSource("SkipSplashScreen");
22+
2023
public void Start()
2124
{
2225
Harmony.CreateAndPatchAll(typeof(SkipSplashScreenPlugin));
@@ -30,14 +33,18 @@ public void Update()
3033
return;
3134

3235
if (gameState == GameState.MainMenu)
36+
{
37+
_logger.LogDebug($"disappears into oblivion...");
3338
Destroy(this);
39+
}
3440
}
3541

3642
[HarmonyPatch(typeof(SequentialFlow), "AddAction"), HarmonyPrefix]
3743
private static bool SequentialFlow_AddAction(FlowAction action)
3844
{
3945
if (action.Name == "Creating Splash Screens Prefab")
4046
{
47+
_logger.LogDebug($"'Creating Splash Screens Prefab' action found. Skipping!");
4148
GameManager.Instance.HasPhotosensitivityWarningBeenShown = true;
4249
return false;
4350
}

0 commit comments

Comments
 (0)