285 Commits

Author SHA1 Message Date
kwolekr
97c7e9a5f6 Optionally specify propagateSunlight area in calcLighting
This fixes the Mapgen V5 calcLighting segfault
2015-01-05 01:20:36 -05:00
kwolekr
c659967d1c Exclude vertical mapblock borders when setting light 2015-01-04 23:14:16 -05:00
kwolekr
5370bf9a50 Add minetest.generate_ores() and minetest.generate_decorations() 2015-01-04 22:38:48 -05:00
kwolekr
1c2805b733 Add warning about using deprecated fields in Mapgen API and update docs 2015-01-04 03:24:40 -05:00
kwolekr
8d594e6799 LuaVoxelManip: Error when given out-of-bounds area 2015-01-04 03:07:28 -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
d49f1250f5 Replace instances of height_min/height_max with y_min/y_max to remove ambiguity 2014-12-30 01:48:20 -05:00
kwolekr
7866b3811f Decoration: Fix default parameter values 2014-12-30 00:52:40 -05:00
kwolekr
6a136cf876 Add core.get_mapgen_names() to Main Menu API (and use it)
Also rewrite mapgen registration for static initialization
2014-12-29 21:23:51 -05:00
kwolekr
eb208e6b75 Expose mapgen parameters on scripting init
Add minetest.get_mapgen_params()
Deprecate minetest.register_on_mapgen_init()
2014-12-29 12:59:59 -05:00
kwolekr
2e5d9bb332 LuaVoxelManip: Remove blank allocator 2014-12-29 01:31:37 -05:00
kwolekr
3814cafc24 LuaItemStack: Fix and document behavior of set_name, set_count, set_wear, set_metadata 2014-12-28 23:59:24 -05:00
kwolekr
4437065263 Decoration: Add height_min and height_max parameters
Also set default height_min/height_max to -31000 and 31000,
respectively, for ore and biomes
2014-12-28 22:37:27 -05:00
paramat
3cb4ccc0f4 Biome API: Add shore top and shore filler nodes, underwater node, water top node. Add water top depth and shore height parameters. Remove water dust node 2014-12-28 21:37:43 -05:00
kwolekr
c4a39d536f Ore: Add Vein ore type 2014-12-28 21:17:12 -05:00
kwolekr
c176763482 Ore: Add Blob ore type 2014-12-28 03:11:00 -05:00
kwolekr
20b9e50aa9 LuaVoxelManip: Add option to allocate blank data 2014-12-27 23:09:36 -05:00
kwolekr
b68dcb323d Set fallback content if resolving content vector requires everything 2014-12-27 22:20:04 -05:00
kwolekr
2aa53ba603 Redefine NodeResolver interface and replace with callback mechanism 2014-12-27 02:12:21 -05:00
kwolekr
b9b9df261b LuaPerlinNoiseMap: Fix 3d noise safety check 2014-12-12 22:58:44 -05:00
kwolekr
2906d0620b Add minetest.clear_registered_decorations() and clear_registered_ores() 2014-12-12 14:08:04 -05:00
kwolekr
d8ab7d2124 LuaPerlinNoiseMap: Prevent invalid memory access when attempting to generate 3d noise with a buffer created for 2d 2014-12-12 02:46:52 -05:00
kwolekr
a3e54044a9 Add support for NoiseParams in minetest.get_perlin() and add docs on NoiseParams to lua_api.txt 2014-12-12 02:02:44 -05:00
kwolekr
4433cb3626 Settings: Fail on invalid sequence and throw exception for LuaSettings 2014-12-12 00:44:17 -05:00
kwolekr
6f398af64f Noise: Automatically transform noise maps if needed 2014-12-10 23:35:37 -05:00
kwolekr
d27d023219 Move get_schematic and read_schematic to l_mapgen.cpp 2014-12-10 01:49:57 -05:00
kwolekr
0f4d8ddf95 Remove get_noiseparams function. read_noiseparams should be used from now on 2014-12-10 00:56:44 -05:00
kwolekr
180c455ab1 Noise: Create a deep copy of NoiseParams 2014-12-10 00:37:09 -05:00
kwolekr
4119cf9f6d Settings: Sanitize setting name everywhere, not just LuaSettings 2014-12-09 23:52:13 -05:00
kwolekr
fefcad5137 Rename and repurpose minetest.set_noiseparam_defaults to set_noiseparams 2014-12-09 23:44:04 -05:00
kwolekr
22b22968a1 Add flags and lacunarity as new noise parameters
Add 'absolute value' option to noise map functions
Extend persistence modulation to 3D noise
Extend 'eased' option to noise2d_perlin* functions
Some noise.cpp formatting fixups
2014-12-07 21:59:32 -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
paramat
896f946cec Add definable node_stone to biome API, mgv5, mgv7. Reduce and correct depth of mgv7 biomes. l_mapgen.cpp: add '#include mapgen_v5.h' because '#include mapgen_v7' is there. Improve underwater grass hack 2014-12-03 19:45:29 -05:00
kwolekr
0132801247 LuaSettings: Sanitize setting name strings 2014-11-30 19:01:54 -05:00
kwolekr
019cb29665 noise: Throw exception on noise allocation failure 2014-11-29 16:52:45 -05:00
ShadowNinja
416c5c8339 Clean up rollback 2014-11-19 16:21:59 -05:00
kwolekr
2d1dd941b7 Fix warnings and other misc. minor changes 2014-11-14 03:07:12 -05:00
Craig Robbins
aacc3cba46 Remove most exceptions from getNode() (and variants) 2014-11-14 18:05:34 +10:00
SmallJoker
d3141906d2 Add option 'eased' to NoiseParams
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-13 23:06:38 +10: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
1593509710 Fix erroneous lua_pop parameter 2014-10-30 16:23:48 -04:00
kwolekr
c7589703e5 Check minetest.hud_change() parameters on conversion (Fix #1714) 2014-10-30 00:12:12 -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
5a0a90dfec Prevent invalid memory access under failure conditions 2014-10-28 00:18:53 -04:00
kwolekr
4f31a0ef47 Add NodeResolver and clean up node name -> content ID resolution system 2014-10-26 23:55:45 -04:00
ShadowNinja
531d960b6a Fix object reference pushing functions when called from coroutines 2014-10-07 16:37: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
ShadowNinja
33f6656d33 Add compression API 2014-09-20 14:02:54 -04:00