Commit Graph

169 Commits

Author SHA1 Message Date
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
Hector Franqui 337f8c46b7 Small bug fixes and log cleanups. 2017-08-29 14:55:38 -04:00
Hector Franqui 4ec8ad7f7f Add priest texture (WIP) 2017-08-29 14:55:21 -04:00
Hector Franqui df56e44bbd Add workplaces support.
Places:
Workplaces are now usable nodes.
Plotmarkers around a building can be scanned and their information stored into current plotmarker.
Slightly optimize plotmarker search.
Occupations:
Add test "priest" occupation definition.
Fix lots of bugs in initialization code.
Spawner:
Add ability to determine occupation name out of surrounding workplaces.
Assign occupation to spawned NPC using simple algorithm.
Others:
Reduce log noise a bit.
Fix some warnings.
2017-08-29 14:54:57 -04:00
Hector Franqui 59bb430e62 Spawner: Nearby plotmarkers are now scanned for all mg_villages:plotmarkers.
Places: Usable nodes now include workplaces
Small bug fixes.
Relationships: Small bugfix with gift item response.
Occupations: Add work node descriptions.
Experimental "priest" occupation.
2017-08-28 15:43:57 -04:00
Hector Franqui 0ddb30c0f9 Finish implementation to find nearby plotmarkers. 2017-08-27 14:46:48 -04:00
Hector Franqui 19c5ca1d0c Add plotmarker search to adapt_mg_villages_plotmarker (WIP)
Small code cleanup.
2017-08-27 12:50:53 -04:00
Hector Franqui d347b6fad5 Finish implementation of npc.places.find_plotmarkers.
Small code refactor.
2017-08-27 12:32:04 -04:00
Hector Franqui ceae61f553 Add gitignore to IntelliJ folder 2017-08-27 11:41:35 -04:00
Hector Franqui a4fd06d1c6 Add nearby plotmarkers search 2017-08-27 11:28:40 -04:00
Hector Franqui ad9032ec5b Add scan functions and node definitions for workplaces. (WIP) 2017-08-25 19:48:34 -04:00
Hector Franqui 11e871a932 Log cleanups. 2017-08-25 09:33:25 -04:00
Hector Franqui 4c102a70a4 Spawner: Large code refactor to remove dependency on plotmarkers.
Most spawner functions can now be called without giving a plotmarker.
Move scanning functions to places.lua.
Places: Cleanup and add more area-scanning functions.
Schedules: Bugfix where schedules weren't being executed due to wrong
"end" order in the do_custom() function.
Data: Moved random data to "data" folder.
Textures: Add 14 male textures and 10 female textures.
Occupations: Small tweaks to "default_basic" occupation.
2017-08-25 09:31:45 -04:00
Hector Franqui 698d247aba Fix misc bugs 2017-08-11 15:41:50 -04:00
Hector Franqui 5a93800e77 Occupations: Add schedule check function, allow enqueuing of schedule check 2017-08-11 12:03:45 -04:00
Hector Franqui 0f931d273c Occupations: Add schedule check function, allow enqueuing of schedule check.
Add simple test farmer occupation (WIP).
2017-08-11 12:01:44 -04:00
Hector Kio 4c0e2b574a Temporary fix for male textures issue. 2017-08-11 10:44:57 -04:00
Hector Franqui 3edc959d3a Dialogues: Finish implementation of registered dialogues.
Ported all trade dialogues to use new dialogue system.
2017-07-19 14:00:29 -04:00
Hector Franqui b5dc9926cd Add 5 additional male textures.
Rename child textures to be more representative.
2017-07-13 19:05:39 -04:00
Hector Franqui bff013bc44 Utilities: Add simple utility code to work with arrays and Lua tables 2017-07-13 19:04:00 -04:00
Hector Franqui 5eceb09cdb Random data: Separate random data in different files for better classification. Add registrations as well. 2017-07-13 19:02:40 -04:00
Hector Franqui e79fb91ff3 Dialogues: Re-write dialogues to allow Minetest's like registration system instead of the actual table lookup system. In general, dialogues now are registered in similar fashion as nodes, entities and others are registered in Minetest.
Relationships: Re-write to the way favorite/disliked items are defined, now allow Minetest's like registration as well.
Random data: Random data now includes registrations for gift items and dialogues.
2017-07-13 19:01:28 -04:00
Hector Franqui bf935fd091 Dialogues: Fix bug with NPCs being frozen if 'Esc' button was pressed to exit dialogue 2017-06-29 19:01:03 -04:00
Hector Franqui 6141af11aa Relationships: Increase gift timer and relationship decrease timer to more usual values.
Fixed small bug on giving unliked items.
2017-06-27 18:39:13 -04:00
Hector Franqui e70888c3e5 Fix bug with 'ignore' nodes when some map areas are not fully loaded but NPC try to perform actions on them. 2017-06-27 18:38:28 -04:00
Hector Franqui cc56446206 NPC: (WIP) Schedule properties support adding one or multiple items to NPC inventory, and support taking one item from NPC inventory.
Attempt to fix child textures issue (2).
2017-06-21 21:07:36 -04:00
Hector Franqui 7110c49b42 Spawner: Avoid multiple spawning by not replacing the mg_villages:plotmarker, but just override its definition.
NPC: (WIP) Support change properties on schedules.
2017-06-21 07:16:11 -04:00
Hector Franqui fd4cec0d63 Spawner: Assign sits, furnaces and storage nodes to spawned NPCs.
Small basic schedule change: NPCs now sit from 12-1 on whatever sit they 'own'.
Fixed /restore_plotmarkers not clearing all metadata.
NPC: Attempted to add a fix for the children growing on their own (due to mobs_redo).
2017-06-19 21:03:24 -04:00
Hector Franqui 3df43ab580 Spawner: Assign sits, furnaces and storage nodes to spawned NPCs.
Small basic schedule change: NPCs now sit from 12-1 on whatever sit they 'own'.
Fixed /restore_plotmarkers not clearing all metadata.
NPC: Attempted to add a fix for the children growing on their own (due to mobs_redo).
2017-06-19 20:54:26 -04:00
Hector Franqui c19ea70242 Spawner: Add clearing of 'replaced' string to /restore_plotmarkers 2017-06-18 11:19:33 -04:00
Hector Franqui a3b428fe14 Fix README.txt and restore correct spawning frequency. 2017-06-17 13:21:24 -04:00
Hector Franqui 4814c16ba0 Remove debug.txt 2017-06-17 13:00:54 -04:00
Hector Franqui 2530918fe9 Fix various bugs 2017-06-17 12:55:50 -04:00
Hector Franqui fb549e7f93 Pathfinder: Drop jumper.lua's pathfinder in favor of MarkBu's pathfinder with slight modifications, as the later one supports 3D paths.
Clean up old pathfinder code.
Add path decoration to MarkBu pathfinder's generated paths.
Change actions.lua and places.lua to use the new pathfinder.
Properly modify README.md.
2017-06-17 11:47:51 -04:00
Hector Franqui e1bf931064 Relationships: change texture of smoke to use default's mod texture 2017-06-17 11:45:57 -04:00
Hector Franqui 3e006ac828 Add proper description.txt, depends.txt 2017-06-17 11:15:40 -04:00
Hector Franqui caa39d97ab NPC: Fixed bugs around new logs and npc chat functions.
Fixed bug with child texture.
2017-06-17 10:22:00 -04:00
Hector Franqui a91160ecc6 NPC: Cleaned up debugging logs.
Standarized logs to have different levels.
Show by default only INFO, ERROR log messages.
Dialogues: Standarized function for NPC chat messages.
Removed trader.lua and trader_test.lua which are part of old 'mobs_npc' mod.
2017-06-17 09:44:25 -04:00