LANTERN purge B7: rename CharacterId -> FrameKind (frame terminology)

Enum renamed in StatIds.cs (byte values unchanged - serialized definitions/saves
never re-mean); all call sites + doc mentions swept (ClassTraits, PlayerAuthoring,
CharacterStatsDefinition field type, menu/UI, tests). CharacterStatsDefinition SO
CLASS name kept (asset-binding risk; deferred per plan). 390 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 15:51:48 -07:00
parent 4a8220ad3e
commit 77de740b63
22 changed files with 34 additions and 32 deletions
@@ -34,7 +34,7 @@ namespace ProjectM.Simulation
/// <summary>One authored character-stats definition, baked immutable into the AbilityDatabase blob.</summary>
public struct CharacterStatsBlob
{
public byte Id; // CharacterId
public byte Id; // FrameKind
public float MoveSpeed;
public float TurnRateRadiansPerSec;
public float MaxHealth;
@@ -3,7 +3,7 @@ using Unity.Entities;
namespace ProjectM.Simulation
{
/// <summary>
/// Slice 2: the local player's chosen class (a <see cref="CharacterId"/> byte), staged in the CLIENT world as a
/// Slice 2: the local player's chosen class (a <see cref="FrameKind"/> byte), staged in the CLIENT world as a
/// singleton by the menu / WorldLauncher before going in-game. <see cref="GoInGameRequest"/> picks it up
/// (GoInGameClientSystem) so the server seeds the right class at spawn. NOT replicated — it is client-local
/// intent; the class travels to the server via the RPC, then back to all clients via the seeded StatModifiers +
@@ -4,12 +4,12 @@ using Unity.Entities;
namespace ProjectM.Simulation
{
/// <summary>
/// Slice 2 — pure mapping from a chosen class (a <see cref="CharacterId"/> byte) to its spawn-time setup: the
/// Slice 2 — pure mapping from a chosen frame (a <see cref=\"FrameKind\"/> byte) to its spawn-time setup: the
/// Fire-slot ability id + the permanent trait <see cref="StatModifier"/>s (tagged with the reserved
/// <see cref="Tuning.ClassSourceId"/> range, NEVER stripped by the generic modifier systems). Applied by
/// GoInGameServerSystem on the just-spawned player and unit-tested. Burst-safe (byte/uint only, no managed types).
/// <para>
/// Trait deltas seed onto the <see cref="CharacterId.Default"/> character (no per-class blob row needed — the
/// Trait deltas seed onto the <see cref=\"FrameKind.Default\"/> character (no per-class blob row needed — the
/// deltas ride the replicated StatModifier buffer, OwnerSendType.All, so the owning client folds the correct
/// EffectiveCharacterStats). The DRG-asymmetry (operator-locked): <b>Warrior</b> = melee bruiser (tankier,
/// slower, harder + longer-reach melee via MeleeDamage/MeleeRange); <b>Ranger</b> = ranged anchor (faster,
@@ -26,8 +26,8 @@ namespace ProjectM.Simulation
/// </summary>
public static class ClassTraits
{
public const byte WarriorClass = (byte)CharacterId.Warrior;
public const byte RangerClass = (byte)CharacterId.Ranger;
public const byte WarriorClass = (byte)FrameKind.Warrior;
public const byte RangerClass = (byte)FrameKind.Ranger;
/// <summary>How many trait modifiers a class seeds (each on a distinct SourceId at ClassSourceId + i).</summary>
public const int ClassSeedCount = 4;
@@ -79,7 +79,7 @@ namespace ProjectM.Simulation
[GhostComponent(OwnerSendType = SendToOwnerType.SendToOwner)]
public struct FrameId : IComponentData
{
/// <summary>The frame/class id (see the <c>CharacterId</c> / <c>ClassId</c> convention).</summary>
/// <summary>The frame/class id (see the <c>FrameKind</c> / <c>ClassId</c> convention).</summary>
[GhostField] public byte Value;
}
}
@@ -16,13 +16,15 @@ namespace ProjectM.Simulation
LightZone = 9, // Aoe/zone: a persistent light/damage zone
}
/// <summary>Stable key for an authored character-stats definition in the AbilityDatabase blob.</summary>
public enum CharacterId : byte
/// <summary>Stable key for an authored character-stats definition in the AbilityDatabase blob — the
/// frame/class id (a LANTERN suit-frame IS the class; renamed from the pre-LANTERN <c>CharacterId</c>,
/// byte values unchanged so serialized definitions/saves never re-mean).</summary>
public enum FrameKind : byte
{
None = 0,
Default = 1,
Warrior = 2, // Slice 2: melee-anchor bruiser (tankier, slower, longer/harder melee)
Ranger = 3, // Slice 2: ranged-anchor (squishier, faster, longer projectile range; weaker melee)
Warrior = 2, // Bathynaut-lineage melee-anchor bruiser (tankier, slower, longer/harder melee)
Ranger = 3, // Harpooner-lineage ranged-anchor (squishier, faster, longer projectile range; weaker melee)
}
/// <summary>