parent
e90ce3c6f3
commit
fdce2eb2a8
Binary file not shown.
After Width: | Height: | Size: 1.3 MiB |
|
@ -0,0 +1 @@
|
|||
Subproject commit 78e4ba828ebe19dc80977ce53ce301d63230b8b8
|
|
@ -8,7 +8,7 @@ end
|
|||
|
||||
local bedrock = {}
|
||||
|
||||
bedrock.layer = -64 -- determined as appropriate by experiment
|
||||
bedrock.layer = -1000 -- determined as appropriate by experiment
|
||||
bedrock.node = {name = "default_override:bedrock"}
|
||||
|
||||
local depth = tonumber(minetest.setting_get("bedrock2_y"))
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# Sets the height (Y) at which the bedrock layer will be created.
|
||||
bedrock2_y (Bedrock height) int -64
|
||||
bedrock2_y (Bedrock height) int -1000
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- mods/default/crafting.lua
|
||||
-- mods/default_override/crafting.lua
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 4',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- mods/default/craftitems.lua
|
||||
-- mods/default_override/craftitems.lua
|
||||
|
||||
--
|
||||
-- Crafting items
|
||||
|
|
|
@ -1,72 +1,17 @@
|
|||
--
|
||||
-- Papyrus and cactus growing
|
||||
--
|
||||
-- mods/default_override/functions.lua
|
||||
|
||||
-- Functions
|
||||
--[[default_override.grow_cactus = function(pos, node)
|
||||
pos.y = pos.y-1
|
||||
local name = minetest.env:get_node(pos).name
|
||||
if minetest.get_item_group(name, "sand") ~= 0 then
|
||||
pos.y = pos.y+1
|
||||
local height = 0
|
||||
while minetest.env:get_node(pos).name == "default:cactus" and height < 4 do
|
||||
height = height+1
|
||||
pos.y = pos.y+1
|
||||
end
|
||||
if height < 4 then
|
||||
if minetest.env:get_node(pos).name == "air" then
|
||||
minetest.env:set_node(pos, {name="default:cactus"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end]]--
|
||||
|
||||
default_override.grow_reeds = function(pos, node)
|
||||
pos.y = pos.y-1
|
||||
local name = minetest.env:get_node(pos).name
|
||||
if name == "default:dirt" or name == "default:dirt_with_grass" then
|
||||
if minetest.env:find_node_near(pos, 3, {"group:water"}) == nil then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y+1
|
||||
local height = 0
|
||||
while minetest.env:get_node(pos).name == "default:papyrus" and height < 4 do
|
||||
height = height+1
|
||||
pos.y = pos.y+1
|
||||
end
|
||||
if height < 4 then
|
||||
if minetest.env:get_node(pos).name == "air" then
|
||||
minetest.env:set_node(pos, {name="default:papyrus"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- ABMs
|
||||
minetest.register_abm({
|
||||
label = "Grow cactus",
|
||||
nodenames = {"default:cactus"},
|
||||
neighbors = {"group:sand"},
|
||||
interval = 50,
|
||||
chance = 20,
|
||||
action = function(pos)
|
||||
grow_cactus(pos)
|
||||
end,
|
||||
interval = 5,
|
||||
chance = 83,
|
||||
action = function(...)
|
||||
default.grow_cactus(...)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:papyrus"},
|
||||
neighbors = {"default:dirt", "default:dirt_with_grass"},
|
||||
interval = 50,
|
||||
chance = 20,
|
||||
action = function(pos)
|
||||
grow_reeds(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
--
|
||||
-- Papyrus and cactus drop
|
||||
--
|
||||
|
||||
local timber_nodenames={"default:papyrus", "default:cactus"}
|
||||
|
||||
minetest.register_on_dignode(function(pos, node)
|
||||
|
@ -84,10 +29,6 @@ minetest.register_on_dignode(function(pos, node)
|
|||
end
|
||||
end)
|
||||
|
||||
--
|
||||
-- Flint and Steel
|
||||
--
|
||||
|
||||
function get_nodedef_field(nodename, fieldname)
|
||||
if not minetest.registered_nodes[nodename] then
|
||||
return nil
|
||||
|
|
|
@ -16,3 +16,4 @@ dofile(path.."/nodes.lua")
|
|||
dofile(path.."/tools.lua")
|
||||
dofile(path.."/craftitems.lua")
|
||||
dofile(path.."/crafting.lua")
|
||||
dofile(path.."/mapgen.lua")
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
-- mods/default_override/mapgen.lua
|
||||
|
||||
-- Ores
|
||||
function default_override.register_ores()
|
||||
-- Blob ores
|
||||
-- These first to avoid other ores in blobs
|
||||
|
||||
-- Clay
|
||||
-- This first to avoid clay in sand blobs
|
||||
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_diamond",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 17 * 17 * 17,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
y_min = -1000,
|
||||
y_max = -15,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_gold",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 15 * 15 * 15,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
y_min = -1000,
|
||||
y_max = -15,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default_override:stone_with_redstone",
|
||||
wherein = {"default:stone"},
|
||||
clust_scarcity = 8 * 8 * 8,
|
||||
clust_size = 5,
|
||||
y_min = -1000,
|
||||
y_max = -15,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = -316,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default_override:stone_with_lapis",
|
||||
wherein = {"default:stone"},
|
||||
clust_scarcity = 8 * 8 * 8,
|
||||
clust_size = 5,
|
||||
y_min = -1000,
|
||||
y_max = -15,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = -316,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default_override:stone_with_emerald",
|
||||
wherein = {"default:stone"},
|
||||
clust_scarcity = 3 * 3 * 3,
|
||||
clust_size = 2,
|
||||
y_min = -1000,
|
||||
y_max = -13,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = -316,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
default_override.register_ores()
|
||||
minetest.clear_registered_biomes()
|
||||
|
||||
minetest.register_biome({
|
||||
name = "underground",
|
||||
--node_dust = "",
|
||||
--node_top = "",
|
||||
--depth_top = ,
|
||||
--node_filler = "",
|
||||
--depth_filler = ,
|
||||
--node_stone = "",
|
||||
--node_water_top = "",
|
||||
--depth_water_top = ,
|
||||
--node_water = "",
|
||||
--node_river_water = "",
|
||||
y_min = -31000,
|
||||
y_max = -13,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "over_grassland",
|
||||
--node_dust = "",
|
||||
node_top = "default:dirt_with_grass",
|
||||
node_filler = "default:dirt",
|
||||
depth_top = 1,
|
||||
depth_filler = 1,
|
||||
|
||||
--node_stone = "",
|
||||
--node_water_top = "",
|
||||
--depth_water_top = ,
|
||||
--node_water = "",
|
||||
--node_river_water = "",
|
||||
|
||||
node_riverbed = "default:sand",
|
||||
depth_riverbed = 2,
|
||||
y_min = 10000,
|
||||
y_max = 31000,
|
||||
heat_point = 50,
|
||||
humidity_point = 35,
|
||||
})
|
|
@ -3,7 +3,7 @@
|
|||
minetest.register_node("default_override:stone_with_redstone", {
|
||||
description = "Redstone Ore",
|
||||
tiles = {"default_stone.png^default_mineral_redstone.png"},
|
||||
is_ground_content = true,
|
||||
is_ground_content = false,
|
||||
stack_max = 64,
|
||||
groups = {cracky=2},
|
||||
drop = "default_override:redstone_dust 5",
|
||||
|
@ -13,7 +13,7 @@ minetest.register_node("default_override:stone_with_redstone", {
|
|||
minetest.register_node("default_override:stone_with_lapis", {
|
||||
description = "Lapis Lazuli Ore",
|
||||
tiles = {"default_stone.png^default_mineral_lapis.png"},
|
||||
is_ground_content = true,
|
||||
is_ground_content = false,
|
||||
stack_max = 64,
|
||||
groups = {cracky=2},
|
||||
drop = {
|
||||
|
@ -32,7 +32,7 @@ minetest.register_node("default_override:stone_with_lapis", {
|
|||
minetest.register_node("default_override:stone_with_emerald", {
|
||||
description = "Emerald Ore",
|
||||
tiles = {"default_stone.png^default_mineral_emerald.png"},
|
||||
is_ground_content = true,
|
||||
is_ground_content = false,
|
||||
stack_max = 64,
|
||||
groups = {cracky=2},
|
||||
drop = {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
-- mods/default_override/nodes_override.lua
|
||||
|
||||
minetest.override_item("default:stone", {
|
||||
is_ground_content = true,
|
||||
stack_max = 64,
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue