Hygiene B3: single-sourcing & magic-number consolidation
- StructureCatalogAuthoring: WallCostOre -> WallCostBiomass (it bakes a Biomass cost; [FormerlySerializedAs] preserves the scene value). - Harvester/Fabricator authoring: resource-id byte defaults reference ResourceId.Ore/.Charge instead of magic 2/4. - RegionMath.RegionBoundaryX (= ExpeditionOffsetX*0.5) single-sources the region-flip X used by HudSystem + OnboardingSystem (was 500f in 3 places). - CharacterComponent.DefaultGroundedSharpness single-sources the CC sharpness 15f (GetDefault, DashSystem, PlayerDeathStateSystem, PlayerCharacterAuthoring). - InventorySlot [InternalBufferCapacity] references Tuning.InventoryMaxSlots. - ConnectionMode enum -> byte-const class (project convention; removes the latent enum-in-Burst trap); field + one Seed() param become byte. - Tuning.ChargerWindupTicks single-sources the Charger telegraph windup (EnemyBaker + TuningConfig.Defaults; was a bare 30 that could drift). - (TicksPerSecond deliberately NOT added: no seconds->ticks conversion site exists; the tick-count fields are per-authoring designer tunables, so a const would be unreferenced.) 451/451 EditMode tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,11 @@ namespace ProjectM.Simulation
|
||||
/// under interp lag (>= ~250ms reaction + interp buffer; Slice 1 readability). 0/1 = near-instant (legacy).</summary>
|
||||
public const int AttackWindupTicks = 22;
|
||||
|
||||
/// <summary>Charger lunge telegraph windup (ticks). Single source shared by EnemyBaker (the baked client
|
||||
/// danger-ramp denominator) and TuningConfig.Defaults, mirroring the Grunt AttackWindupTicks pattern so the
|
||||
/// baked telegraph can't drift from the server windup.</summary>
|
||||
public const int ChargerWindupTicks = 30;
|
||||
|
||||
// ---- Production / automation (M7: Harvester/Conveyor/Fabricator) ----
|
||||
|
||||
/// <summary>Max production cycles a single machine awards in one process (bounds within-session
|
||||
|
||||
Reference in New Issue
Block a user