diff --git a/CHANGELOG.md b/CHANGELOG.md index f0541cf..0a791d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ο»Ώ# Latest Changelog -- Unlocked the Round Emulator feature for everyone. - * You can open this by launching the save manager executable with the --emulator parameter. +- Added support for Randomizer & Classic.exe round types. +- Added OSC support for some other activatable items. +- Added OSC value for Auric Coil pickup. - Removed YoBro \ No newline at end of file diff --git a/Docs/OSC/OSC_Items.md b/Docs/OSC/OSC_Items.md index 4168b23..3559ebc 100644 --- a/Docs/OSC/OSC_Items.md +++ b/Docs/OSC/OSC_Items.md @@ -86,6 +86,8 @@ | `84` | IJED | `85` | Mini Chest | `87` | King's Kit +| | | +| `89` | Auric Coil # Special Events | ID | Item | diff --git a/Docs/OSC/OSC_RoundType.md b/Docs/OSC/OSC_RoundType.md index ba153d0..8909712 100644 --- a/Docs/OSC/OSC_RoundType.md +++ b/Docs/OSC/OSC_RoundType.md @@ -14,6 +14,8 @@ These are the possible values that will be sent to the `ToN_RoundType` [**parame | `8` | EX | `9` | Ghost | `10` | Unbound +| `11` | Randomizer +| `12` | Classic.exe | ID | Alternates | | - | - | diff --git a/Localization/Language/en-US.json b/Localization/Language/en-US.json index 9533b83..727a1ec 100644 --- a/Localization/Language/en-US.json +++ b/Localization/Language/en-US.json @@ -92,6 +92,9 @@ "ROUND_TYPE.COLD_NIGHT": "Cold Night", "ROUND_TYPE.CUSTOM": "Custom", + "ROUND_TYPE.RANDOMIZER": "Randomizer", + "ROUND_TYPE.CLASSIC_EXE": "Classic.exe", + "SAVE.TAG_R": "πŸ”„", "SAVE.TAG_W": "πŸ†", "SAVE.TAG_D": "πŸ”Œ", diff --git a/Models/Index/TerrorMatrix.cs b/Models/Index/TerrorMatrix.cs index 56b8dc0..bb5588e 100644 --- a/Models/Index/TerrorMatrix.cs +++ b/Models/Index/TerrorMatrix.cs @@ -101,6 +101,8 @@ public TerrorMatrix(string roundType, params int[] indexes) { Terrors = new ToNIndex.TerrorInfo[indexes.Length]; + Logger.Info($"{RoundTypeRaw} {RoundType}"); + switch (RoundType) { // first index only case ToNRoundType.Classic: @@ -113,6 +115,9 @@ public TerrorMatrix(string roundType, params int[] indexes) { case ToNRoundType.Alternate: case ToNRoundType.Fog_Alternate: case ToNRoundType.Ghost_Alternate: + // April 2026 + case ToNRoundType.Randomizer: + case ToNRoundType.Classic_exe: Terrors = [new(indexes[0], RoundType == ToNRoundType.Alternate || isAlt ? ToNIndex.TerrorGroup.Alternates : ToNIndex.TerrorGroup.Terrors)]; TerrorCount = 1; break; @@ -251,6 +256,10 @@ private Color GetDisplayColor() { "Cracked" , "η‹‚ζ°—", // Like classic "Bloodbath" , "ブラッドバス", // (0, 1, 2) + // April 2026 + "Classic.exe" , "クラシック.exe", + "Randomizer" , "γƒ©γƒ³γƒ€γƒžγ‚€γ‚ΆγƒΌ", + // Contains alternates "Midnight" , "γƒŸγƒƒγƒ‰γƒŠγ‚€γƒˆ", // (0, 1, 2) last index is alt "Alternate" , "γ‚ͺγƒ«γ‚Ώγƒγ‚€γƒˆ", // first index is alt @@ -286,8 +295,8 @@ static string GetEngRoundType(string roundType, bool alternate) { } static ToNRoundType GetRoundType(string raw) { - raw = raw.Replace(' ', '_').Replace("8", "Eight"); - return Enum.TryParse(typeof(ToNRoundType), raw, out object? result) && result != null ? (ToNRoundType)result : ToNRoundType.Intermission; + raw = raw.Replace(' ', '_').Replace("8", "Eight").Replace('.', '_'); + return Enum.TryParse(typeof(ToNRoundType), raw, true, out object ? result) && result != null ? (ToNRoundType)result : ToNRoundType.Intermission; } internal static uint GetRoundColorFromType(ToNRoundType RoundType) => RoundTypeColors.ContainsKey(RoundType) ? RoundTypeColors[RoundType] : 16721714; @@ -325,6 +334,10 @@ static ToNRoundType GetRoundType(string raw) { { ToNRoundType.Ghost_Alternate, 0xC3F7FF }, { ToNRoundType.Custom, 0x2672FF }, + + // April - 2026 + { ToNRoundType.Randomizer, 0xFFF800 }, + { ToNRoundType.Classic_exe, 0xFF0000 } }; } } diff --git a/Models/Index/ToNRoundType.cs b/Models/Index/ToNRoundType.cs index 1dfc0c9..7fb69ab 100644 --- a/Models/Index/ToNRoundType.cs +++ b/Models/Index/ToNRoundType.cs @@ -20,6 +20,9 @@ public enum ToNRoundType { Ghost, // 9 Unbound, // 10 + Randomizer, // 11 + Classic_exe, // 12 + // Contains alternates Midnight = 50, Alternate, // 51 diff --git a/Windows/MainWindow.cs b/Windows/MainWindow.cs index e0b15b2..b70de5a 100644 --- a/Windows/MainWindow.cs +++ b/Windows/MainWindow.cs @@ -13,6 +13,7 @@ using ToNSaveManager.Utils.OpenRGB; using ToNSaveManager.Utils.API; using ToNSaveManager.Utils.JSPlugins; +using System.Text.RegularExpressions; namespace ToNSaveManager { public partial class MainWindow : Form { @@ -888,6 +889,8 @@ private bool HandleTerrorIndex(string line, DateTime timestamp, ToNLogContext co const string EVENT_MASTER_CHANGE = "[Behaviour] OnMasterClientSwitched"; + static readonly Regex PATTERN_ITEM_ACTIVATED = new Regex(@"\[[\w ]+\] (Activated!|Deactivated!)", RegexOptions.Compiled); + private bool HandleStatCollection(string line, DateTime timestamp, ToNLogContext context) { if (!context.IsRecent) return false; @@ -916,10 +919,8 @@ private bool HandleStatCollection(string line, DateTime timestamp, ToNLogContext return true; } - bool isActivated = line.StartsWith("[UNSTABLE COIL] Activated!") || line.StartsWith("[EMERALD COIL] Activated!") || line.StartsWith("[CORKSCREW COIL] Activated!"); - bool isDeactivated = line.StartsWith("[UNSTABLE COIL] Deactivated!") || line.StartsWith("[EMERALD COIL] Deactivated!") || line.StartsWith("[CORKSCREW COIL] Deactivated!"); - if (isActivated || isDeactivated) { - LilOSC.SetItemStatus(isActivated); + if (PATTERN_ITEM_ACTIVATED.IsMatch(line)) { + LilOSC.SetItemStatus(!line.Contains("Deactivated!")); return true; } }