Skip to content

Commit

Permalink
:trollface:
Browse files Browse the repository at this point in the history
  • Loading branch information
deltanedas committed Dec 22, 2024
1 parent 64b819c commit 2cf0102
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<BoxContainer Orientation="Vertical">
<PanelContainer StyleClasses="LowDivider" />
<BoxContainer Orientation="Horizontal" Margin="10 2 5 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'vending-machine-flavor-left'}" StyleClasses="WindowFooterText" />
<Label Text="{Loc 'vending-machine-flavor-right'}" StyleClasses="WindowFooterText"
<Label Text="{Loc 'shop-vendor-flavor-left'}" StyleClasses="WindowFooterText" />
<Label Text="{Loc 'shop-vendor-flavor-right'}" StyleClasses="WindowFooterText"
HorizontalAlignment="Right" HorizontalExpand="True" Margin="0 0 5 0" />
<TextureRect StyleClasses="NTLogoDark" Stretch="KeepAspectCentered"
VerticalAlignment="Center" HorizontalAlignment="Right" SetSize="19 19"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed partial class ShopVendorWindow : FancyWindow

private EntityUid _owner;
private readonly StyleBoxFlat _style = new() { BackgroundColor = new Color(70, 73, 102) };
private readonly StyleBoxFlat _styleBroke = new() { BackgroundColor = new Color(30, 43, 52) };
private readonly StyleBoxFlat _styleBroke = new() { BackgroundColor = Color.FromHex("#303133") };
private readonly List<ListContainerButton> _buttons = new();
private uint _balance = 1;

Expand Down
10 changes: 5 additions & 5 deletions Content.Shared/DeltaV/VendingMachines/SharedShopVendorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private void OnPurchase(Entity<ShopVendorComponent> ent, ref ShopVendorPurchaseM
var user = args.Actor;
if (!_access.IsAllowed(user, ent))
{
Deny(ent);
Deny(ent, user);
return;
}

Expand All @@ -104,15 +104,15 @@ private void OnPurchase(Entity<ShopVendorComponent> ent, ref ShopVendorPurchaseM
RaiseLocalEvent(ent, ref ev);
if (!ev.Paid)
{
Deny(ent);
Deny(ent, user);
return;
}

ent.Comp.Ejecting = listing.Id;
ent.Comp.NextEject = Timing.CurTime + ent.Comp.EjectDelay;
Dirty(ent);

_audio.PlayPredicted(ent.Comp.PurchaseSound, ent, user);
_audio.PlayPvs(ent.Comp.PurchaseSound, ent);
UpdateVisuals(ent);

Log.Debug($"Player {ToPrettyString(user):user} purchased {listing.Id} from {ToPrettyString(ent):vendor}");
Expand All @@ -124,9 +124,9 @@ protected virtual void AfterPurchase(Entity<ShopVendorComponent> ent)
{
}

private void Deny(Entity<ShopVendorComponent> ent)
private void Deny(Entity<ShopVendorComponent> ent, EntityUid user)
{
_popup.PopupEntity(Loc.GetString("vending-machine-component-try-eject-access-denied"), ent);
_popup.PopupClient(Loc.GetString("vending-machine-component-try-eject-access-denied"), ent, user);
if (ent.Comp.Denying)
return;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
shop-vendor-balance = Balance: {$points}
shop-vendor-stack-suffix = x{$count}
shop-vendor-flavor-left = All payments are secure
shop-vendor-flavor-right = v1.2

0 comments on commit 2cf0102

Please sign in to comment.