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:
@@ -326,38 +326,8 @@ public static class DataTransformer
|
|||||||
|
|
||||||
private static string GetPlayerPlatform(PlayerControl? player)
|
private static string GetPlayerPlatform(PlayerControl? player)
|
||||||
{
|
{
|
||||||
if (player?.Data != null)
|
// TOU Mira is Mira-based, so always return "Mira"
|
||||||
{
|
return "Mira";
|
||||||
// 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";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -336,14 +336,11 @@ public class TouMiraReflectionBridge
|
|||||||
{
|
{
|
||||||
roleName = typeName.Substring(0, typeName.Length - 4);
|
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);
|
roleName = roleName.Substring(0, roleName.Length - 3);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
roleName = typeName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TownOfUsStatsPlugin.Logger.LogInfo($"Player {playerId}: Using type name as role: {roleName}");
|
TownOfUsStatsPlugin.Logger.LogInfo($"Player {playerId}: Using type name as role: {roleName}");
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
<Description>Town Of Us Stats Exporter - Standalone plugin for exporting game statistics</Description>
|
<Description>Town Of Us Stats Exporter - Standalone plugin for exporting game statistics</Description>
|
||||||
<RootNamespace>TownOfUsStatsExporter</RootNamespace>
|
<RootNamespace>TownOfUsStatsExporter</RootNamespace>
|
||||||
<Version>1.0.1</Version>
|
<Version>1.0.2</Version>
|
||||||
<Authors>ToU Mira Team</Authors>
|
<Authors>ToU Mira Team</Authors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class TownOfUsStatsPlugin : BasePlugin
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Plugin version.
|
/// Plugin version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string PluginVersion = "1.0.1";
|
public const string PluginVersion = "1.0.2";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logger instance for the plugin.
|
/// Logger instance for the plugin.
|
||||||
|
|||||||
Reference in New Issue
Block a user