using Unity.NetCode;
namespace ProjectM.Simulation
{
///
/// Client → server route choice at a RouteSelect gate. indexes the REPLICATED
/// RunInfo.RouteOpt* option set (never a raw map column — the server re-validates against its own
/// NextMask, so a divergent client can only send an index the server rejects).
/// / stale-reject a pick that arrives after the party already
/// advanced. First ACCEPTED commit wins (the in-place RouteCommand latch — DR-014 atomicity).
/// UNCONDITIONAL wire type, blittable scalars only. Declared at Step 3 (wire front-load, one RpcCollection hash
/// change for the whole redesign); consumed by RouteSelectSystem from Step 8.
///
public struct RouteSelectRequest : IRpcCommand
{
/// Index into the replicated RouteOpt* set (0..RouteOptionCount-1).
public byte OptionIndex;
/// RE-MEANED (Step-8 review, zero wire churn): carries (int)RunInfo.RunSeed — the
/// replicated, per-run-unique, never-zero run-identity token — NOT the server-only RunEpoch (which a client
/// cannot know). The server accepts iff (uint)ForRunEpoch == RunRuntime.RunSeed: the full cross-run
/// stale-reject at zero RpcCollection-hash cost (re-mean bytes, don't rename).
public int ForRunEpoch;
/// The layer this pick was made for — RunInfo.CurrentRoom VERBATIM (during a gate that is
/// still the just-CLEARED layer; never +1 — the server compares the same un-incremented value).
public int ForLayer;
}
}