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

💸npctrade💸: Remove item locations from trade window #38256

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

pjf
Copy link
Contributor

@pjf pjf commented Feb 23, 2020

Summary

SUMMARY: Interface "Item locations are no longer shown in the trade interface"

Purpose of change

This change removes item locations from the NPC trading screen, with the following assumptions and rationale:

  • Survivors don't care if they're buying the toaster pastry that's on the table, or in the trader's inventory
  • If items in the trade interface are sorted (which greatly improves usability on large inventories), then showing the location makes the screen very busy, and means we can't collapse individual items down into stacks.
  • The colors mean we can't show items using colors that players are used to (eg: colouring books by read status).
  • No other interface shows locations in this way, so it's unexpected. (I first thought it was a bug!)

However I'm not familiar with the npctrade design decisions, so my assumptions may be wrong.

Describe the solution

This just removes the code that adds item locations in the npctrade interface.

Describe alternatives you've considered

Not doing this.

Testing

Happily played with this change on a trans-pacific flight, and made trades with multiple traders.

Additional context

  1. 💸npctrade💸: Sort trade results by category and name. #38254 adds some basic sorting to the NPC trade interface.
  2. I made this change while on a redeye flight from Australia, so it's entirely possible I've missed something.

@ifreund ifreund added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Feb 23, 2020
@anothersimulacrum
Copy link
Member

Survivors don't care if they're buying the toaster pastry that's on the table, or in the trader's inventory

I do care about this when trading with my companions, but not with NPC traders.

@pjf
Copy link
Contributor Author

pjf commented Feb 23, 2020 via email

@pjf pjf closed this Feb 23, 2020
Survivors don't really care about item locations when buying items, only
when trading with allies.
@pjf pjf reopened this Feb 23, 2020
@pjf
Copy link
Contributor Author

pjf commented Feb 23, 2020

Updates:

  • We now only remove location and colour when trading with merchants. It remains in place for trades with allies.
  • Adjusted npc_will_accept_trade to use np.will_trade_items_freely() instead of np.player_ally(), so it's consistent with the rest of the code. (Currently both methods are the same, but this future-proofs us somewhat.)

@Shibimon
Copy link

Shibimon commented Feb 25, 2020

Why don't we just remove from the list the items that don't belong to the faction vendor while at it.
Now that we have the faction flags, they can sell only things they actually own, and will stop trying to sell player things dropped on the floor, that looks really wierd and like a bug.
It could be even better making merchants sell things in a bigger radius, so player could buy things from a "settlement" like the Refugee Center but maybe will need some kind of "not tradeable" flag too, and all this will be miles away from the scope of this PR.

@pjf
Copy link
Contributor Author

pjf commented Feb 29, 2020

@Shibimon :

Why don't we just remove from the list the items that don't belong to the faction vendor while at it.

I can't reproduce this. I haul a bunch of stuff to my local merchant, drop it on the floor next to them, and never see it on their side of the trades.

Do you have steps to reproduce?

@Dacendeth
Copy link
Contributor

Wont this cause a problem with the free merchants at at the hub, the merchant there sell things that are elusively on the tables around him.

@pjf
Copy link
Contributor Author

pjf commented Mar 1, 2020

@Dacendeth : Oh, they still sell the items from those locations, they just won't add them to the item name.

Paired with #38254 , this means you get items in sorted (category, then name) order, which I've found makes it much easier to find what you're looking for, especially when the merchant has a large inventory.

@kevingranade kevingranade merged commit 8cf5119 into CleverRaven:master Apr 2, 2020
@pjf pjf deleted the sorted_trading branch June 15, 2021 13:31
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 Info / User Interface Game - player communication, menus, etc. NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants