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

Allow NPCs to accept exact trades. #49470

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

pjf
Copy link
Contributor

@pjf pjf commented Jun 27, 2021

Summary

Bugfixes "NPCs will now accept trades that are exactly balanced"

Purpose of change

There are instances where NPCs will charge for services rendered, such as training. These are usually nice round numbers (eg: $10), but the trade interface would disallow trades with a value of the exact amount (eg: 4 Merch) if the NPC was unwilling to extend credit, even though no credit is being extended.

Describe the solution

Changed an operator from > to >=, allowing exact-value trades.

Describe alternatives you've considered

Doing my taxes, becuase it's the Australian end of financial year.

Testing

  • Loaded this save and asked Fatima to train my character in Athletics for $10.
  • Verified Fatima won't accept 4 Merch ($10) before this patch is applied
  • Verified Fatima does accept with this patch applied.

This solves issues where an NPC offers to train you for (say) $10, but
actually insists on $10.01 or more in value.
@anothersimulacrum anothersimulacrum added [C++] Changes (can be) made in C++. Previously named `Code` NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Jun 27, 2021
@actual-nh actual-nh added the <Bugfix> This is a fix for a bug (or closes open issue) label Jun 28, 2021
@kevingranade kevingranade merged commit ba7ebad into CleverRaven:master Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants