New TeslaConsole.BattleTech namespace mirroring TeslaConsole.RedPlanet's mission layer: BTMission/BTFreeForAllMission (egg serializer; RP wire framing and ordinal bitmaps reused verbatim), BTParticipant/BTPlayer/BTCamera (BT participant fields: advancedDamage, experience, vehicleValue, patch, role), and the BTConfig/BTScenario/BTMap/BTVehicle/BTWeather/BTRole catalog loaded from BattleTech\BTConfig.xml (reconstructed from the Mac Console 4.10 ini BT tree). Free For All and No Return share one mission class - both send scenario=freeforall; the mode is the role assigned to each pilot. BTGoldenEggTests (7 tests, recovered-only) diff the generated egg field-by-field against two eggs captured from the original consoles (cavern.egg, TESTARN.EGG): order-independent per-section compare with font-rendered bitmap pixel rows excluded, ordinal art byte-exact vs TESTARN.EGG, EggFileMessage framing reassembly, role de-dup, No Return role semantics, and shipped-catalog contents. Invoker gains BTEggString/ BTEggFraming reflection cases. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace TeslaConsole.BattleTech;
|
|
|
|
/// <summary>
|
|
/// The BattleTech battle mission. Both operator game modes — Free For All and
|
|
/// No Return — are produced by this class and send <c>scenario=freeforall</c> on
|
|
/// the wire (confirmed by both golden eggs); the two modes differ only in the
|
|
/// role assigned to each <see cref="BTPlayer" />.
|
|
/// </summary>
|
|
[Serializable]
|
|
internal class BTFreeForAllMission : BTMission
|
|
{
|
|
public const string ScenarioTag = "freeforall";
|
|
|
|
private readonly List<BTPlayer> mPlayers = new List<BTPlayer>();
|
|
|
|
public List<BTPlayer> BattlePlayers => mPlayers;
|
|
|
|
public override IEnumerable<BTPlayer> Players => mPlayers.ToArray();
|
|
|
|
public override int PlayerCount => mPlayers.Count;
|
|
|
|
public BTFreeForAllMission(string mapKey, string timeOfDayKey, string weatherKey, int temperature, TimeSpan gameLength)
|
|
: base(ScenarioTag, mapKey, timeOfDayKey, weatherKey, temperature, gameLength)
|
|
{
|
|
}
|
|
|
|
protected override void AppendMissionSpecificData(StringBuilder egg)
|
|
{
|
|
}
|
|
}
|