148 Commits

Author SHA1 Message Date
kwolekr
67a32d0c03 Revert "Fix issue #2441: crash on respawn, since a conversion std::list to std::vector on Environment.cpp"
This reverts parts of commit 9749d9fee6db99da1ab861dc04ec63ef973db3e0, which breaks node resolver
list clearing
2015-03-20 18:41:26 -04:00
paramat
b13d0401c0 Heightmaps: Fix uninitialised values in mgv5/mgv6. findGroundLevel: Return -MAP_GENERATION_LIMIT if surface not found 2015-03-08 03:54:03 +00:00
ngosang
55e479a807 Respect game mapgen flags and save world noise params 2015-03-07 15:53:39 -05:00
Craig Robbins
1e07aa835e Fix mapgen using unitialised height map values 2015-03-06 01:42:55 +10:00
Loic Blot
5e4c5bfb4f Fix issue #2441: crash on respawn, since a conversion std::list to std::vector on Environment.cpp
* Also change some std::list to std::vector for ClientMap::renderMap
* Remove disabled code in ClientMap::renderMap, disabled since a long time
2015-03-05 15:36:20 +01:00
kwolekr
87330183bf Fix all warnings and remove -Wno-unused-but-set cflag 2015-01-18 23:29:19 -05:00
kwolekr
fac3366ce7 Prevent transform of noise3d result in getBlockSeed2 2015-01-12 15:46:04 -05:00
kwolekr
97c7e9a5f6 Optionally specify propagateSunlight area in calcLighting
This fixes the Mapgen V5 calcLighting segfault
2015-01-05 01:20:36 -05:00
kwolekr
5370bf9a50 Add minetest.generate_ores() and minetest.generate_decorations() 2015-01-04 22:38:48 -05:00
kwolekr
7ba812f028 Lighting: Fix nearly all issues
The cause of a single light source seemingly being lit without spread
was due to its creation in the +Y mapblock boundary layer during map
generation, which was ignored as the overtop.  This overtop explicitly
needs to be omitted during sunlight propagation, however.  To accomplish
this, Mapgen::calcLighting() was split into separate functions taking
separate parameters.
Additionally, do not diminish light too early during spread.  This fixes the
output inconsistency between Map::updateLighting and Mapgen::calcLighting.
2015-01-04 02:42:31 -05:00
kwolekr
8d748e5bf5 Mapgen: Use getBlockSeed2() for blockseeds (much better uniformity) 2014-12-29 21:44:52 -05:00
kwolekr
2aa53ba603 Redefine NodeResolver interface and replace with callback mechanism 2014-12-27 02:12:21 -05:00
kwolekr
2906d0620b Add minetest.clear_registered_decorations() and clear_registered_ores() 2014-12-12 14:08:04 -05:00
kwolekr
1dc032e32c Add minetest.clear_registered_biomes() api 2014-12-06 18:08:23 -05:00
kwolekr
4f8d54e249 Rewrite generate notification mechanism
Add support for notify-on-decoration
Clean up mapgen constructors
Clean up mapgen.cpp code style somewhat
Remove trailing whitespace from some files
2014-12-06 13:53:35 -05:00
kwolekr
2d1dd941b7 Fix warnings and other misc. minor changes 2014-11-14 03:07:12 -05:00
kwolekr
bb5f0e46bd Add Generator Element Management framework
Add BiomeManager, OreManager, DecorationManager, and SchematicManager
2014-11-12 23:02:41 -05:00
kwolekr
08068ac0c6 Split up mapgen.cpp 2014-11-01 13:16:23 -04:00
kwolekr
24fd88a7aa Refactor decoration-related code
Split up ModApiMapgen::l_register_decoration()
Define and make use of CONTAINS() and ARRLEN() macros
2014-10-29 01:56:37 -04:00
kwolekr
4f31a0ef47 Add NodeResolver and clean up node name -> content ID resolution system 2014-10-26 23:55:45 -04:00
ShadowNinja
dbf9e444b1 Split settings into seperate source and header files
This also cleans up settings a bit
2014-09-21 14:39:35 -04:00
proller
3c54ac4a38 Fix warnings 2014-04-19 02:24:45 +04:00
proller
495ed5ec8b Remove liquid_finite and weather 2014-04-18 21:56:48 +04:00
kwolekr
8b7de5ea21 Schematic: Add force_placement parameter to minetest.place_structure API 2014-02-15 19:46:57 -05:00
kwolekr
2a896ffbf7 Make flag strings clear specified flag with 'no' prefix
Remove flagmask field from set_mapgen_params table
Add small bits of needed documentation
2014-02-08 17:50:59 -05:00
kwolekr
1c1155e0d5 Huge overhaul of the entire MapgenParams system
MapgenParams is no longer a polymorphic class, eliminating the need for messy and bug-prone reallocations.
Separation between the common and mapgen-specific parameters is now strongly defined.
Mapgen parameters objects are now properly encapsulated within the proper subsystems.
2014-02-03 22:50:14 -05:00
kwolekr
444e863ec9 Schematic: Read slice probability table from schematic descriptors 2014-01-19 02:44:45 -05:00
kwolekr
f513608efe Mapgen V6: Add flag to stop mud flow 2014-01-12 18:21:28 -05:00
kwolekr
85d7b64e2c Add map feature generation notify Lua API 2013-12-14 01:52:24 -05:00
kwolekr
de76e0253e EmergeManager: Fix Lua mapgen override param handling 2013-12-08 01:31:06 -05:00
kwolekr
017876a37c Decoration: Add schematic Y-slice probability support 2013-12-01 01:24:59 -05:00
kwolekr
9d7840d6c7 Decoration: Stop DecoSimple::resolveNodeNames from complaining about no node name if decolist is used
Fix warning message for spawnby nodes

