Commit Graph

99 Commits

Author SHA1 Message Date
sys4-fr 97da2dc191 Fix crash when npc close a door
Comment debug messages
2018-03-27 23:29:04 +02:00
sys4-fr 166db4b5e5 Fix crash 2018-03-25 15:46:58 +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 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 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 175d07476d Remove workspace.xml 2017-09-18 00:33:24 -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 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 48eb8078b3 Schedules: Add support to change flags in schedules. 2017-09-01 14:15:01 -04:00
Hector Franqui 706a5cf188 Add occupation name to entity properties. 2017-08-29 18:16:48 -05: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 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 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 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 2530918fe9 Fix various bugs 2017-06-17 12:55:50 -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
Hector Franqui bf0f643e3e NPC: Changed general issue with names. Now names are a dedicated variable, not anymore a nametag.
NPC names aren't visible anymore.
Spawner: Added NPC statistics to plotmarkers.
Add statistics-based spawning for a more balanced, family-type spawning of NPCs.
2017-06-17 09:08:29 -04:00
Hector Franqui adeeecd43e Pathfinding (WIP): Use MarkBu's pathfinder mod as the new pathfinder.
Actions: Modify walk_to_pos to use new pathfinding code.
Allow support for giving positions as strings or tables referring to specific places on Places Map.
Spawner: Assign beds to NPCs.
Increase amount of NPCs now being spawned as they are able to reach top floor beds.
Places: Slight overhaul and changes. Add more info to places.
NPC: Hide nametag.
2017-06-14 18:42:36 -04:00
Hector Franqui d4e8744cfb Spawner: Assign entrance door to every NPC spawned.
Increased ABM chance to make NPC spawning less laggy.
Improved building scanning, finally now has correct data for scanning nodes.
Places: Finding entrances is limited now to MTG doors.
2017-05-19 14:36:11 -04:00
Hector Franqui 1d1a56592b Actions: Rewrite API to use executor function + constants of commands.
Re-write NPC add action/task functions, do_custom() to use new actions API.
Spawner: Find building entrances (WIP)
Places: Fix numerous bugs with add/get places functions.
Actions: Fix bugs with sittable task.
2017-05-13 13:17:45 -04:00
Hector Franqui 9b3d458872 Spawner: Part 1: Add initial code to find doors front/behind position.
Detect first floor nodes.
2017-05-05 18:34:16 -04:00
Hector Franqui f4c374314a Actions: Enhance walking reliability by adding a moveto() at the end of every step and just before the next step.
Increase walking speed constants to more normal values.
2017-05-05 09:13:30 -04:00
Zorman2000 a667f538f8 Spawner: Find entrance doors (WIP) 2017-04-08 10:21:51 -04:00
Zorman2000 7f2e1b665a Pathfinding: Cleanup jumper.lua
Add copyright notices to jumper.lua
Remove 'pathfinder2.lua'
2017-04-04 10:11:19 -04:00
Zorman2000 297dd379a6 Pathfinding: Fix for mod security - joining up Jumper library code (WIP) 2017-04-03 21:48:17 -04:00
Zorman2000 d375762d11 NPCs: Add random female and male names.
Spawner: Start adding metadata to spawner, places to NPCs. (WIP)
2017-03-27 14:47:31 -04:00
Zorman2000 b5ef1f8ed8 Spawner: automatic and manual spawning now works completely. 2017-03-27 14:03:40 -04:00
Zorman2000 509bf571b1 Spawner: Fixed spawning. (WIP) 2017-03-27 11:08:18 -04:00
Zorman2000 e937cc4ce4 Spawner: Moved all spawning code to spawner.lua.
Started progress on node timer-based NPC spawning (WIP)
2017-03-22 22:08:41 -04:00
Zorman2000 f5fbda142e Spawner: Adds LBM to replace mg_villages:plotmarker with advanced_npc:auto_spawner (WIP).
Adds initial scan code (WIP).
2017-03-18 10:32:37 -04:00
zorman2000 bd6d735170 Actions: Change use sittable and use bed interface to use them as tasks.
Schedules: Allow tasks to be added as well as actions.
2017-03-09 19:41:44 -05:00
zorman2000 f55757d334 Schedules: Fix bugs, add simple test schedule. 2017-03-09 13:54:37 -05:00
zorman2000 fecdf8ff48 Schedules: Add correct execution interval for times. 2017-03-08 09:36:53 -05:00
zorman2000 1417e35ffb Trade: (WIP) Add custom trading dialogues, custom trading offers and code to show the custom trading options. 2017-02-23 07:27:25 -05:00
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