Commit Graph

92 Commits (master)

Author SHA1 Message Date
Maksim Gamarnik 4cd987b653 Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
paramat 210a339dce Mapgen files: Update and correct copyright credits 2017-05-26 20:46:03 +01:00
paramat fd32005b0f Caverns: Remove unnecessary liquid excavation
Also disable CavesRandomWalk at a safer distance from caverns.

Excavating liquids in cavern code is unnecessary as in practice we are already
successfully disabling the generation of liquid caves that could intersect
with caverns and cause excessive amounts of spreading liquids in caverns.

However to be safer this commit now disables liquid caves at a larger distance
from caverns, to compensate for liquid caves being able to generate up to a
mapblock beyond a mapchunk border.

Not excavating liquids in cavern code also allows a feature i am working on in
experimental new core mapgens, but also allows for more flexibility in future.
2017-05-16 21:56:51 +01:00
paramat 1eca9ecf7d Mapgen: Remove '#include treegen.h' from non-mgv6 mapgens
Only mgv6 uses the tree functions from treegen.cpp.
2017-04-05 07:30:00 +01:00
paramat 859141a0ce Cavegen/Mgv5/Mgv7: Add optional giant caverns
Add to MapgenBasic for use by multiple mapgens.
Add to mgv5 and mgv7, enabled by default.

Similar to mgvalleys caverns but half the scale.
Parameters for upper y limit, distance caverns taper to full size, and
noise threshold (full cavern size).
As with mgvalleys caverns are generated first and classic caves are
disabled in any mapchunk containing a cavern, to avoid excessive
spreading volumes of liquids.
This also avoids floating blobs of liquid where a large classic cave
has overgenerated out into a neighbouring previously-generated mapchunk.
2017-04-03 04:49:32 +01:00
Maksim Gamarnik 8cc092b177 Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02:00
kwolekr 3c63c3044d Add MapSettingsManager and new mapgen setting script API functions
This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
  instead of the EmergeManager.
- New Script API functions added:
    core.get_mapgen_setting
    core.get_mapgen_setting_noiseparams,
    core.set_mapgen_setting, and
    core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
  rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.
