* Implement Cargo Console Add to CargoConsoleComponent GalacticBank information for syncing Bank Account Balance. Implement CargoOrderDatabase on the server side and a list of orders in the CargoOrderDatabaseComponent on the client side. This makes it easier to change data on the server side but also utilize the state syncing between components. Implement GalacticMarketComponent. Only productIds get sent. Both client and server create their lists from YAML. Implement basic spawning of items from approved orders in CargoOrderDatabase. * Finish Cargo Console Add validation to make sure Order Amount is one or more. Implement approve and cancel buttons to CargoConsoleMenu orders list row. Add price to CargoConsoleMenu product list row. Implement CargoOrderDataManager to consolidate CargoOrder lists. Refactor CargoOrderDatabaseComponent to use CargoOrderDataManager instead of storing duplicate lists. Implement canceling orders. Implement approving orders. Fix sprite links. Implement Cargo Request Console.
26 lines
844 B
C#
26 lines
844 B
C#
using Content.Shared.Prototypes.Cargo;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Serialization;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Content.Shared.GameObjects.Components.Cargo
|
|
{
|
|
public class SharedCargoOrderDatabaseComponent : Component
|
|
{
|
|
public sealed override string Name => "CargoOrderDatabase";
|
|
public sealed override uint? NetID => ContentNetIDs.CARGO_ORDER_DATABASE;
|
|
public sealed override Type StateType => typeof(CargoOrderDatabaseState);
|
|
}
|
|
|
|
[NetSerializable, Serializable]
|
|
public class CargoOrderDatabaseState : ComponentState
|
|
{
|
|
public readonly List<CargoOrderData> Orders;
|
|
public CargoOrderDatabaseState(List<CargoOrderData> orders) : base(ContentNetIDs.CARGO_ORDER_DATABASE)
|
|
{
|
|
Orders = orders;
|
|
}
|
|
}
|
|
}
|