Commit Graph

206 Commits

Author SHA1 Message Date
BrunoMine
4170d56e62 Add Actions and Tasks documentation 2017-10-23 21:16:07 -02:00
BrunoMine
c89cca24a1 Add API 2017-10-23 21:15:02 -02:00
Hector Franqui
5f9afae5d9 NPC: Support backward compatibility. 2017-10-19 21:51:16 -04:00
Hector Franqui
ec0392096f NPC: After interacting with NPC, original yaw is restored. 2017-10-19 21:47:35 -04:00
Hector Franqui
205bdf6eb1 NPC: Use after_activate() callback to fix animation issue. 2017-10-18 15:09:00 -04:00
Hector Franqui
5bdc3c3c29 NPC: Fix animation state not persistent on interaction/game restart.
Action lock/unlock doesn't perform lock if movement state is sitting or laying.
Right-click interaction can now be disabled in freeze action command.
Upon NPC activation, animation is restored.
2017-10-18 09:05:08 -04:00
Hector Franqui
4a4dc724cd NPC: Fix issues with female and male skins.
Fix naming issues with male skins.
Improve coloring on male skins.
2017-10-16 18:48:02 -04:00
Hector Franqui
d95c8504ec Places: Add truly owned nodes. NPCs shouldn't override ownership
anymore.
Spawner: Add command "/restore_area" to clear up node ownership & usage in manually spawned places.
"/restore_plotmarkers" now clean up node ownership & usage in mg_villages.
2017-10-07 11:28:38 -04:00
Hector Franqui
8a5e80e2cb Places: Allow finding alternative nodes when nodes are being used.
Add owned and used properties to each owned/shared node.
Actions: Allow to find alternative sittable/bed/furnace node if currently
being used.
Default occupation: Add alternative sitting finding.
NPC: Log cleanup.
2017-10-05 18:53:46 -04:00
Hector Franqui
d92b729e19 Fixed bugs related to door positioning, opening/closing, and finding
positions in general.
2017-09-23 10:43:51 -04:00
Hector Franqui
43c69ffee4 Spawner: Add search radius and height to manual spawn egg. 2017-09-21 20:03:01 -04:00
Hector Franqui
164e09bed5 Farmer: Add trading list.
Add 6 cotton seeds as initial inventory.
2017-09-21 18:55:29 -04:00
Hector Franqui
5a79b9a119 Trade: Fix name for stone hoe. 2017-09-21 18:55:02 -04:00
Hector Franqui
d55ffd06fc Schedules: Allow to set trade list as a schedule property.
Trade: Trading list now supports setting maximum sell count, buy count and how much to keep (in case of sell).
Add price for empty bucket.
2017-09-21 18:53:43 -04:00
Hector Franqui
c94edbc649 Log cleanup. 2017-09-21 13:45:34 -04:00
Hector Franqui
cb218fc9f9 Actions: Fix bug with not finding walkable positions around bed. 2017-09-21 13:45:09 -04:00
Hector Franqui
c37c4dd868 Default occupation: Perform casual trading during afternoon, none during
the rest of the day.
2017-09-21 09:02:41 -04:00
Hector Franqui
cf77ab5299 Farmer: Add other schedule entries for commonplace tasks.
Priest: Fixed missing dialogue issue.
Miner: Fixed indentation.
2017-09-18 01:13:20 -04:00
Hector Franqui
175d07476d Remove workspace.xml 2017-09-18 00:33:24 -04:00
NewbProgrammer101
ee38dfe46b Update init.lua 2017-09-17 12:42:55 -04:00
NewbProgrammer101
7f9fedba9d Update default_miner.lua 2017-09-17 12:42:41 -04:00
NewbProgrammer101
5fed6e3a90 Update default_miner.lua 2017-09-17 12:42:24 -04:00
NewbProgrammer101
c3d5a995a6 Create default_miner.lua 2017-09-17 12:41:30 -04:00
NewbProgrammer101
a527bcd746 Update default_farmer.lua 2017-09-17 12:40:40 -04:00
NewbProgrammer101
e1a7efe9ab Update default_priest.lua 2017-09-17 12:31:31 -04:00
Hector Franqui
2a979ef1fe Actions: Add sounds to dig/place actions. 2017-09-17 12:11:31 -04:00
Hector Franqui
580792284d Spawner: Fix undefined node 2017-09-15 18:29:38 -04:00
Hector Franqui
561b11f8fe Spawner: Fix typo 2017-09-15 18:17:19 -04:00
Hector Franqui
db415dee97 Occupations: Change building type format to be more flexible.
Spawner: Huge rework on logic to determine occupations. Warning! Completely incomprehensible code.
Schedule: Improve schedule check enqueue and execution.
Optimize walk_to_pos if used on distances < 3
Huge amounts of log cleanup.
Places: Improve adding shared places.
Improve orthogonal node scanning by using walkables and not one single node.
2017-09-15 14:51:37 -04:00
Hector Franqui
b02a78de6d Default Farmer (WIP):
Improve schedule entries, schedule check.
Change to new building type format.
2017-09-15 14:47:04 -04:00
Hector Franqui
8cf1e932bc Default Priest:
Change building type definitions to new format.
2017-09-15 14:46:08 -04:00
Hector Franqui
bcd6327a13 Merge branch 'master' of https://github.com/hkzorman/advanced_npc 2017-09-15 14:44:45 -04:00
Hector Franqui
866b25c63c Pathfinder: Fix indentation.
Improve path decorator to avoid jumping NPCs (in Minetest 0.5-dev)
2017-09-13 09:09:08 -04:00
Hector Franqui
70fd62825c Actions: Fix bugs in dig and place actions.
Fix bug in get_pos_argument() function.
Optimize walk_to_pos task and improve usage of access node.
Improve get_direction() by using vector.direction() and vector.round()
2017-09-13 09:06:58 -04:00
Hector Franqui
770125fae9 Log cleanup. 2017-09-12 09:09:15 -04:00
Hector Franqui
70c7a3c96f Actions: Add mine animation to dig/place actions.
Fix bug enabling wandering after dig action.
Improved "random" dir functionality for walk_step to avoid getting NPC stuck.
General formatting fixes.
2017-09-12 09:08:44 -04:00
NewbProgrammer101
245c2c32c2 My first pull request. (#15)
* Delete occupations_data.lua
* Update default_priest.lua
* Update init.lua
2017-09-08 08:31:19 -04:00
Hector Franqui
ce47958144 Actions: Fix bugs and improve dig and place action commands. 2017-09-07 08:51:50 -04:00
Hector Franqui
2a0b0aa538 Occupations: Refactor all occupation defs into separate Lua files.
Add WIP priest occupation.
Add WIP (very WIP) farmer occupation.
2017-09-05 22:47:03 -04:00
Hector Franqui
6c3988a731 Occupation: Add ability to set some of the NPCs properties.
Currently, you can set:
 - Trader status
 - Whether to show or hide gift items hints
NPC: Add enable/disable gift item hints flag
Schedules: Allow to set the enable/disable gift item hints flag
Dialogues: Add ability to choose from normal dialogues if hint dialogues are disabled.
2017-09-05 19:02:50 -04:00
Hector Franqui
8e5d6d03f4 Spawner: Fix issue when "npcs" table is not present in restore_plotmarkers. 2017-09-01 18:27:17 -04:00
Hector Franqui
fe5a155177 Fix bug with dialogues being cleared for NPCs on occupation init. 2017-09-01 18:15:53 -04:00
Hector Franqui
cd8e3c09cb Priest occupation (WIP) 2017-09-01 14:15:23 -04:00
Hector Franqui
48eb8078b3 Schedules: Add support to change flags in schedules. 2017-09-01 14:15:01 -04:00
Hector Franqui
939181284b Spawner: Add workplaces properly to the usable nodes. 2017-09-01 14:14:35 -04:00
Hector Franqui
40ac2a55a1 Actions: Fix bug and add support for using access node. 2017-09-01 14:13:13 -04:00
Hector Franqui
ba6348663b Dialogues: Fix bug when not having custom trade offers. 2017-08-31 17:59:46 -05:00
Hector Franqui
c9eb3b0ef4 Spawner: Workplaces are properly assigned to NPC.
If a workplace is assigned to a NPC, it is not used by any other NPC.
"/restore_plotmarkers" command also restores the workplace so it can
be used by other NPCs.
Occupations: Dialogues are registered on occupation registration.
2017-08-31 09:11:43 -04:00
Hector Franqui
706a5cf188 Add occupation name to entity properties. 2017-08-29 18:16:48 -05:00
Hector Franqui
e85a8161c3 Change names to match convention. 2017-08-29 18:12:21 -05:00