176 Commits

Author SHA1 Message Date
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
ShadowNinja
0b45befa69 Simplify and optimize schematic replacements 2014-09-11 22:25:06 -04:00
kwolekr
ee1fee1578 Add LuaVoxelManip methods: get_node_at() and set_node_at() 2014-09-01 17:33:21 -04:00
kwolekr
9adbca89cd Update Mapgen VoxelManipulator on buffer invalidation 2014-09-01 15:12:22 -04:00
sapier
611504b2aa Add lua exception handling test code
Catch some error situations when mod used without thinking about it
2014-08-23 20:53:34 +02:00
Craig Robbins
8152f54ac6 Fix seg fault if popping from empty stack (L-system trees)
See: https://github.com/minetest/minetest/issues/1525

Background
Wuzzy2: If you attempt to spawn a L-system tree with minetest.spawn_tree, you can make Minetest crash if it is attempted to pop an empty stack.

ShadowNinja: This shouldn't cause a segmentation fault, but it should throw a Lua error

Commit Description
This commit throws a Lua error instead of causing a segmentation fault. The server will still "crash" but will include a Lua backtrace.

L-Systems fix randomness
Unless a random seed is provided (via Lua treedef) seed the PRNG with a different seed for each tree
Resolves: https://github.com/minetest/minetest/issues/1469

Fix l-system crash when treedef random_level not set by Lua
2014-08-23 06:40:27 +02:00
sapier
e6e2f1de60 Add video driver selection to settings menu (based uppon idea from webdesigner97) 2014-08-23 01:55:54 +02:00
sapier
4b2e3ceaad Mod profiling support
Config settings:
profiling = true/false (gather statistics)
detailed_profiling = true/false (break mod times to callbacks)

Chat commands:
save_mod_profile saves current statistics in debug.txt and shows on console (on default loglevel)
2014-08-19 22:22:57 +02:00
SmallJoker
f9ef79e40e Fix the *CDP display 2014-08-15 21:46:04 +02:00
Craig Robbins
d14ee29e47 Fix issue 1527
https://github.com/minetest/minetest/issues/1527
2014-07-29 22:39:39 -04:00