Files
CydandClaude Fable 5 36166a95b0 BTGame pane + shell de-hardcode for multi-game pods (BT port phase 3)
BTGame mirrors RPGame - same GameStateData/state-machine/NetworkScan engine
driving each pod's MungaGame (take ownership, stream egg on WaitingForEgg,
Run/Abort/Stop, countdown) - with the BT differences: ApplicationID.BTL4, a
pilots grid carrying Mech/Camo/Patch/Badge/Experience, an Advanced Damage
checkbox in place of RP's Score Compression, and the Mech* in-match messages
recorded via BTMissionRecorder into BTMissionResults (.btm, gzip +
BinaryFormatter like .rpm; scores are 1000-based like RP). Free For All and
No Return share the pane; the mode selects the pilots' role. BTDefaults
persists per-mode operator defaults to BTDefaults.btd (no dialog yet).
RPGame's dead decompile members (sStopToIdleStates, IsAllPodsAppState) were
not carried over.

TeslaConsoleForm no longer assumes RP: the "AppID != 0 -> Pod Not Running RP"
check becomes a GameTag map (RPL4 -> RP, BTL4 -> BT, otherwise Unknown Pod
Application) feeding the per-game status strings, and the Games menu gains
BattleTech: Free For All / No Return.

Deferred to phase 4: mech/arena art, BT defaults dialog, BT score-sheet
print document, Apps.xml BT411 product, live-pod verification.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 22:29:20 -05:00

49 lines
1.2 KiB
C#

using System;
using System.Xml;
namespace TeslaConsole.BattleTech;
/// <summary>
/// A BattleTech pilot role. Each participant references one role
/// (<c>role=Role::&lt;Key&gt;</c>); the egg then carries a matching
/// <c>[Role::&lt;Key&gt;] model=&lt;Model&gt;</c> block. Free For All uses the
/// Default role, No Return uses the NoReturn role. Serializable because it is
/// reachable from a saved <see cref="BTMissionResults" /> via the mission's
/// players (mirrors the .rpm save mechanism).
/// </summary>
[Serializable]
public class BTRole
{
private readonly string mKey;
private readonly string mModel;
private readonly string mName;
public string Key => mKey;
public string Model => mModel;
public string Name => mName;
internal BTRole(XmlNode roleNode)
{
mKey = roleNode.Attributes["key"].InnerText;
mModel = roleNode.Attributes["model"].InnerText;
XmlAttribute xmlAttribute = roleNode.Attributes["name"];
mName = ((xmlAttribute != null) ? xmlAttribute.InnerText : mKey);
}
public BTRole(string key, string model, string name)
{
mKey = key;
mModel = model;
mName = name;
}
public override string ToString()
{
return mName;
}
}