Cook redcobble to desert stone, luxore in fissures, luxcrystals, lights, more ores
This commit is contained in:
parent
5341ddfcf9
commit
eaffef96a5
@ -209,36 +209,11 @@ function watershed_papyrus(x, y, z, area, data)
|
||||
end
|
||||
end
|
||||
|
||||
-- Register buckets, lava fuel
|
||||
|
||||
bucket.register_liquid(
|
||||
"watershed:freshwater",
|
||||
"watershed:freshwaterflow",
|
||||
"watershed:bucket_freshwater",
|
||||
"watershed_bucketfreshwater.png",
|
||||
"WS Fresh Water Bucket"
|
||||
)
|
||||
|
||||
bucket.register_liquid(
|
||||
"watershed:lava",
|
||||
"watershed:lavaflow",
|
||||
"watershed:bucket_lava",
|
||||
"bucket_lava.png",
|
||||
"WS Lava Bucket"
|
||||
)
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "watershed:bucket_lava",
|
||||
burntime = 60,
|
||||
replacements = {{"watershed:bucket_lava", "bucket:bucket_empty"}},
|
||||
})
|
||||
|
||||
-- Singlenode option
|
||||
|
||||
local SINODE = true
|
||||
local SINGLENODE = true
|
||||
|
||||
if SINODE then
|
||||
if SINGLENODE then
|
||||
-- Set mapgen parameters
|
||||
|
||||
minetest.register_on_mapgen_init(function(mgparams)
|
||||
@ -393,4 +368,16 @@ if SINODE then
|
||||
spawnplayer(player)
|
||||
return true
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
-- ABM
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"watershed:luxoreoff"},
|
||||
interval = 7,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_node(pos, {name="watershed:luxoreon"})
|
||||
end,
|
||||
})
|
34
init.lua
34
init.lua
@ -4,10 +4,12 @@
|
||||
-- License: code WTFPL, textures CC BY-SA
|
||||
-- Red cobble texture CC BY-SA by brunob.santos minetestbr.blogspot.com
|
||||
|
||||
-- added turquoise fresh ice node
|
||||
-- bugfix: stone drops default:cobble
|
||||
-- add red cobble, texture by brunob.santos
|
||||
-- redo clouds using fissure and humid noises, new texture
|
||||
-- smelt red cobble to default:desert_stone
|
||||
-- add luxore to fissures. luxcrystals craftable to lights
|
||||
-- redued strata vertical scale
|
||||
-- reduced seam horizontal scale
|
||||
-- thicker seams
|
||||
-- ores more common within seams
|
||||
|
||||
-- Parameters
|
||||
|
||||
@ -19,6 +21,7 @@ local YCLOMIN = 287 -- Minimum height of mod clouds
|
||||
local CLOUDS = true -- Mod clouds?
|
||||
|
||||
local TERSCA = 512 -- Vertical terrain scale
|
||||
local STRASCA = 256 -- Vertical strata scale
|
||||
local XLSAMP = 0.2 -- Extra large scale height variation amplitude
|
||||
local BASAMP = 0.4 -- Base terrain amplitude
|
||||
local CANAMP = 0.4 -- Canyon terrain amplitude
|
||||
@ -31,8 +34,8 @@ local TSAND = -0.025 -- Maximum densitybase threshold for river sand
|
||||
local TLAVA = 2.3 -- Maximum densitybase threshold for lava, small because grad is non-linear
|
||||
local FIST = 0 -- Fissure threshold at surface, controls size of fissure entrances at surface
|
||||
local FISEXP = 0.02 -- Fissure expansion rate under surface
|
||||
local ORETHI = 0.001 -- Ore seam thickness tuner
|
||||
local SEAMT = 0.02 -- Seam threshold
|
||||
local ORETHI = 0.005 -- Ore seam thickness tuner
|
||||
local SEAMT = 0.05 -- Seam threshold
|
||||
|
||||
local HITET = 0.35 -- High temperature threshold
|
||||
local LOTET = -0.35 -- Low ..
|
||||
@ -124,7 +127,7 @@ local np_humid = {
|
||||
local np_seam = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x=512, y=128, z=512},
|
||||
spread = {x=256, y=256, z=256},
|
||||
seed = -992221,
|
||||
octaves = 2,
|
||||
persist = 0.5
|
||||
@ -135,7 +138,7 @@ local np_seam = {
|
||||
local np_strata = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x=512, y=128, z=512},
|
||||
spread = {x=512, y=512, z=512},
|
||||
seed = 92219,
|
||||
octaves = 2,
|
||||
persist = 0.5
|
||||
@ -240,6 +243,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local c_wslava = minetest.get_content_id("watershed:lava")
|
||||
local c_wsfreshice = minetest.get_content_id("watershed:freshice")
|
||||
local c_wscloud = minetest.get_content_id("watershed:cloud")
|
||||
local c_wsluxoreoff = minetest.get_content_id("watershed:luxoreoff")
|
||||
-- perlinmap stuff
|
||||
local sidelen = x1 - x0 + 1
|
||||
local chulens = {x=sidelen, y=sidelen+2, z=sidelen}
|
||||
@ -365,7 +369,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
elseif density >= tstone and nofis -- stone cut by fissures
|
||||
or (density >= tstone and density < TSTONE * 3 and y <= YWAT) -- stone around water
|
||||
or (density >= tstone and density < TSTONE * 3 and densitybase >= triv ) then -- stone around river
|
||||
local densitystr = nvals_strata[nixyz] / 4 + (TERCEN - y) / TERSCA
|
||||
local densitystr = nvals_strata[nixyz] / 4 + (TERCEN - y) / STRASCA
|
||||
local densityper = densitystr - math.floor(densitystr) -- periodic strata 'density'
|
||||
if (densityper >= 0 and densityper <= 0.04) -- sandstone strata
|
||||
or (densityper >= 0.2 and densityper <= 0.23)
|
||||
@ -379,27 +383,29 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
data[vi] = c_wsredstone
|
||||
elseif math.abs(nvals_seam[nixyz]) < SEAMT then -- if seam
|
||||
if densityper >= 0.9 and densityper <= 0.9 + ORETHI
|
||||
and math.random(23) == 2 then
|
||||
and math.random(11) == 2 then
|
||||
data[vi] = c_stodiam
|
||||
elseif densityper >= 0.8 and densityper <= 0.8 + ORETHI
|
||||
and math.random(17) == 2 then
|
||||
and math.random(5) == 2 then
|
||||
data[vi] = c_stogold
|
||||
elseif densityper >= 0.6 and densityper <= 0.6 + ORETHI * 4 then
|
||||
data[vi] = c_stocoal
|
||||
elseif densityper >= 0.5 and densityper <= 0.5 + ORETHI * 4 then
|
||||
data[vi] = c_gravel
|
||||
elseif densityper >= 0.4 and densityper <= 0.4 + ORETHI * 2
|
||||
and math.random(3) == 2 then
|
||||
and math.random(2) == 2 then
|
||||
data[vi] = c_stoiron
|
||||
elseif densityper >= 0.3 and densityper <= 0.3 + ORETHI * 2
|
||||
and math.random(5) == 2 then
|
||||
and math.random(3) == 2 then
|
||||
data[vi] = c_stocopp
|
||||
elseif densityper >= 0.1 and densityper <= 0.1 + ORETHI
|
||||
and math.random(19) == 2 then
|
||||
and math.random(7) == 2 then
|
||||
data[vi] = c_mese
|
||||
else
|
||||
data[vi] = c_wsstone
|
||||
end
|
||||
elseif math.random(729) == 2 then
|
||||
data[vi] = c_wsluxoreoff
|
||||
else
|
||||
data[vi] = c_wsstone
|
||||
end
|
||||
|
76
nodes.lua
76
nodes.lua
@ -172,6 +172,32 @@ minetest.register_node("watershed:cloud", {
|
||||
post_effect_color = {a=23, r=241, g=248, b=255},
|
||||
})
|
||||
|
||||
minetest.register_node("watershed:luxoreoff", {
|
||||
description = "WS Lux Ore Off",
|
||||
tiles = {"watershed_luxore.png"},
|
||||
light_source = 14,
|
||||
groups = {cracky=3},
|
||||
drop = "watershed:luxcrystal 8",
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("watershed:luxoreon", {
|
||||
description = "WS Lux Ore On",
|
||||
tiles = {"watershed_luxore.png"},
|
||||
light_source = 14,
|
||||
groups = {cracky=3},
|
||||
drop = "watershed:luxcrystal 8",
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("watershed:light", {
|
||||
description = "WS Light",
|
||||
tiles = {"watershed_light.png"},
|
||||
light_source = 14,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("watershed:freshwater", {
|
||||
description = "WS Fresh Water Source",
|
||||
inventory_image = minetest.inventorycube("watershed_freshwater.png"),
|
||||
@ -320,4 +346,54 @@ minetest.register_node("watershed:lavaflow", {
|
||||
damage_per_second = 8,
|
||||
post_effect_color = {a=192, r=255, g=64, b=0},
|
||||
groups = {lava=3, liquid=2, hot=3, igniter=1, not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
-- Items
|
||||
|
||||
minetest.register_craftitem("watershed:luxcrystal", {
|
||||
description = "WS Lux Crystal",
|
||||
inventory_image = "watershed_luxcrystal.png",
|
||||
})
|
||||
|
||||
-- Crafting
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:desert_stone",
|
||||
recipe = "watershed:redcobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "watershed:light",
|
||||
recipe = {
|
||||
{"default:glass"},
|
||||
{"watershed:luxcrystal"},
|
||||
},
|
||||
})
|
||||
|
||||
-- Buckets
|
||||
|
||||
bucket.register_liquid(
|
||||
"watershed:freshwater",
|
||||
"watershed:freshwaterflow",
|
||||
"watershed:bucket_freshwater",
|
||||
"watershed_bucketfreshwater.png",
|
||||
"WS Fresh Water Bucket"
|
||||
)
|
||||
|
||||
bucket.register_liquid(
|
||||
"watershed:lava",
|
||||
"watershed:lavaflow",
|
||||
"watershed:bucket_lava",
|
||||
"bucket_lava.png",
|
||||
"WS Lava Bucket"
|
||||
)
|
||||
|
||||
-- Fuel
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "watershed:bucket_lava",
|
||||
burntime = 60,
|
||||
replacements = {{"watershed:bucket_lava", "bucket:bucket_empty"}},
|
||||
})
|
BIN
textures/watershed_light.png
Normal file
BIN
textures/watershed_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 155 B |
BIN
textures/watershed_luxcrystal.png
Normal file
BIN
textures/watershed_luxcrystal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 207 B |
BIN
textures/watershed_luxore.png
Normal file
BIN
textures/watershed_luxore.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 311 B |
Loading…
Reference in New Issue
Block a user