Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
Added No Intro Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Raoul1808 committed Nov 1, 2021
1 parent 693367b commit c703ba6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Features/NoIntro.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using HarmonyLib;
using UnityEngine;

namespace QualityOfSpeen.Features
{
public class NoIntro
{
private static bool SkipIntro;

private static void Awake()
{
SkipIntro = Main.ModConfig.GetValueOrDefaultTo("NoIntro", "AutoSkip", false);
}

[HarmonyPatch(typeof(StartupScene), nameof(StartupScene.Update))]
[HarmonyPostfix]
private static void StartupSceneAwakePostfix(StartupScene __instance)
{
if (Input.anyKeyDown) SkipIntro = true;
if (SkipIntro)
{
__instance._animationTimer = 8f;
}
}
}
}
1 change: 1 addition & 0 deletions QualityOfSpeen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<Compile Include="Extensions.cs" />
<Compile Include="Features\DiscordRPCFix.cs" />
<Compile Include="Features\InstantRestartKey.cs" />
<Compile Include="Features\NoIntro.cs" />
<Compile Include="InGameState.cs" />
<Compile Include="IniFile.cs" />
<Compile Include="Main.cs" />
Expand Down

0 comments on commit c703ba6

Please sign in to comment.