Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: DEATHB4DEFEAT <[email protected]>
Signed-off-by: VMSolidus <[email protected]>
  • Loading branch information
VMSolidus and DEATHB4DEFEAT authored Sep 19, 2024
1 parent 1998bc8 commit 015d717
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Content.Server/StoreDiscount/StoreDiscountSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ public void ApplyDiscounts(IEnumerable<ListingData> listings, StorePresetPrototy
var count = _random.Next(store.Sales.MinItems, store.Sales.MaxItems + 1);

listings = listings
.Where(l => !l.SaleBlacklist && l.Cost.Any(x => x.Value > 1)
&& store.Categories.Overlaps(ChangedFormatCategories(l.Categories)))
.Where(l =>
!l.SaleBlacklist
&& l.Cost.Any(x => x.Value > 1)
&& store.Categories.Overlaps(ChangedFormatCategories(l.Categories)))
.OrderBy(_ => _random.Next()).Take(count).ToList();

foreach (var listing in listings)
Expand Down
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/_white/store/sales.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
store-sales-amount = [DISCOUNT] { $amount }%!
store-sales-over = [The sale is over]
store-sales-over = [The sale is over]
2 changes: 1 addition & 1 deletion Resources/Locale/ru-RU/_white/store/sales.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
store-sales-amount = [СКИДКА] { $amount }%!
store-sales-over = [Скидка закончилась]
store-sales-over = [Скидка закончилась]
2 changes: 1 addition & 1 deletion Resources/Prototypes/_White/Store/categories.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- type: storeCategory
id: UplinkSales
name: Sales!
name: Sales
priority: 10

0 comments on commit 015d717

Please sign in to comment.