This week I completed basic trade.
Trade
All citizens have an internal inventory and are given some items at spawn. The player can go and interact with any citizen to bring up the trade UI. Here the player will select one item from the citizen's inventory and one item from their own inventory which they wish to trade. The player then makes an offer which the citizen may accept or decline.
Inventory management works exactly the same way that buying and selling works. Lists in the trading UI refresh after the trade to reflect the new inventory, something that I couldn't implement in the market but will do sometime in the future.
Marketplace NPE
During the playtest, a bug was discovered which caused a crash on a pure client. It is related to the initialization of the WalletSystem
in the class which updates the player wallet.
The corresponding GitHub issue is #25
PRs
To Do
- Handle dialogue closing
- Create a new shopkeeper citizen
- Quest NPCs