Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase syndicate uplink discount amount to 6. #33950

Merged
merged 2 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Content.IntegrationTests/Tests/StoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ await server.WaitAssertion(() =>
var discountComponent = entManager.GetComponent<StoreDiscountComponent>(pda);
Assert.That(
discountComponent.Discounts,
Has.Exactly(3).Items,
$"After applying discount total discounted items count was expected to be '3' "
Has.Exactly(6).Items,
$"After applying discount total discounted items count was expected to be '6' "
+ $"but was actually {discountComponent.Discounts.Count}- this can be due to discount "
+ $"categories settings (maxItems, weight) not being realistically set, or default "
+ $"discounted count being changed from '3' in StoreDiscountSystem.InitializeDiscounts."
+ $"discounted count being changed from '6' in StoreDiscountSystem.InitializeDiscounts."
);
var discountedListingItems = storeComponent.FullListingsCatalog
.Where(x => x.IsCostModified)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void OnStoreInitialized(ref StoreInitializedEvent ev)

private IReadOnlyList<StoreDiscountData> InitializeDiscounts(
IReadOnlyCollection<ListingDataWithCostModifiers> listings,
int totalAvailableDiscounts = 3
int totalAvailableDiscounts = 6
)
{
// Get list of categories with cumulative weights.
Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/Catalog/discount_categories.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- type: discountCategory
id: rareDiscounts # Dirty-cheap items that are rarely used and can be discounted to 0-ish cost to encourage usage.
weight: 18
maxItems: 2
maxItems: 4

- type: discountCategory
id: usualDiscounts # Cheap items that are used not very often.
Expand All @@ -10,4 +10,4 @@
- type: discountCategory
id: veryRareDiscounts # Casually used items that are widely used but can be (rarely) discounted for epic lulz.
weight: 2
maxItems: 1
maxItems: 2
Loading