1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 04:53:30 +08:00

Add skip prologue function to HideTips, as well as package infos for thunderstore.io

This commit is contained in:
2022-09-06 18:55:52 +08:00
parent 3257314f83
commit 7710b252cc
7 changed files with 49 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ public class HideTips : BaseUnityPlugin
private static bool _noTutorialTips = true;
private static bool _noAchievementCardPopups = false;
private static bool _noMilestoneCardPopups = true;
private static bool _skipPrologue = true;
private void Awake()
{
@@ -22,6 +23,7 @@ public class HideTips : BaseUnityPlugin
_noTutorialTips = Config.Bind("General", "NoTutorialTips", _noTutorialTips, "Disable Tutorial Tips").Value;
_noAchievementCardPopups = Config.Bind("General", "NoAchievementCardPopups", _noAchievementCardPopups, "Disable Achievement Card Popups").Value;
_noMilestoneCardPopups = Config.Bind("General", "NoMilestoneCardPopups", _noMilestoneCardPopups, "Disable Milestone Card Popups").Value;
_skipPrologue = Config.Bind("General", "SkipPrologue", _skipPrologue, "Skip prologue for new game").Value;
if (!_cfgEnabled) return;
Harmony.CreateAndPatchAll(typeof(HideTips));
}
@@ -55,9 +57,19 @@ public class HideTips : BaseUnityPlugin
return !_noAchievementCardPopups;
}
[HarmonyPrefix] [HarmonyPatch(typeof(UIVariousPopupGroup), "CreateMilestonePopupCard")]
[HarmonyPrefix]
[HarmonyPatch(typeof(UIVariousPopupGroup), "CreateMilestonePopupCard")]
private static bool SkipMilestoneCardPopups()
{
return !_noMilestoneCardPopups;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(DSPGame), "StartGame", typeof(GameDesc))]
private static bool OnStartGame(GameDesc _gameDesc)
{
if (!_skipPrologue) return true;
DSPGame.StartGameSkipPrologue(_gameDesc);
return false;
}
}

View File

@@ -0,0 +1,7 @@
## [HideTips](HideTips)
### Hide/Disable various in-game tips/messages
* Tips/messages that can be hidden: random-reminder, tutorial, achievement/milestone card.
* Skip prologue for new game.
* Each type of tips/messages is configurable individually.

BIN
HideTips/package/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -0,0 +1,9 @@
{
"name": "HideTips",
"version_number": "1.0.0",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/HideTips",
"description": "Hide various types of tips/messages",
"dependencies": [
"xiaoye97-BepInEx-5.4.17"
]
}