mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 11:53:46 +01:00
Make enderman grief less frequently, enable pseudobiome villages by default, and disable natural village generation in singlenode.
This commit is contained in:
parent
b5d92f3078
commit
e716ebd911
@ -43,10 +43,10 @@ end
|
||||
local pr = PseudoRandom(os.time()*(-334))
|
||||
|
||||
-- How freqeuntly to take and place blocks, in seconds
|
||||
local take_frequency_min = 25
|
||||
local take_frequency_max = 90
|
||||
local place_frequency_min = 10
|
||||
local place_frequency_max = 30
|
||||
local take_frequency_min = 235
|
||||
local take_frequency_max = 245
|
||||
local place_frequency_min = 235
|
||||
local place_frequency_max = 245
|
||||
|
||||
-- Create the textures table for the enderman, depending on which kind of block
|
||||
-- the enderman holds (if any).
|
||||
|
@ -49,7 +49,7 @@ schem_path = settlements.modpath.."/schematics/"
|
||||
--
|
||||
-- list of schematics
|
||||
--
|
||||
local basic_pseudobiome_villages = minetest.settings:get_bool("basic_pseudobiome_villages", false)
|
||||
local basic_pseudobiome_villages = minetest.settings:get_bool("basic_pseudobiome_villages", true)
|
||||
|
||||
settlements.schematic_table = {
|
||||
{name = "large_house", mts = schem_path.."large_house.mts", hwidth = 11, hdepth = 12, hheight = 9, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages },
|
||||
|
@ -1,29 +0,0 @@
|
||||
--
|
||||
function settlements.convert_mts_to_lua()
|
||||
local building = schem_path.."townhall.mts"
|
||||
local str = minetest.serialize_schematic(building, "lua", {lua_use_comments = true, lua_num_indent_spaces = 0}).." return(schematic)"
|
||||
local schematic = loadstring(str)()
|
||||
local file = io.open(schem_path.."church"..".lua", "w")
|
||||
file:write(dump(schematic))
|
||||
file:close()
|
||||
print(dump(schematic))
|
||||
end
|
||||
|
||||
|
||||
function settlements.mts_save()
|
||||
local f = assert(io.open(schem_path.."hut.lua", "r"))
|
||||
local content = f:read("*all").." return(schematic2)"
|
||||
f:close()
|
||||
|
||||
local schematic2 = loadstring("schematic2 = "..content)()
|
||||
local seb = minetest.serialize_schematic(schematic2, "mts", {})
|
||||
local filename = schem_path .. "hut2" .. ".mts"
|
||||
filename = filename:gsub("\"", "\\\""):gsub("\\", "\\\\")
|
||||
local file, err = io.open(filename, "wb")
|
||||
if err == nil and seb then
|
||||
file:write(seb)
|
||||
file:flush()
|
||||
file:close()
|
||||
end
|
||||
print("Wrote: " .. filename)
|
||||
end
|
@ -72,26 +72,29 @@ local function ecb_build_a_settlement(blockpos, action, calls_remaining, param)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
-- needed for manual and automated settlement building
|
||||
local heightmap = minetest.get_mapgen_object("heightmap")
|
||||
-- Disable natural generation in singlenode.
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
if mg_name ~= "singlenode" then
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
-- needed for manual and automated settlement building
|
||||
local heightmap = minetest.get_mapgen_object("heightmap")
|
||||
|
||||
-- randomly try to build settlements
|
||||
if blockseed % 77 ~= 17 then return end
|
||||
-- randomly try to build settlements
|
||||
if blockseed % 77 ~= 17 then return end
|
||||
|
||||
-- don't build settlement underground
|
||||
if maxp.y < 0 then return end
|
||||
-- don't build settlement underground
|
||||
if maxp.y < 0 then return end
|
||||
|
||||
-- don't build settlements on (too) uneven terrain
|
||||
local height_difference = settlements.evaluate_heightmap(minp, maxp)
|
||||
if height_difference > max_height_difference then return end
|
||||
|
||||
-- new way - slow :(((((
|
||||
minetest.emerge_area(vector.subtract(minp,24), vector.add(maxp,24), ecb_build_a_settlement, {minp = vector.new(minp), maxp=vector.new(maxp), blockseed=blockseed})
|
||||
-- old way - wait 3 seconds:
|
||||
-- minetest.after(3, ecb_build_a_settlement, nil, 1, 0, {minp = vector.new(minp), maxp=vector.new(maxp), blockseed=blockseed})
|
||||
end)
|
||||
-- don't build settlements on (too) uneven terrain
|
||||
local height_difference = settlements.evaluate_heightmap(minp, maxp)
|
||||
if height_difference > max_height_difference then return end
|
||||
|
||||
-- new way - slow :(((((
|
||||
minetest.emerge_area(vector.subtract(minp,24), vector.add(maxp,24), ecb_build_a_settlement, {minp = vector.new(minp), maxp=vector.new(maxp), blockseed=blockseed})
|
||||
-- old way - wait 3 seconds:
|
||||
-- minetest.after(3, ecb_build_a_settlement, nil, 1, 0, {minp = vector.new(minp), maxp=vector.new(maxp), blockseed=blockseed})
|
||||
end)
|
||||
end
|
||||
-- manually place villages
|
||||
if minetest.is_creative_enabled("") then
|
||||
minetest.register_craftitem("mcl_villages:tool", {
|
||||
|
@ -130,8 +130,8 @@ mcl_superflat_classic (Classic superflat map generation) bool false
|
||||
# game by a lot.
|
||||
mcl_node_particles (Block particles detail level) enum none high,medium,low,none
|
||||
|
||||
# If enabled, this will substitute a few blocks in village schematics so they blend into normal, snowy, and sandy areas. Defaults to false.
|
||||
basic_pseudobiome_villages (Enables very basic, and experimental "pseudobiome-based" villages) bool false
|
||||
# If enabled, this will substitute a few blocks in village schematics so they blend into normal, snowy, and sandy areas. Defaults to true.
|
||||
basic_pseudobiome_villages (Enables very basic, and experimental "pseudobiome-based" villages) bool true
|
||||
|
||||
# If enabled, will run an LBM to fix the top 1/2 of double plants in mcimported worlds; defaults to true.
|
||||
fix_doubleplants (Mcimport double plant fixes) bool true
|
||||
|
Loading…
Reference in New Issue
Block a user