Files
crystall-punk-14/Content.Shared/_CP14/Trading/Components/CP14SellingPlatformComponent.cs
Red 6570b1b4b6 Public market + Solutions requests (#1503)
* Add platform markup to trading platform prices

Introduces a PlatformMarkupProcent field to CP14TradingPlatformComponent and applies it to price calculations in both client and server logic. Adds a new public trading platform entity with a higher markup and updates related sprites and metadata.

* Add platform markup percent to selling platforms

Introduces a PlatformMarkupProcent field to CP14SellingPlatformComponent, allowing selling platforms to apply a markup or markdown to item prices. Updates server logic to use this value when calculating payouts and UI state. Adds a new public selling platform entity with a lower markup in the trade_platform.yml prototype.

* Add Brad Potions trading requests prototype

Introduces a new YAML prototype defining multiple cp14TradingRequest entries for the BradPotions faction, each specifying requirements for various potion effects with minimum purity and amount.

* Apply platform markup to selling prices and payouts

Updated the selling request control and platform window to factor in the platform's markup percentage when displaying prices. Adjusted the server-side payout logic to multiply the payout by the platform markup percentage, ensuring consistency between client display and server rewards.

* replace mapping to public platforms

* bug + remove eepy potions request

* Clarify purity requirement in workbench reagent text

Updated the reagent requirement string in both English and Russian locale files to indicate that the required purity is '{$purity}%+' instead of just '{$purity}%'. This clarifies that the purity must be at least the specified percentage.
2025-07-06 00:09:03 +03:00

25 lines
709 B
C#

using Content.Shared._CP14.Trading.Systems;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.Trading.Components;
/// <summary>
/// Allows you to sell items by overloading the platform with energy
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedTradingPlatformSystem))]
public sealed partial class CP14SellingPlatformComponent : Component
{
[DataField]
public SoundSpecifier SellSound = new SoundPathSpecifier("/Audio/_CP14/Effects/cash.ogg")
{
Params = AudioParams.Default.WithVariation(0.1f),
};
[DataField]
public EntProtoId SellVisual = "CP14CashImpact";
[DataField]
public float PlatformMarkupProcent = 1f;
}