Implement Cargo Console (#413)
* 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.
This commit is contained in:
committed by
Pieter-Jan Briers
parent
58709d2d26
commit
1580750606
17
Content.Server/Cargo/ICargoOrderDataManager.cs
Normal file
17
Content.Server/Cargo/ICargoOrderDataManager.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Cargo;
|
||||
using Content.Shared.Prototypes.Cargo;
|
||||
|
||||
namespace Content.Server.Cargo
|
||||
{
|
||||
public interface ICargoOrderDataManager
|
||||
{
|
||||
bool TryGetAccount(int id, out CargoOrderDatabase account);
|
||||
void AddOrder(int id, string requester, string reason, string productId, int amount, int payingAccountId);
|
||||
void RemoveOrder(int id, int orderNumber);
|
||||
void ApproveOrder(int id, int orderNumber);
|
||||
void AddComponent(CargoOrderDatabaseComponent component);
|
||||
List<CargoOrderData> GetOrdersFromAccount(int accountId);
|
||||
List<CargoOrderData> RemoveAndGetApprovedFrom(CargoOrderDatabase database);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user