Implements item pricing, and piracy. (#8548)
* 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.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Server.Cargo.Systems;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.Cargo;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Server.Cargo.Systems;
|
||||
using Content.Shared.Cargo.Components;
|
||||
|
||||
namespace Content.Server.Cargo.Components
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Server.Cargo.Systems;
|
||||
using Content.Shared.Cargo;
|
||||
using Content.Shared.Cargo.Components;
|
||||
using Content.Shared.MachineLinking;
|
||||
|
||||
26
Content.Server/Cargo/Components/MobPriceComponent.cs
Normal file
26
Content.Server/Cargo/Components/MobPriceComponent.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace Content.Server.Cargo.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for calculating the price of mobs.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class MobPriceComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// How much of a penalty per part there should be. This is a multiplier for a multiplier, the penalty for each body part is calculated from the total number of slots, and then multiplied by this.
|
||||
/// </summary>
|
||||
[DataField("missingBodyPartPenalty")]
|
||||
public double MissingBodyPartPenalty = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The base price this mob should fetch.
|
||||
/// </summary>
|
||||
[DataField("price", required: true)]
|
||||
public double Price;
|
||||
|
||||
/// <summary>
|
||||
/// The percentage of the actual price that should be granted should the appraised mob be dead.
|
||||
/// </summary>
|
||||
[DataField("deathPenalty")]
|
||||
public double DeathPenalty = 0.2f;
|
||||
}
|
||||
10
Content.Server/Cargo/Components/PriceGunComponent.cs
Normal file
10
Content.Server/Cargo/Components/PriceGunComponent.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Content.Server.Cargo.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for the price gun, which calculates the price of any object it appraises.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class PriceGunComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
14
Content.Server/Cargo/Components/StackPriceComponent.cs
Normal file
14
Content.Server/Cargo/Components/StackPriceComponent.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Content.Server.Cargo.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for pricing stacks of items.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class StackPriceComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The price of the object this component is on, per unit.
|
||||
/// </summary>
|
||||
[DataField("price", required: true)]
|
||||
public double Price;
|
||||
}
|
||||
14
Content.Server/Cargo/Components/StaticPriceComponent.cs
Normal file
14
Content.Server/Cargo/Components/StaticPriceComponent.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Content.Server.Cargo.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for setting a static, unchanging price for an object.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class StaticPriceComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The price of the object this component is on.
|
||||
/// </summary>
|
||||
[DataField("price", required: true)]
|
||||
public double Price;
|
||||
}
|
||||
Reference in New Issue
Block a user