Add files via upload

-texture file no longer needed.
-no longer adds new nodes.
-volcanoes are slightly smaller and perform much better. slight lag spike after first generation, then it's peachy.
-no longer changes pumwater behavior.
master
wintersknight94 2021-03-07 12:41:53 -06:00 committed by GitHub
parent 3c103d1b7d
commit 8a2e51a787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 179 deletions

View File

@ -8,7 +8,8 @@ local water_level = tonumber(minetest.get_mapgen_setting("water_level"))
local c_air = minetest.get_content_id("air")
local c_lava = minetest.get_content_id("nc_terrain:lava_source")
local c_volcanic = minetest.get_content_id(modname ..":tuff_hot")
local c_volcanic = minetest.get_content_id("nc_terrain:hard_stone_4")
local c_igneous = minetest.get_content_id("nc_igneous:pumice")
----- -----
local c_stone = minetest.get_content_id("nc_terrain:stone")
@ -42,12 +43,12 @@ minetest.register_ore({
},
column_height_min = 2,
column_height_max = 6,
y_min = -31000,
y_min = -720,
y_max = -80,
noise_threshold = 0.9,
noise_params = {
offset = 0,
scale = 3,
scale = 2,
spread = {x = 400, y = 800, z = 400},
seed = 25391,
octaves = 4,
@ -76,7 +77,7 @@ remove_unsupported_lava = function(area, data, vi, x, y, z)
end
end
-- Placing Hot Volcanic Tuff around Magma Conduits upon Worldgen, hopefully will reduce abm bogging.
-- Placing Basalt around Magma Conduits upon Worldgen, hopefully will reduce abm bogging.
local vulcanize = function(area, data, vi, x, y, z, minp, maxp)
if data[vi] == c_lava then
for pi in area:iter(math.max(x-1, minp.x), math.max(y-1, minp.y), math.max(z-1, minp.z),

View File

@ -1,4 +1,4 @@
depends = nc_api_all, nc_items, nc_terrain, nc_concrete, nc_fire
depends = nc_api_all, nc_items, nc_terrain, nc_lode, nc_concrete, nc_fire, nc_igneous
author = WintersKnight94
description = Reworks Magma Generation in NodeCore. Not a port, but heavily based on code from Magma Conduits
name = nc_vulcan

View File

@ -12,19 +12,19 @@ local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(minetest.get_current_modname())
--dofile(modpath .. "/volcano_lava.lua") -- https://github.com/minetest/minetest/issues/7864, https://github.com/minetest/minetest/issues/7878
local depth_root = -3000
local depth_base = -50 -- point where the mountain root starts expanding
local depth_maxwidth = -30 -- point of maximum width
local depth_root = -720
local depth_base = -50 -- point where the mountain root starts expanding
local depth_maxwidth = -30 -- point of maximum width
local radius_vent = 3 -- approximate minimum radius of vent - noise adds a lot to this
local radius_lining = 5 -- the difference between this and the vent radius is about how thick the layer of lining nodes is, though noise will affect it
local caldera_min = 5 -- minimum radius of caldera
local caldera_max = 20 -- maximum radius of caldera
local radius_vent = 1 -- approximate minimum radius of vent - noise adds a lot to this
local radius_lining = 1 -- the difference between this and the vent radius is about how thick the layer of lining nodes is, though noise will affect it
local caldera_min = 2 -- minimum radius of caldera
local caldera_max = 20 -- maximum radius of caldera
local carbon_line = 120 -- above this elevation carbon is added to the stone
local carbon_border = 15 -- transitional zone where there's scorched soil
local carbon_line = 60 -- above this elevation carbon is added to the stone
local carbon_border = 20 -- transitional zone where there's scorched soil
local depth_maxpeak = 200
local depth_maxpeak = 120
local depth_minpeak = 20
local slope_min = 0.75
local slope_max = 1.5
@ -37,8 +37,8 @@ local magma_chambers_enabled = true
local chamber_radius_multiplier = 0.5
local p_active = 0.3
local p_dormant = 0.15
local p_extinct = 0.15
local p_dormant = 0.3
local p_extinct = 0.3
if p_active + p_dormant + p_extinct > 1.0 then
minetest.log("error", "[nc_vulcan] probabilities of various volcano types adds up to more than 1")
@ -52,8 +52,8 @@ local c_air = minetest.get_content_id("air")
local c_lava = minetest.get_content_id("nc_terrain:lava_source") -- https://github.com/minetest/minetest/issues/7864
local c_water = minetest.get_content_id("nc_terrain:water_source")
local c_lining = minetest.get_content_id(modname .. ":tuff")
local c_hot_lining = minetest.get_content_id(modname .. ":tuff_hot")
local c_lining = minetest.get_content_id("nc_terrain:hard_stone_4")
--local c_hot_lining = minetest.get_content_id(modname .. ":basalt")
local c_cone = minetest.get_content_id("nc_terrain:stone")
--if minetest.get_mapgen_setting("mg_name") == "v7" then
@ -65,10 +65,10 @@ local c_cone = minetest.get_content_id("nc_terrain:stone")
local c_ash = minetest.get_content_id("nc_fire:ash")
local c_coalash = minetest.get_content_id("nc_fire:coal1")
local c_soil = minetest.get_content_id("nc_terrain:dirt")
local c_ashdirt = minetest.get_content_id(modname .. ":dirt_ashy")
local c_igneous = minetest.get_content_id("nc_igneous:pumice")
local c_sand = minetest.get_content_id("nc_terrain:sand")
local c_underwater_soil = c_sand
local c_plug = minetest.get_content_id(modname .. ":tuff")
local c_plug = minetest.get_content_id("nc_terrain:hard_stone_5")
local water_level = tonumber(minetest.get_mapgen_setting("water_level"))
local mapgen_seed = tonumber(minetest.get_mapgen_setting("seed"))
@ -230,26 +230,26 @@ minetest.register_on_generated(function(minp, maxp, seed)
elseif y < carbon_line and biome_data ~= nil then
c_top = biome_data.c_top
c_filler = biome_data.c_filler
c_dust = biome_data.c_dust
c_dust = c_air
elseif y < carbon_line + carbon_border then
c_top = c_ashdirt
c_filler = c_soil
c_dust = c_ash
c_top = c_igneous
c_filler = c_coalash
c_dust = c_air
else
c_top = c_coalash
c_filler = c_coalash
c_filler = c_igneous
c_dust = c_ash
end
else
c_top = c_ash
c_filler = c_ash
c_filler = c_igneous
end
local pipestuff
local liningstuff
if y < depth_lava + math.random() * 1.1 then
pipestuff = c_lava
liningstuff = c_hot_lining
liningstuff = c_lining
else
if state < state_dormant then
pipestuff = c_plug -- dormant volcano

View File

@ -6,118 +6,6 @@ local modname = minetest.get_current_modname()
local function findlava(pos)
return nodecore.find_nodes_around(pos, "group:lava")
end
----------------------------------------
-----------------NODES------------------
-----Cooled Volcanic Tuff-----
minetest.register_node(modname .. ":tuff", {
description = "Volcanic Tuff",
drawtype = "normal",
tiles = {"(nc_terrain_stone.png^[colorize:#8B4513:80)^(nc_terrain_cobble.png^[colorize:#000000:140)"},
groups = {
cracky = 5,
rock = 1,
vulcan = 1
},
sounds = nodecore.sounds("nc_terrain_stony"),
drop_in_place = "nc_terrain:hard_stone_3"
})
-----Hot Volcanic Tuff-----
minetest.register_node(modname .. ":tuff_hot", {
description = "Hot Volcanic Tuff",
drawtype = "normal",
light_source = 6,
tiles = {"(nc_terrain_stone.png^[colorize:#B22222:80)^(nc_terrain_cobble.png^[colorize:#000000:140)^nc_fire_ember_1.png"},
groups = {
cracky = 5,
igniter = 1,
damage_touch = 1,
damage_radiant = 4,
vulcan = 1
},
sounds = nodecore.sounds("nc_terrain_stony"),
silktouch = false,
stack_as_node = true,
})
-----Burning Earth-----
minetest.register_node(modname .. ":dirt_hot", {
description = "Burning Soil",
drawtype = "normal",
light_source = 3,
tiles = {"nc_terrain_dirt.png^" .. modname .. "_scorch.png^nc_fire_ember_1.png"},
groups = {
dirt = 1,
damage_touch = 1,
damage_radiant = 2,
vulcan = 1
},
sounds = nodecore.sounds("nc_terrain_crunchy")
})
-----Scorched Earth-----
minetest.register_node(modname .. ":dirt_ashy", {
description = "Scorched Soil",
drawtype = "normal",
tiles = {"nc_terrain_dirt.png^" .. modname .. "_scorch.png"},
groups = {
crumbly = 1,
dirt = 1,
soil = 1,
vulcan = 1,
falling_repose = 1
},
sounds = nodecore.sounds("nc_terrain_crunchy")
})
-----Basalt-----
minetest.register_node(modname .. ":basalt", {
description = "Basalt",
drawtype = "normal",
tiles = {
modname .. "_basalt.png",
modname .. "_basalt.png",
modname .. "_basalt_side.png",
},
groups = {
cracky = 4,
falling_node= 1,
vulcan = 1
},
sounds = nodecore.sounds("nc_terrain_stony"),
drop_in_place = "nc_terrain:cobble",
drop = "nc_fire:lump_ash"
})
----------------------------------------
---------------Reactions----------------
--Vulcanize Stone--
nodecore.register_abm({
label = "Vulcanize Stone",
nodenames = {"group:rock", "group:gravel"},
neighbors = {"nc_terrain:lava_source", "nc_terrain:lava_flowing"},
interval = 4,
chance = 2,
action = function(pos)
nodecore.set_loud(pos, {name = modname .. ":tuff_hot"})
end
})
--Vulcanized Stone Cooling--
nodecore.register_abm({
label = "Volcanic Tuff Cooling",
interval = 5,
chance = 5,
nodenames = {modname .. ":tuff_hot"},
action = function(pos)
-- local above = {x = pos.x, y = pos.y + 1, z = pos.z}
if #findlava(pos) < 1 then
minetest.sound_play("nc_api_craft_hiss", {gain = 0.02, pos = pos})
return minetest.set_node(pos, {name = modname .. ":tuff"})
end
end
})
--Vulcanize Soil--
nodecore.register_abm({
@ -127,22 +15,7 @@ nodecore.register_abm({
interval = 4,
chance = 2,
action = function(pos)
nodecore.set_loud(pos, {name = modname .. ":dirt_hot"})
end
})
--Vulcanized Soil Cooling--
nodecore.register_abm({
label = "Scorched Soil Cooling",
interval = 5,
chance = 5,
nodenames = {modname .. ":dirt_hot"},
action = function(pos)
-- local above = {x = pos.x, y = pos.y + 1, z = pos.z}
if #findlava(pos) < 1 then
minetest.sound_play("nc_api_craft_hiss", {gain = 0.02, pos = pos})
return minetest.set_node(pos, {name = modname .. ":dirt_ashy"})
end
nodecore.set_loud(pos, {name = "nc_concrete:adobe"})
end
})
@ -158,27 +31,4 @@ nodecore.register_abm({
end
})
--Hydrovulcanism--
nodecore.register_abm({
label = "Hydrovolcanic Reaction",
nodenames = {"group:water"},
neighbors = {"nc_terrain:lava_flowing"},
interval = 1,
chance = 1,
action = function(pos)
nodecore.set_loud(pos, {name = modname .. ":basalt"})
return nodecore.fallcheck(pos)
end
})
--Scorched Soil Mixing--
nodecore.register_craft({
label = "till scorched earth into mud",
action = "pummel",
duration = 4,
toolgroups = {crumbly = 3},
nodes = {
{match = modname .. ":dirt_ashy", replace = "nc_concrete:mud"}
},
})