mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* i wanna explode * Revert "i wanna explode" This reverts commit 595dc4ea49aa81d9ca19fccc52279cf7ef52c13d. * fix * Update Content.Client/Store/Ui/StoreListingControl.xaml.cs Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * Update Content.Server/Store/Conditions/BuyerBodyCountCondition.cs Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * Update Content.Shared/Store/ListingCondition.cs Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * Update Content.Shared/Store/ListingPrototype.cs Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * frog * wewlad * cut mah life into pieces, this is my last resort * ewjqiorwerte * Apply suggestion from @ScarKy0 * works * Apply suggestion from @ScarKy0 * init * small cleanup * Revert "init" This reverts commit db5d86aa6d662463972539462bccb61ba441624b. --------- Co-authored-by: nomdéraisonnablementlong <you@example.com> Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Co-authored-by: ScarKy0 <scarky0@onet.eu>
29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using JetBrains.Annotations;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Store;
|
|
|
|
/// <summary>
|
|
/// Used to define a complicated condition that requires C#
|
|
/// </summary>
|
|
[ImplicitDataDefinitionForInheritors]
|
|
[MeansImplicitUse]
|
|
public abstract partial class ListingCondition
|
|
{
|
|
/// <summary>
|
|
/// Determines whether or not a certain entity can purchase a listing.
|
|
/// </summary>
|
|
/// <returns>Whether or not the listing can be purchased</returns>
|
|
public abstract bool Condition(ListingConditionArgs args);
|
|
|
|
/// <summary>
|
|
/// If true, then this conditions will cause the listing to be locked instead of disappearing from the shop UI.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool Lock;
|
|
}
|
|
|
|
/// <param name="Buyer">Either the account owner, user, or an inanimate object (e.g., surplus bundle)</param>
|
|
/// <param name="Listing">The listing itself</param>
|
|
/// <param name="EntityManager">An entitymanager for sane coding</param>
|
|
public readonly record struct ListingConditionArgs(EntityUid Buyer, EntityUid? StoreEntity, ListingData Listing, IEntityManager EntityManager);
|