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:
@@ -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>
|
||||
|
||||
@@ -7,5 +7,5 @@ namespace ProjectM.Simulation
|
||||
/// NetworkStreamInGame to the connection (enabling snapshot/command flow) and spawns the
|
||||
/// client's player ghost. Lives in Simulation so both worlds see the type for RPC source-gen.
|
||||
/// </summary>
|
||||
public struct GoInGameRequest : IRpcCommand { public byte ClassId; } // Slice 2: per-player class (CharacterId byte; 0 -> server defaults to Warrior)
|
||||
public struct GoInGameRequest : IRpcCommand { public byte ClassId; } // Slice 2: per-player class (FrameKind byte; 0 -> server defaults to Warrior)
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace ProjectM.Simulation
|
||||
/// <summary>Set the <see cref="TuningKnob"/> ArgA to ArgB/1000f (live dash/Charger feel-tuning; MC-0).</summary>
|
||||
public const byte SetTuning = 12;
|
||||
|
||||
/// <summary>Swap the sender's class to ArgA (a <see cref="CharacterId"/> byte: Warrior=2 / Ranger=3).
|
||||
/// <summary>Swap the sender's class to ArgA (a <see cref="FrameKind"/> byte: Warrior=2 / Ranger=3).
|
||||
/// Strips the old class trait seeds, re-seeds the new ones, swaps the Fire ability, and heals a living
|
||||
/// player to the new class's max. Editor-only dev tool (class-switch); 0 / unknown -> Warrior.</summary>
|
||||
public const byte SetClass = 13;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ProjectM.Simulation
|
||||
/// One authored PERMANENT meta upgrade: tiered (buy tier owned+1 up to <see cref="MaxTier"/>), priced in Aether
|
||||
/// with a linear ramp (<c>cost(owned) = BaseCost + owned*CostGrowth</c>), class-gated by <see cref="ClassMask"/>
|
||||
/// (bit0 = Warrior, bit1 = Ranger — resolve via <see cref="BoonMath.MaskFor"/>, NEVER a raw <c>1<<ClassId</c>:
|
||||
/// the stored ClassId is the normalized CharacterId 2/3). <see cref="Id"/> is the stable APPEND-ONLY key
|
||||
/// the stored ClassId is the normalized FrameKind 2/3). <see cref="Id"/> is the stable APPEND-ONLY key
|
||||
/// persisted in SaveData v6 and keyed into the live StatModifier as <c>Tuning.MetaSourceIdBase + Id</c>.
|
||||
/// DISTINCT from <see cref="BoonDefBlob"/> — boons are run-scoped single-shots; overloading one catalog would
|
||||
/// blur the two channels (DR-037). <see cref="PrereqId"/> = 0xFF means no prerequisite (v1 ships a FLAT catalog
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace ProjectM.Simulation
|
||||
[InternalBufferCapacity(24)]
|
||||
public struct MetaTierState : IBufferElementData
|
||||
{
|
||||
/// <summary>Owning class id (Warrior/Ranger — the CharacterId anchor).</summary>
|
||||
/// <summary>Owning class id (Warrior/Ranger — the FrameKind anchor).</summary>
|
||||
[GhostField] public byte ClassId;
|
||||
/// <summary>Upgrade id (append-only key into the meta catalog).</summary>
|
||||
[GhostField] public byte UpgradeId;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace ProjectM.Simulation
|
||||
public int Count;
|
||||
}
|
||||
|
||||
/// <summary>One persisted per-class PERMANENT meta-upgrade tier (v6). ClassId = the normalized CharacterId
|
||||
/// <summary>One persisted per-class PERMANENT meta-upgrade tier (v6). ClassId = the normalized FrameKind
|
||||
/// (Warrior=2/Ranger=3); UpgradeId = the append-only meta-catalog key (unknown ids round-trip preserved and are
|
||||
/// skipped live); Tier clamps to the catalog's MaxTier at seed/shop/spend, never at rest.</summary>
|
||||
[Serializable]
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ProjectM.Simulation
|
||||
/// Which authored character-stats definition this entity uses - a light key into the CharacterStats
|
||||
/// blob, replacing M2's inlined PlayerMoveStats values. NOW a [GhostField] (Slice 2 classes) so the
|
||||
/// server-written per-player class id replicates -> the owning client folds correct stats. <c>Id</c> stores a
|
||||
/// <see cref="CharacterId"/>.
|
||||
/// <see cref="FrameKind"/>.
|
||||
/// </summary>
|
||||
public struct CharacterStatsRef : IComponentData
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user