* Start implementing item pricing. * Flesh out prices a bit, add the appraisal tool. * Add prices to more things. * YARRRRRRR * gives pirates an appraisal tool in their pocket. * Makes the various traitor objectives valuable. Also nerfs the price of a living person, so it's easier to bargain for them. * Address reviews. * Address reviews.
27 lines
787 B
C#
27 lines
787 B
C#
using Content.Server.Cargo.Systems;
|
|
using Content.Shared.Cargo.Components;
|
|
|
|
namespace Content.Server.Cargo.Components
|
|
{
|
|
[RegisterComponent]
|
|
public sealed class CargoOrderDatabaseComponent : SharedCargoOrderDatabaseComponent
|
|
{
|
|
public CargoOrderDatabase? Database { get; set; }
|
|
public bool ConnectedToDatabase => Database != null;
|
|
|
|
protected override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
Database = EntitySystem.Get<CargoSystem>().StationOrderDatabase;
|
|
}
|
|
|
|
public override ComponentState GetComponentState()
|
|
{
|
|
if (!ConnectedToDatabase)
|
|
return new CargoOrderDatabaseState(null);
|
|
return new CargoOrderDatabaseState(Database?.GetOrders());
|
|
}
|
|
}
|
|
}
|