Commit Graph

15 Commits

Author SHA1 Message Date
zorman2000
fcc1968179 Trade: Added dedicated trader's formspec. 2017-02-01 21:16:31 -05:00
zorman2000
d8b90d95c3 Trade: Add function to store trade offers on NPC data based on the trading status.
Add support to avoid flipping sold items out of stock to buy immediately.
2017-02-01 11:36:20 -05:00
zorman2000
b3b9bf393f Trade: Added basic logic for dedicated traders offers. 2017-01-30 21:51:16 -05:00
zorman2000
54c005ec34 Trade: Add dedicated trading prompts.
Dialogue: Add support to show dedicated trading prompts for dedicated traders.
(WIP) Get buy/sell offers for dedicated traders.
2017-01-29 20:30:43 -05:00
zorman2000
d7a8de5b86 Trade: A list of buyable items is now calculated with the maximum amount buyable (given the currency), the minimum buyable amount and the minimum price.
Port casual trading to use this system.
Refactor the offer function to also support dedicated trading.
2017-01-29 20:08:34 -05:00
zorman2000
75af34beb5 Dialogue: full support for flag-based dialogues.
Added support for nested dialogue trees.
Trade: (WIP) Refactor code to support dedicated trading.
2017-01-26 12:55:04 -05:00
zorman2000
60b847a02a Actions: (WIP) Add locks, unlocks and re-execution of actions if there are interruptions. Need to improve the lock/unlock mechanism.
Dialogues, trading: Add lock and unlock upon starting/finishing an interaction.
Updated README with progress.
Pathfinding: Fix slight bug that avoid a map being generated if the difference of start and end positions' z coordinate is zero.
2017-01-18 19:34:02 -05:00
zorman2000
d78fee695e Actions: added experimental, still WIP path-finding code in Lua 2016-12-28 22:10:06 -05:00
zorman2000
646b422082 Actions: Added some fundamental movement actions.
Places: Added functions for adding and getting places, and for finding places of specific types. Added beds, chairs and chest as places.
NPC: Added places map and action queue.
2016-12-18 12:32:39 -05:00
zorman2000
a2e38ab85f NPC: Rewrote external inventory methods.
Trade: Added change casual offers timer functionality.
2016-12-17 14:27:23 -05:00
zorman2000
c15e8232d5 Trade: Fully working buy and sell offers.
Improvements to prices and price-related mechanisms.
NPC: Improved get_item_name and get_item_count methods.
2016-12-17 12:01:35 -05:00
zorman2000
f717c3f1e5 Trade: Working buy/sell trade mechanism.
Various cleanups and modularizations for supporting dedicated traders.
Data: Added more favorite items for phase 1.
2016-12-15 20:51:06 -05:00
zorman2000
376c6e1df0 Trade: Casual trading dialogues are now shown for NPCs correctly.
Added infrastructure to hold results from dialogues.
Added casual buy/sell trade formspec.
WIP: Trade mechanism for casual buy/sell.
2016-12-15 14:42:45 -05:00
zorman2000
0b0abc4706 NPCs: Now spawn with 1 or 2 items from the favorite items list.
Trade: Added dialogues for buys and sells for casual trading.
Dialogues: Added a 30% chance for NPC to make a trade offer.
Trade: Trade offers WIP.
2016-12-14 20:03:51 -05:00
zorman2000
83c9b2c681 Cleanup: moved relationships into own file.
Moved trading and pricing code to another folder, separate files.
NPC: Added further inventory functionality.
Trading: Added price data structure, which allows for setting prices for items. Also includes some default definitions.
2016-12-11 20:52:57 -05:00