From c3c14cec233c52d6e2596ed6e476d57750f9ad6a Mon Sep 17 00:00:00 2001 From: Devin Bidwell Date: Fri, 26 Dec 2025 16:18:24 -0700 Subject: [PATCH] Added stationpedia docs back into the game patches --- Changelog.md | 4 ++++ ModData/About/About.xml | 2 +- csharp_mod/Patches.cs | 18 ++++++++++++++++++ csharp_mod/Plugin.cs | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 csharp_mod/Patches.cs diff --git a/Changelog.md b/Changelog.md index 3c1c6c1..a8510fb 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,9 @@ # Changelog +[0.4.4] + +- Added Stationpedia docs back after removing all harmony patches from the mod + [0.4.3] - Removed references to the `Mod` class from SLP. This was the root of the multiplayer diff --git a/ModData/About/About.xml b/ModData/About/About.xml index edef217..4f3f624 100644 --- a/ModData/About/About.xml +++ b/ModData/About/About.xml @@ -2,7 +2,7 @@ Slang JoeDiertay - 0.4.3 + 0.4.4 [h1]Slang: High-Level Programming for Stationeers[/h1] diff --git a/csharp_mod/Patches.cs b/csharp_mod/Patches.cs new file mode 100644 index 0000000..9ee8c58 --- /dev/null +++ b/csharp_mod/Patches.cs @@ -0,0 +1,18 @@ +namespace Slang; + +using Assets.Scripts.UI; +using HarmonyLib; + +[HarmonyPatch] +public static class SlangPatches +{ + [HarmonyPatch(typeof(Stationpedia), nameof(Stationpedia.Regenerate))] + [HarmonyPostfix] + public static void Stationpedia_Regenerate() + { + foreach (var page in Marshal.GetSlangDocs()) + { + Stationpedia.Register(page); + } + } +} diff --git a/csharp_mod/Plugin.cs b/csharp_mod/Plugin.cs index 4ae0d32..8b5f08a 100644 --- a/csharp_mod/Plugin.cs +++ b/csharp_mod/Plugin.cs @@ -40,7 +40,7 @@ namespace Slang { public const string PluginGuid = "com.biddydev.slang"; public const string PluginName = "Slang"; - public const string PluginVersion = "0.4.3"; + public const string PluginVersion = "0.4.4"; private Harmony? _harmony; -- 2.49.1