Files
crystall-punk-14/Content.Shared/_CP14/Trading/Components/CP14TradingPlatformComponent.cs

31 lines
873 B
C#
Raw Normal View History

using Content.Shared._CP14.Trading.Systems;
using Content.Shared.Tag;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.Trading.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(CP14SharedTradingPlatformSystem))]
public sealed partial class CP14TradingPlatformComponent : Component
{
[DataField, AutoNetworkedField]
public TimeSpan NextBuyTime = TimeSpan.Zero;
[DataField]
public SoundSpecifier BuySound = new SoundPathSpecifier("/Audio/_CP14/Effects/cash.ogg")
{
Params = AudioParams.Default.WithVariation(0.1f)
};
[DataField]
public ProtoId<TagPrototype> CoinTag = "CP14Coin";
[DataField]
public EntProtoId BuyVisual = "CP14CashImpact";
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
[DataField]
public float PlatformMarkupProcent = 1f;
}