64 Commits

Author SHA1 Message Date
kwolekr
097b9ead50 Schematics: Add indent-with-space option for schematic Lua table serialization 2015-05-07 02:54:35 -04:00
kwolekr
e8fb94705c NodeResolver: Remove NodeResolveMethod
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-05-07 02:36:01 -04:00
kwolekr
6495b9b57b Ore: Add biomes parameter 2015-04-20 20:25:33 -04:00
paramat
11013edeb8 Biome API: Add biome-specific river water 2015-04-19 06:09:57 +01:00
kwolekr
9c2f472c09 Schematics: Fix core.schematic_create() 2015-04-17 18:39:37 -04:00
kwolekr
04dcd9ff2b Switch to check_v3s16 in l_mapgen.cpp and l_vmanip.cpp for type safety 2015-04-17 01:03:13 -04:00
kwolekr
2522c53f17 Biomes: Remove referenced biomes from Decorations on clear 2015-04-16 23:38:05 -04:00
kwolekr
737d4078c9 Schematics: Refactor NodeResolver and add NodeResolveMethod
NodeResolver name lists now belong to the NodeResolver object instead of
the associated NodeDefManager.  In addition to minimizing unnecessary
abstraction and overhead, this move permits NodeResolvers to look up nodes
that they had previously set pending for resolution.  So far, this
functionality has been used in the case of schematics for
serialization/deserialization.
2015-04-16 16:27:05 -04:00
kwolekr
4c5f712673 Schematics: Reorganize (de)serialization and add Lua serialization API 2015-04-13 03:10:52 -04:00
kwolekr
55d3aa7960 Schematics: Prepend mod path to relative schematic filepaths 2015-04-08 00:28:56 -04:00
Craig Robbins
0731f9ed2a Move globals from main.cpp to more sane locations
Move debug streams to log.cpp|h

Move GUI-related globals to clientlauncher

Move g_settings and g_settings_path to settings.cpp|h

Move g_menuclouds to clouds.cpp|h

Move g_profiler to profiler.cpp|h
2015-04-01 23:04:25 +10:00
kwolekr
87ea5c96a6 ObjDefManager, Mapgen SAPI: Huge refactoring
- General code cleanup
 - Unified object creation and loading
 - Specifying objects in APIs is now orthogonal (i.e. anything can take an ID,
   name string, or the raw table definition (and automatically registers if present
2015-03-31 23:27:58 -04:00
kwolekr
ae55a60e16 GenElementManager: Pass opaque handles to Lua and rename to ObjDefManager
Add core.clear_registered_schematics() and refactor schematics somewhat
2015-03-31 01:11:51 -04:00
paramat
c4d375a253 lua_api/l_mapgen: generate_ores/decorations: make p1, p2 optional 2015-03-24 18:07:29 +00:00
kwolekr
4174dde376 Add core.register_schematic() and cache schematics on use 2015-03-23 22:23:38 -04:00
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
6817647244 lua_api/l_mapgen: Fix overlapping areas of minetest.generate_ores/decorations 2015-03-11 03:36:39 +00: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
paramat
a5bcca8305 Biome API: Re-calculate biome at every surface in a mapchunk column 2015-02-26 03:35:25 +00:00
kwolekr
02e06b423e Shorten ManualMapVoxelManipulator to MMVManip 2015-01-05 02:42:27 -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
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
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
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
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
2906d0620b Add minetest.clear_registered_decorations() and clear_registered_ores() 2014-12-12 14:08:04 -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
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
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
1593509710 Fix erroneous lua_pop parameter 2014-10-30 16:23:48 -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
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
0b45befa69 Simplify and optimize schematic replacements 2014-09-11 22:25:06 -04:00
ShadowNinja
9718e20bfa Use "core" namespace internally 2014-05-08 13:02:04 -04:00