Prevent type-punning warning caused by casting enum to int
2013-11-17 02:22:24 -05:00
Kahrl
ee90d438b8 Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
PilzAdam
282c40cdeb Dont write directly to files but rather write and copy a tmp file 2013-08-13 22:05:45 +02:00
Kahrl
a0b8a52048 Remove farmesh 2013-08-13 09:25:13 +02:00
kwolekr
6aa6aaf3f3 Decoration: Fix schematic probability mess with new MTS file version 2013-08-11 15:34:49 -04:00
PilzAdam
62dc2c0c8f Add replacements to schematics 2013-08-03 03:22:14 +02:00
PilzAdam
cfa86dbd0b Allow multiple 'wherein' nodes in oredef 2013-08-02 00:55:16 +02:00
proller
f821824943 Weather backward compatibility 2013-08-02 00:51:36 +04:00
kwolekr
9ea1c3b994 Decoration: Handle facedir and wallmounted param2types with schematic rotation 2013-07-08 15:19:48 -04:00
kwolekr
e4f236cb52 Decoration: Remove usage of multi-character constants 2013-07-06 15:03:54 -04:00
kwolekr
4b906fa7ef Mapgen V7: Huge rewrite, also tweaks to cavegen et al. 2013-07-06 02:21:54 -04:00
kwolekr
5fa252aa8b Decoration: Add schematic rotation support 2013-07-01 18:04:51 -04:00
proller
0c4c6b7e4d Optimize liquid queue on generate map for liquid_finite 2013-06-30 01:29:21 +04:00
kwolekr
311ca5ad54 Make generated water a shade darker to match up with older versions 2013-06-28 22:22:44 -04:00
kwolekr
5c8a16016c Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API 2013-06-27 22:35:35 -04:00
kwolekr
9f0d413e30 Decoration: Add support for zero probability, fix breakage from last commit 2013-06-22 20:49:01 -04:00
kwolekr
9dc177e181 A handful of minor fixes to various things 2013-06-22 17:27:48 -04:00
kwolekr
4e9b7ef618 Decoration: Add Schematic decoration type 2013-06-22 01:11:52 -04:00
kwolekr
f5388fd544 Decoration: Place decorations in mgv6, check if air or cignore before placement 2013-06-17 21:59:57 -04:00