Bump version to 1.0.2

- Fix role name normalization: remove "Tou" suffix from all roles (e.g., TrackerTou -> Tracker)
- Set platform to "Mira" for all players (TOU Mira is Mira-based)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-09 00:05:18 +02:00
parent ccbc3bc5c7
commit 888bce220e
4 changed files with 8 additions and 41 deletions

View File

@@ -326,38 +326,8 @@ public static class DataTransformer
private static string GetPlayerPlatform(PlayerControl? player)
{
if (player?.Data != null)
{
// Try to get platform info - may not be available in all Among Us versions
try
{
var platformField = player.Data.GetType().GetField("Platform");
if (platformField != null)
{
var platformValue = platformField.GetValue(player.Data);
if (platformValue != null)
{
return platformValue.ToString() ?? "Unknown";
}
}
var platformProperty = player.Data.GetType().GetProperty("Platform");
if (platformProperty != null)
{
var platformValue = platformProperty.GetValue(player.Data);
if (platformValue != null)
{
return platformValue.ToString() ?? "Unknown";
}
}
}
catch
{
// Platform not available, continue
}
}
return "Unknown";
// TOU Mira is Mira-based, so always return "Mira"
return "Mira";
}
/// <summary>

View File

@@ -336,14 +336,11 @@ public class TouMiraReflectionBridge
{
roleName = typeName.Substring(0, typeName.Length - 4);
}
// Remove "Tou" suffix (e.g., "EngineerTou" -> "Engineer")
else if (typeName.EndsWith("Tou"))
// Remove "Tou" suffix if present (e.g., "EngineerTou" -> "Engineer", "TrackerTou" -> "Tracker")
if (roleName.EndsWith("Tou"))
{
roleName = typeName.Substring(0, typeName.Length - 3);
}
else
{
roleName = typeName;
roleName = roleName.Substring(0, roleName.Length - 3);
}
TownOfUsStatsPlugin.Logger.LogInfo($"Player {playerId}: Using type name as role: {roleName}");

View File

@@ -8,7 +8,7 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Description>Town Of Us Stats Exporter - Standalone plugin for exporting game statistics</Description>
<RootNamespace>TownOfUsStatsExporter</RootNamespace>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<Authors>ToU Mira Team</Authors>
</PropertyGroup>

View File

@@ -32,7 +32,7 @@ public class TownOfUsStatsPlugin : BasePlugin
/// <summary>
/// Plugin version.
/// </summary>
public const string PluginVersion = "1.0.1";
public const string PluginVersion = "1.0.2";
/// <summary>
/// Logger instance for the plugin.