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

Create a new store plugin #1743

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Create a new store plugin #1743

merged 2 commits into from
Mar 5, 2024

Conversation

julien-lecomte
Copy link
Contributor

@julien-lecomte julien-lecomte commented Mar 1, 2024

New NWScript Functions
  • Store: New GetIsRestrictedBuyItem
  • Store: New {Get|Set}BlackMarketMarkDown
  • Store: New {Get|Set}MarkDown
  • Store: New {Get|Set}MarkUp

Since there's the possibilty of having a whitelist or blacklist for selling back to the store, I'm unsure if exposing just GetIsRestrictedBuyItem is sufficient.

Comment on lines +76 to +77
ASSERT_OR_THROW(nValue >= 1);
ASSERT_OR_THROW(nValue <= 1000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the asserts >=1 and <= 1000 here while for the others it's >=0 and <=100, that said, are they percentages or flat goldpiece values?

Copy link
Contributor Author

@julien-lecomte julien-lecomte Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values are the min and max that the toolset editor allows us to use in the UI. They're percentage points: 110 is 10% increase in price.

Plugins/Store/Store.cpp Outdated Show resolved Hide resolved
Plugins/Store/Store.cpp Show resolved Hide resolved
@Daztek Daztek merged commit 41dd0c2 into nwnxee:master Mar 5, 2024
1 check passed
@julien-lecomte julien-lecomte deleted the stores branch March 5, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants