Skip to content

Commit

Permalink
Added back skip splash, disabled by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Krevace committed Jul 31, 2022
1 parent 1e52625 commit c9e4418
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
24 changes: 23 additions & 1 deletion OWVoiceMod/OWVoiceMod.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using HarmonyLib;
using OWML.Common;
using OWML.ModHelper;
using OWML.Utils;
using System;
using System.Collections.Generic;
using System.IO;
Expand All @@ -20,7 +21,8 @@ public class OWVoiceMod : ModBehaviour
public static AudioSource audioSource;

public static int randomDialogueNum = -1;


private static bool splashSkip;
private static bool conversations;
private static bool hearthianRecordings;
public static bool nomaiRecordings;
Expand All @@ -36,6 +38,25 @@ private void Start()

RegisterAssets(Path.Combine(ModHelper.Manifest.ModFolderPath, "Assets"));

if (splashSkip)
{
// Copied from https://github.com/Vesper-Works/OuterWildsOnline/blob/master/OuterWildsOnline/ConnectionController.cs#L106-L119
// Skip flash screen.
var titleScreenAnimation = FindObjectOfType<TitleScreenAnimation>();
titleScreenAnimation._fadeDuration = 0;
titleScreenAnimation._gamepadSplash = false;
titleScreenAnimation._introPan = false;
titleScreenAnimation.Invoke("FadeInTitleLogo");

// Skip menu fade.
var titleAnimationController = FindObjectOfType<TitleAnimationController>();
titleAnimationController._logoFadeDelay = 0.001f;
titleAnimationController._logoFadeDuration = 0.001f;
titleAnimationController._optionsFadeDelay = 0.001f;
titleAnimationController._optionsFadeDuration = 0.001f;
titleAnimationController._optionsFadeSpacing = 0.001f;
}

Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly());

LoadManager.OnCompleteSceneLoad += OnCompleteSceneLoad;
Expand Down Expand Up @@ -71,6 +92,7 @@ public static void RegisterAssets(string assetsFolder)

public override void Configure(IModConfig config)
{
splashSkip = config.GetSettingsValue<bool>("splashSkip");
conversations = config.GetSettingsValue<bool>("conversations");
hearthianRecordings = config.GetSettingsValue<bool>("hearthianRecordings");
nomaiRecordings = config.GetSettingsValue<bool>("nomaiRecordings");
Expand Down
5 changes: 5 additions & 0 deletions OWVoiceMod/default-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
"value": "1",
"min": 0,
"max": 1
},
"splashSkip": {
"title": "Skip Splash Screen",
"type": "toggle",
"value": false
}
}
}
2 changes: 1 addition & 1 deletion OWVoiceMod/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Krevace",
"name": "Voice Acting Mod",
"uniqueName": "Krevace.VoiceMod",
"version": "0.3.9",
"version": "0.3.10",
"owmlVersion": "2.5.2",
"priorityLoad": true
}

1 comment on commit c9e4418

@MegaPiggy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just use TimeSaver, there is no need for this splash skip if it is already in another mod.

Please sign in to comment.