Run Re-Do

This commit is contained in:
2026-07-02 20:41:43 -07:00
parent 86575dd5bc
commit 16e396841e
188 changed files with 8291 additions and 2429 deletions
@@ -35,14 +35,31 @@ namespace ProjectM.Simulation
/// </summary>
public static class RegionMath
{
/// <summary>World-space X offset of the expedition region from the base region.</summary>
/// <summary>World-space X offset of the expedition region (room sub-slot 0) from the base region.</summary>
public const float ExpeditionOffsetX = 1000f;
/// <summary>World-space origin of <paramref name="region"/>, given the base center (BaseGridMath.PlotCenter).</summary>
/// <summary>X stride between the two ping-pong room sub-slots — kept >= any sweep/AI/aggro range so two
/// transiently-coexisting arenas can never interact in the shared PhysicsWorld.</summary>
public const float RoomStrideX = 500f;
/// <summary>
/// World-space origin of expedition room sub-slot <paramref name="subSlot"/> (0 or 1 — the run FSM
/// ping-pongs consecutive rooms between two offsets so the next room spawns at the idle slot while the
/// cleared one is torn down). THE single expedition coordinate authority: every expedition placement
/// (field scatter, enemy ring, party teleport) resolves through here.
/// </summary>
public static float3 ExpeditionRoomOrigin(float3 baseCenter, byte subSlot)
{
return baseCenter + new float3(ExpeditionOffsetX + subSlot * RoomStrideX, 0f, 0f);
}
/// <summary>World-space origin of <paramref name="region"/>, given the base center (BaseGridMath.PlotCenter).
/// The expedition resolves to room sub-slot 0 (legacy call sites; room-aware systems pass the ACTIVE
/// sub-slot to <see cref="ExpeditionRoomOrigin"/> directly).</summary>
public static float3 RegionOrigin(byte region, float3 baseCenter)
{
return region == RegionId.Expedition
? baseCenter + new float3(ExpeditionOffsetX, 0f, 0f)
? ExpeditionRoomOrigin(baseCenter, 0)
: baseCenter;
}
}