Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions Docs/OSC/OSC_Items.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
| `84` | IJED
| `85` | Mini Chest
| `87` | King's Kit
| | |
| `89` | Auric Coil

# Special Events
| ID | Item |
Expand Down
2 changes: 2 additions & 0 deletions Docs/OSC/OSC_RoundType.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| - | - |
Expand Down
3 changes: 3 additions & 0 deletions Localization/Language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "🔌",
Expand Down
17 changes: 15 additions & 2 deletions Models/Index/TerrorMatrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 }
};
}
}
3 changes: 3 additions & 0 deletions Models/Index/ToNRoundType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public enum ToNRoundType {
Ghost, // 9
Unbound, // 10

Randomizer, // 11
Classic_exe, // 12

// Contains alternates
Midnight = 50,
Alternate, // 51
Expand Down
9 changes: 5 additions & 4 deletions Windows/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
}
Expand Down
Loading