using Unity.NetCode;
namespace ProjectM.Simulation
{
///
/// Client -> server request to deposit into or withdraw from the shared storage container. A one-off
/// action, so it is an RPC (not a per-tick predicted input). Op is stored as a byte (see
/// ) rather than an enum to keep the generated serializer trivial and avoid the
/// cross-assembly enum-codegen hazard. No target entity is carried: M5 has a single shared container,
/// which the server resolves as a singleton (entity refs are not stable across worlds).
///
public struct StorageOpRequest : IRpcCommand
{
/// Operation code (see ): 0 = deposit, 1 = withdraw.
public byte Op;
/// Item to deposit/withdraw.
public ushort ItemId;
/// Quantity to deposit/withdraw (server clamps withdraw to available).
public int Count;
}
/// Operation codes for (byte to keep RPC serialization trivial).
public static class StorageOp
{
/// Add items to the shared container.
public const byte Deposit = 0;
/// Remove items from the shared container.
public const byte Withdraw = 1;
}
}