2016-07-03 15:38:36 -04:00
kwolekr d4457ef420 Mapgen: Optimize biomemap creation by combining with generateBiomes 2016-06-05 13:30:02 -04:00
kwolekr fd0efb21c3 Mapgen: Combine dungeon generation code 2016-05-27 23:23:58 -04:00
kwolekr 0810901766 Mapgen: Deduplicate common constructor code 2016-05-27 23:23:58 -04:00
kwolekr 0df5c01a8c Mapgen: Remove calculateNoise from most mapgens
This commit moves noise calculation to the functions where the noise is
actually required, increasing the separation of concerns and level of
interdependency for each mapgen method.  Valleys Mapgen is left unmodified.
2016-05-27 23:23:58 -04:00
kwolekr 548d99bb45 Cavegen: Move V5-style caves to CavesNoiseIntersection 2016-05-27 23:23:58 -04:00
kwolekr 9b5c492be5 Fix MgStoneType and BiomeType enum names 2016-05-27 23:23:58 -04:00
kwolekr 87bc39dca7 Mapgen: Combine generateBiomes, dustTopNodes, and generateCaves
This commit condenses the above methods into a single implementation used by
V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.
2016-05-27 23:23:58 -04:00
kwolekr 76f4856479 Move biome calculation to BiomeGen
BiomeGen defines an interface that, given a set of BiomeParams, computes biomes
for a given area using the algorithm implemented by that specific BiomeGen.
This abstracts away the old system where each mapgen supplied the noises
required for biome generation.
2016-05-27 23:23:58 -04:00
Maksim Gamarnik 51cb15bc45 Merge minetest commits / WIP!
Java part WIP, pls, use prev commits!
2016-04-29 10:11:25 +03:00
paramat 8b1f8e99cf Mapgen: Make 3D noise tunnels' width settable
Correct parameter names mg_valleys to mgvalleys
Remove biome NoiseParams from MapgenValleysParams
Improve format of parameter code
2016-04-28 23:36:19 -04:00
Maksim Gamarnik 7f630419c1 Merge 2016-04-12 21:28:50 +03:00
paramat e661d8b32c Mgv5: Optimise tunnels, add biome material in entrances
Place biome top node on tunnel entrance floor
Instead of doing nothing at node_max.Y + 1 use 1-down
overgeneration for tunnel generation and noisemaps
2016-04-12 04:16:15 +01:00
Maksim Gamarnik 363afe5a55 Merge branch 'upstream/master' 2016-03-14 11:44:17 +02:00
paramat bb2ee54d3b Mapgen: Fix light in tunnels at mapchunk borders
Don't excavate the overgenerated stone at node_max.Y + 1,
this creates a 'roof' over the tunnel, preventing light in
tunnels at mapchunk borders when generating mapchunks upwards.
2016-03-14 08:45:01 +00:00
Maksim Gamarnik ae66c6a782 Merge Minetest commits 2016-02-11 22:35:23 +02:00
paramat 4adbd69a37 FindSpawnPos: Let mapgens decide what spawn altitude is suitable
To avoid spawn search failing in new specialised mapgens
Increase spawn search range to 4000 nodes
Add getSpawnLevelAtPoint() functions to EmergeManager, class Mapgen
and all mapgens
Remove getGroundLevelAtPoint() functions from all mapgens except mgv6
(possibly to be re-added later in the correct form to return actual
ground level)
Make mgvalleys flag names consistent with other mapgens
Remove now unused 'vertical spawn range' setting
2016-02-09 07:14:45 +00:00
Maksim Gamarnik 4b7bbaa296 Merge remote-tracking branch 'upstream/master' 2016-02-07 04:07:20 +02:00
paramat 0a8af88147 Mgv5/v7/flat/fractal: Move tunnel noise calculation into generateCaves
Tunnel 3D noises are only calculated when solid terrain is present
in mapchunk, avoiding large amounts of unnecessary calculations
Change 'int' to 's16' in calculateNoise
Change 'i' to 'vi' for voxelmanip indexes for consistency
Keep 'u32 index3d' local to a smaller part of tunnel code
Mgv7: Don't call CaveV7 if no solid terrain in mapchunk
Give 'open' bool a more descriptive name
2016-02-02 06:37:01 +00:00
Maksim Gamarnik 18c6b747b6 Merge branch 'master' of https://github.com/minetest/minetest 2016-01-31 20:57:03 +02:00
paramat 8fc8cb819b Mapgen: Various fixes and improvements
Lua_api.txt: Document 'minetest.registered_biomes'
Minimal: Remove 'mapgen_air' alias
Cavegen: Add fallback node for 'mapgen_ice'
Dungeongen: Add fallback node for 'mapgen_river_water_source'
Mgv5: Remove unnecessary '#include util/directiontables.h'
Add missing 'this->'s in makeChunk()
Mgv6: Edit empty line formatting
Remove leading spaces in makeChunk()
Add missing spaces after 'for' and 'if'
Mgv7: Edit empty line formatting
2016-01-11 01:32:20 +00:00
Maksim Gamarnik 332cb0313c Merge 2015-12-06 15:00:12 +02:00
paramat e51ea66bd0 Mgv5/v7/flat/fractal: More large pseudorandom caves
Mgv7/flat/fractal: Reduce tunnel noise spreads to 96
2015-12-02 02:19:52 +00:00
Maksim Gamarnik e150219b9d Merge last minetest commits 2015-11-27 12:57:52 +02:00
paramat d7bbe81726 Mapgen: Add global 'decorations' flag
Flag is set by default in MapgenParams
The global 'trees' flag remains but is now
undocumented and unset by default in MapgenParams
Add mgv6_spflag 'trees' set by default in
defaultsettings.cpp to affect new worlds only
This is automatically backwards
compatible for existing worlds
2015-11-21 00:10:08 +00:00
Maksim Gamarnik bef9573aeb Merge last Minetest commits 2015-11-10 20:29:00 +02:00
Maksim Gamarnik 9012ac8f22 Update
Sync all Minetest commits
2015-11-10 13:49:24 +02:00
paramat 7504cdcfbf Mapgen: Use mapgen-specific names for constants in headers
Update copyright years in all mapgens
Add myself to copyright notices in mgv5 and mgv7
2015-10-09 05:51:47 +01:00
paramat ce1a70c703 Mgv5: getGroundLevelAtPoint searches a larger range 2015-10-05 02:03:50 +01:00
kwolekr f0cd5da687 Define and use limit constants for Irrlicht fixed-width types 2015-10-04 04:00:16 -04:00
paramat fe994946b7 Mgv5/6/7: Re-add #include profiler.h as commented-out option 2015-09-19 02:27:21 +01:00
Maksim Gamarnik d77ea9be46 LGPL 2.1 to 3.0 on all files 2015-08-14 01:26:28 +03:00
rubenwardy ec796b8e81 Add map limit config option 2015-08-02 14:27:04 +02:00
Loic Blot fa7fe510d9 Remove profiler.h include where it's not needed. Remove some unreachable and very old code 2015-07-21 08:10:43 +02:00
paramat 36163d9653 Mgv5/mgv7 caves: Remove sand found in underground tunnels
Add missing check for max_stone_y to mgv5 cavegen
Tunnels now carve through sand below water_level
2015-06-27 03:36:40 +01:00
paramat 70da8a940b Mapgen objects: Enable heatmap and humidmap for all biome api mapgens 2015-06-20 04:16:17 +01:00
paramat e45ecad3ab Biome API: Add noise defined biome blend 2015-06-18 07:05:22 +01:00
paramat 38482d2656 Biome API: Enable biome generation to lower world limit
Decorations: Remove lower limit of water level for placement
2015-06-15 02:07:38 +01:00
paramat 74d8b341bc Mgv5/mgv7: Trigger biome recalculation at underwater surfaces 2015-06-03 06:37:10 +01:00
paramat 4c7d2b62cf Mgv5/v7: Fix generateBiomes biome recalculation logic Biomegen down to y = -192 for mgv5 deep oceans. Improve code 2015-05-31 23:21:30 +10:00
paramat a4a5d42d49 Mapgen v5/v7: Detect sandstone, enable sandstone brick dungeons 2015-05-31 23:20:47 +10:00
paramat 4bc9ee34b4 Mapgen v5/6/7: Cleanup node resolver and aliases 2015-05-31 23:14:08 +10:00
paramat 3dba6d1f90 Mgv5/v7: Fix generateBiomes biome recalculation logic Biomegen down to y = -192 for mgv5 deep oceans. Improve code 2015-05-23 02:18:30 +01:00
paramat c0edb8e313 Mapgen v5/v7: Detect sandstone, enable sandstone brick dungeons 2015-05-17 06:07:39 +01:00