Allow cargo request computers to send orders to the primary account (#37943)

This commit is contained in:
pathetic meowmeow
2025-06-09 11:11:19 -04:00
committed by GitHub
parent b1ab5bd059
commit 3d40bebbef
6 changed files with 92 additions and 20 deletions

View File

@@ -104,10 +104,10 @@ public sealed partial class CargoOrderConsoleComponent : Component
public static readonly ProtoId<RadioChannelPrototype> BaseAnnouncementChannel = "Supply";
/// <summary>
/// If set to true, restricts this console from ordering and has it print slips instead
/// The behaviour of the cargo console regarding orders
/// </summary>
[DataField]
public bool SlipPrinter;
public CargoOrderConsoleMode Mode = CargoOrderConsoleMode.DirectOrder;
/// <summary>
/// The time at which the console will be able to print a slip again.
@@ -146,6 +146,26 @@ public sealed partial class CargoOrderConsoleComponent : Component
public TimeSpan DenySoundDelay = TimeSpan.FromSeconds(2);
}
/// <summary>
/// The behaviour of the cargo order console
/// </summary>
[Serializable, NetSerializable]
public enum CargoOrderConsoleMode : byte
{
/// <summary>
/// Place orders directly
/// </summary>
DirectOrder,
/// <summary>
/// Print a slip to be inserted into a DirectOrder console
/// </summary>
PrintSlip,
/// <summary>
/// Transfers the order to the primary account
/// </summary>
SendToPrimary,
}
/// <summary>
/// Withdraw funds from an account
/// </summary>