-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
npctalk: add u_sell_item effect #27471
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jenkins rebuild |
GoLoT
reviewed
Jan 6, 2019
fe10336
to
1ffaf80
Compare
ZhilkinSerg
reviewed
Jan 7, 2019
doc/NPCs.md
Outdated
@@ -533,6 +533,10 @@ Your character or the NPC will gain the trait. | |||
### u_buy_item: item_string, (optional cost: cost_num, optional count: count_num, optional container: container_string) | |||
The NPC will give your character the item or count_num copies of the item, contained in container, and will remove `cost_num` from your character's cash if specified. If cost isn't present, the NPC gives your character the item at no charge. | |||
|
|||
### u_buy_item: item_string, (optional cost: cost_num, optional count: count_num) | |||
Your character will give the NPC the item or count_num copies of the item, and will remove `cost_num` from your character's cash if specified. If cost isn't present, the your character gives the NPC the item at no charge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
Your character will give the NPC the item or count_num copies of the item, and will remove `cost_num` from your character's cash if specified. If cost isn't present, the your character gives the NPC the item at no charge. | |
Your character will give the NPC the item or `count_num` copies of the item, and will remove `cost_num` from your character's cash if specified. If cost isn't present, the your character gives the NPC the item at no charge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks for the review.
ZhilkinSerg
reviewed
Jan 7, 2019
1ffaf80
to
ee5521f
Compare
Add an effect that removes an item from the player's inventory and adds it to the NPC's inventory.
ee5521f
to
50ce168
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[C++]
Changes (can be) made in C++. Previously named `Code`
<Enhancement / Feature>
New features, or enhancements on existing
Inventory / AIM / Zones
Inventory, Advanced Inventory Management or Zones
NPC / Factions
NPCs, AI, Speech, Factions, Ownership
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "npctalk: add u_sell_item effect"
Purpose of change
Partially addresses #27397
Add an effect that removes an item from the player's inventory and adds it to the NPC's inventory.
Describe the solution
Basically the reverse of u_buy_item: find an item in the player's inventory, remove it, and add it to the NPC's inventory.
Describe alternatives you've considered
I couldn't figure out how to handle containers.