CatStation/Content.Shared/Store/StoreUi.cs
SlamBamActionman 0d616cf6df
Universal uplink codes (#38712)
* Halfway commit

* Finishing commit, maybe?

* Fix test, update ringtone UI to look nicer

* Fix command, add failsafe

* Documentation

* Can we just mark ValidatePrototypeId as obsolete please

* I'm too tired and my bones hurt

* Change uplink code generation method

* Move RingerAccessUplinkComponent to Server, because cheat clients could make use of it

* Fix uplink implant changes, review changes, repair broken serialization.

* cleanup and master merge

* forgot the Linq

* Linqd

* Our store system is pretty goddamn awful wow

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-04-04 19:46:43 +00:00

67 lines
1.7 KiB
C#

using Content.Shared.FixedPoint;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Store;
[Serializable, NetSerializable]
public enum StoreUiKey : byte
{
Key
}
[Serializable, NetSerializable]
public sealed class StoreUpdateState : BoundUserInterfaceState
{
public readonly HashSet<ListingDataWithCostModifiers> Listings;
public readonly Dictionary<ProtoId<CurrencyPrototype>, FixedPoint2> Balance;
public readonly bool ShowFooter;
public readonly bool AllowRefund;
public StoreUpdateState(HashSet<ListingDataWithCostModifiers> listings, Dictionary<ProtoId<CurrencyPrototype>, FixedPoint2> balance, bool showFooter, bool allowRefund)
{
Listings = listings;
Balance = balance;
ShowFooter = showFooter;
AllowRefund = allowRefund;
}
}
[Serializable, NetSerializable]
public sealed class StoreRequestUpdateInterfaceMessage : BoundUserInterfaceMessage
{
}
[Serializable, NetSerializable]
public sealed class StoreBuyListingMessage(ProtoId<ListingPrototype> listing, NetEntity? soundSource) : BoundUserInterfaceMessage
{
public ProtoId<ListingPrototype> Listing = listing;
public NetEntity? SoundSource = soundSource;
}
[Serializable, NetSerializable]
public sealed class StoreRequestWithdrawMessage : BoundUserInterfaceMessage
{
public string Currency;
public int Amount;
public StoreRequestWithdrawMessage(string currency, int amount)
{
Currency = currency;
Amount = amount;
}
}
/// <summary>
/// Used when the refund button is pressed
/// </summary>
[Serializable, NetSerializable]
public sealed class StoreRequestRefundMessage : BoundUserInterfaceMessage
{
}