From eaffef96a5cc5d07c398c47d04f6076dbb072550 Mon Sep 17 00:00:00 2001 From: paramat Date: Thu, 10 Apr 2014 05:27:59 +0100 Subject: [PATCH] Cook redcobble to desert stone, luxore in fissures, luxcrystals, lights, more ores --- functions.lua | 43 ++++++----------- init.lua | 34 +++++++------ nodes.lua | 76 ++++++++++++++++++++++++++++++ textures/watershed_light.png | Bin 0 -> 155 bytes textures/watershed_luxcrystal.png | Bin 0 -> 207 bytes textures/watershed_luxore.png | Bin 0 -> 311 bytes 6 files changed, 111 insertions(+), 42 deletions(-) create mode 100644 textures/watershed_light.png create mode 100644 textures/watershed_luxcrystal.png create mode 100644 textures/watershed_luxore.png diff --git a/functions.lua b/functions.lua index bab07e8..4014f5b 100644 --- a/functions.lua +++ b/functions.lua @@ -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 \ No newline at end of file +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, +}) \ No newline at end of file diff --git a/init.lua b/init.lua index f83f9dd..6a63a51 100644 --- a/init.lua +++ b/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 diff --git a/nodes.lua b/nodes.lua index 022a25a..397719b 100644 --- a/nodes.lua +++ b/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"}}, }) \ No newline at end of file diff --git a/textures/watershed_light.png b/textures/watershed_light.png new file mode 100644 index 0000000000000000000000000000000000000000..43c1444ea332680eca2171ef5ad2e36f5403cb29 GIT binary patch literal 155 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z8pdfpRr>`sfT~=N(VavMxPnH0MbUj@hLo7}w|M~y=PdytK!{cv9dH&nV voV=o2Hm|X>(a9j|zzW92Yzj}^ym%NG+>E(c+4+Bg%wq6#^>bP0l+XkKD1R!O literal 0 HcmV?d00001 diff --git a/textures/watershed_luxcrystal.png b/textures/watershed_luxcrystal.png new file mode 100644 index 0000000000000000000000000000000000000000..a36c93669bef6966b13ed2696f88f8609dd6f72f GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z8pdfpRr>`sfT~>Yu3;xpUvt@xoiJmTwAr_~T6C_x-u>P-~``_P#SJ`lu z`sfT~0YZF2&?sMj%s8db&7}+^pJ-xAX63eLl`7XMJM#B;J(Q)!*~7-u*hF$TGUb8uxfy1^uZ!0UNo!;ssx=dKu372Oa%ypp!7WRU zzI3(|S2G-aZnCR)W(mLddjIS8-47pS?%L$Ou)iq(n`Oo+(I4gOfSzLTboFyt=akR{ E087Dmt^fc4 literal 0 HcmV?d00001