diff --git a/Content.Server/Store/Components/StoreComponent.cs b/Content.Server/Store/Components/StoreComponent.cs index 063e25fbf9..c391c3d82d 100644 --- a/Content.Server/Store/Components/StoreComponent.cs +++ b/Content.Server/Store/Components/StoreComponent.cs @@ -84,6 +84,10 @@ public sealed partial class StoreComponent : Component [DataField] public EntityUid? StartingMap; + // Miracle + [DataField] + public bool Refunds; + #region audio /// /// The sound played to the buyer when a purchase is succesfully made. diff --git a/Content.Server/Store/Systems/StoreSystem.Ui.cs b/Content.Server/Store/Systems/StoreSystem.Ui.cs index d808b00ed6..f05ae7874a 100644 --- a/Content.Server/Store/Systems/StoreSystem.Ui.cs +++ b/Content.Server/Store/Systems/StoreSystem.Ui.cs @@ -163,7 +163,7 @@ public sealed partial class StoreSystem } } - if (!IsOnStartingMap(uid, component)) + if (!IsOnStartingMap(uid, component) || !component.Refunds) // Miracle edit component.RefundAllowed = false; else component.RefundAllowed = true; @@ -331,7 +331,7 @@ public sealed partial class StoreSystem if (args.Session.AttachedEntity is not { Valid: true } buyer) return; - if (!IsOnStartingMap(uid, component)) + if (!IsOnStartingMap(uid, component) || !component.Refunds) // Miracle edit { component.RefundAllowed = false; UpdateUserInterface(buyer, uid, component); @@ -340,7 +340,7 @@ public sealed partial class StoreSystem if (!component.RefundAllowed || component.BoughtEntities.Count == 0) return; - for (var i = component.BoughtEntities.Count; i >= 0; i--) + for (var i = component.BoughtEntities.Count - 1; i >= 0; i--) // MIRACLE FIX CRINGE { var purchase = component.BoughtEntities[i]; diff --git a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml index 80bb17482c..5574457981 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml @@ -157,7 +157,7 @@ - type: Store preset: StorePresetUplink balance: - Telecrystal: 10 + Telecrystal: 0 - type: UserInterface interfaces: - key: enum.StoreUiKey.Key