From 03967a9f1b85afff10427d389622bf69295a1e58 Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Sun, 4 Feb 2018 02:00:15 +0100 Subject: [PATCH] Big update, various things - Added fir tree and its log, textures from my old Forest mod - Moved pine tree to hot regions and with a different shape (Pinus Pinea) - Renamed mod (biomes -> 30biomes) --- decorations.lua | 141 +++++++++++++++++++++++++++---- init.lua | 20 +---- mod.conf | 2 +- nodes.lua | 59 +++++++++++++ schematics/fir_tree.mts | Bin 0 -> 176 bytes schematics/fir_tree_backup.mts | 2 + schematics/pine_tree.mts | Bin 0 -> 258 bytes schematics/pine_tree_old.mts | Bin 0 -> 305 bytes textures/biomes_fir_leaves.png | Bin 0 -> 379 bytes textures/biomes_fir_sapling.png | Bin 0 -> 289 bytes textures/biomes_fir_tree.png | Bin 0 -> 443 bytes textures/biomes_fir_tree_top.png | Bin 0 -> 362 bytes textures/biomes_fir_wood.png | Bin 0 -> 268 bytes 13 files changed, 190 insertions(+), 34 deletions(-) create mode 100644 nodes.lua create mode 100644 schematics/fir_tree.mts create mode 100644 schematics/fir_tree_backup.mts create mode 100644 schematics/pine_tree.mts create mode 100644 schematics/pine_tree_old.mts create mode 100644 textures/biomes_fir_leaves.png create mode 100644 textures/biomes_fir_sapling.png create mode 100644 textures/biomes_fir_tree.png create mode 100644 textures/biomes_fir_tree_top.png create mode 100644 textures/biomes_fir_wood.png diff --git a/decorations.lua b/decorations.lua index 3b92eae..e9f70d5 100644 --- a/decorations.lua +++ b/decorations.lua @@ -1,7 +1,10 @@ +local path = minetest.get_modpath("30biomes") +local defaultpath = minetest.get_modpath("default") + -- Mud in swamps minetest.register_ore({ ore_type = "blob", - ore = "biomes:mud", + ore = "30biomes:mud", wherein = {"default:dirt", "default:dirt_with_grass"}, clust_scarcity = 12*12*12, clust_size = 10, @@ -43,7 +46,7 @@ minetest.register_ore({ -- Jungle grass minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "biomes:mud"}, + place_on = {"default:dirt_with_grass", "30biomes:mud"}, sidelen = 16, noise_params = { offset = 0.15, @@ -172,7 +175,7 @@ minetest.register_decoration({ biomes = {"deciduous_forest", "cold_deciduous_forest", "orchard", "hot_deciduous_forest"}, y_min = 1, y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/apple_tree.mts", + schematic = defaultpath.."/schematics/apple_tree.mts", flags = "place_center_x, place_center_z", }) @@ -225,7 +228,7 @@ minetest.register_decoration({ biomes = {"semi-tropical_forest", "mixed_forest"}, y_min = 1, y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/apple_tree.mts", + schematic = defaultpath.."/schematics/apple_tree.mts", flags = "place_center_x, place_center_z", }) @@ -278,7 +281,7 @@ minetest.register_decoration({ biomes = {"rainforest", "mangrove"}, y_min = 0, y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/jungle_tree.mts", + schematic = defaultpath.."/schematics/jungle_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -332,7 +335,7 @@ minetest.register_decoration({ biomes = {"semi-tropical_forest"}, y_min = 0, y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/jungle_tree.mts", + schematic = defaultpath.."/schematics/jungle_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -383,10 +386,10 @@ minetest.register_decoration({ octaves = 3, persist = 0.66 }, - biomes = {"taiga", "coniferous_forest"}, + biomes = {"hot_pine_forest"}, y_min = 2, y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/pine_tree.mts", + schematic = path.."/schematics/pine_tree.mts", flags = "place_center_x, place_center_z", }) @@ -402,7 +405,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.66 }, - biomes = {"taiga", "coniferous_forest"}, + biomes = {"hot_pine_forest"}, y_min = 1, y_max = 31000, schematic = { @@ -424,6 +427,112 @@ minetest.register_decoration({ }) -- Rarer pine tree and log +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.020, + scale = -0.020, + spread = {x = 250, y = 250, z = 250}, + seed = 45, + octaves = 3, + persist = 0.66 + }, + biomes = {"hot_deciduous_forest", "scrub"}, + y_min = 2, + y_max = 31000, + schematic = path.."/schematics/pine_tree.mts", + flags = "place_center_x, place_center_z", +}) + +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.001, + scale = -0.001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"hot_deciduous_forest", "scrub"}, + y_min = 1, + y_max = 31000, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "default:pine_tree", param2 = 12, prob = 191}, + {name = "default:pine_tree", param2 = 12}, + {name = "default:pine_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_red", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", +}) + +-- Fir tree and log +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.036, + scale = 0.022, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_min = 2, + y_max = 31000, + schematic = path.."/schematics/fir_tree.mts", + flags = "place_center_x, place_center_z", +}) + +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_min = 1, + y_max = 31000, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "30biomes:fir_tree", param2 = 12, prob = 191}, + {name = "30biomes:fir_tree", param2 = 12}, + {name = "30biomes:fir_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_red", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", +}) + +-- Rarer fir tree and log minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, @@ -439,7 +548,7 @@ minetest.register_decoration({ biomes = {"mixed_forest"}, y_min = 2, y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/pine_tree.mts", + schematic = path.."/schematics/fir_tree.mts", flags = "place_center_x, place_center_z", }) @@ -464,9 +573,9 @@ minetest.register_decoration({ {name = "air", prob = 0}, {name = "air", prob = 0}, {name = "air", prob = 0}, - {name = "default:pine_tree", param2 = 12, prob = 191}, - {name = "default:pine_tree", param2 = 12}, - {name = "default:pine_tree", param2 = 12, prob = 127}, + {name = "30biomes:fir_tree", param2 = 12, prob = 191}, + {name = "30biomes:fir_tree", param2 = 12}, + {name = "30biomes:fir_tree", param2 = 12, prob = 127}, {name = "air", prob = 0}, {name = "flowers:mushroom_red", prob = 63}, {name = "air", prob = 0}, @@ -492,7 +601,7 @@ minetest.register_decoration({ biomes = {"savanna", "red_savanna"}, y_min = 1, y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/acacia_tree.mts", + schematic = defaultpath.."/schematics/acacia_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -543,7 +652,7 @@ minetest.register_decoration({ biomes = {"cold_deciduous_forest", "mixed_forest"}, y_min = 1, y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/aspen_tree.mts", + schematic = defaultpath.."/schematics/aspen_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -597,7 +706,7 @@ minetest.register_decoration({ biomes = {"swamp_shore", "hot_swamp_shore", "mangrove"}, y_min = 0, y_max = 0, - schematic = minetest.get_modpath("default").."/schematics/papyrus.mts", + schematic = defaultpath.."/schematics/papyrus.mts", }) -- Cactus diff --git a/init.lua b/init.lua index adf89ba..b1dfe25 100644 --- a/init.lua +++ b/init.lua @@ -1,24 +1,8 @@ -local path = minetest.get_modpath("biomes") +local path = minetest.get_modpath("30biomes") minetest.clear_registered_decorations() minetest.clear_registered_biomes() -minetest.register_node("biomes:mud", { - description = "Mud", - tiles = {"biomes_mud.png"}, - liquid_viscosity = 8, - liquidtype = "source", - liquid_renewable = false, - liquid_alternative_source = "biomes:mud", - liquid_alternative_flowing = "biomes:mud", - liquid_range = 0, - post_effect_color = {r=115, g=61, b=31, a=255}, - drowning = 1, - walkable = false, - groups = {crumbly = 2}, - sounds = default.node_sound_dirt_defaults(), -}) - local file = io.open(path .. "/biomes.csv", "r") for line in file:lines() do local attribs = line:split(",", true) @@ -77,6 +61,8 @@ end file:close() +dofile(path .. "/nodes.lua") + --dofile(path .. "/main_biomes.lua") --dofile(path .. "/beach_biomes.lua") --dofile(path .. "/sea_biomes.lua") diff --git a/mod.conf b/mod.conf index 0028f11..3c67fde 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1 @@ -name = biomes +name = 30biomes diff --git a/nodes.lua b/nodes.lua new file mode 100644 index 0000000..6a078a6 --- /dev/null +++ b/nodes.lua @@ -0,0 +1,59 @@ +-- Mud for swamps +minetest.register_node("30biomes:mud", { + description = "Mud", + tiles = {"biomes_mud.png"}, + liquid_viscosity = 8, + liquidtype = "source", + liquid_renewable = false, + liquid_alternative_source = "30biomes:mud", + liquid_alternative_flowing = "30biomes:mud", + liquid_range = 0, + post_effect_color = {r=115, g=61, b=31, a=255}, + drowning = 1, + walkable = false, + groups = {crumbly = 2}, + sounds = default.node_sound_dirt_defaults(), +}) + +-- Fir tree +minetest.register_node("30biomes:fir_tree", { + description = "Fir Tree", + tiles = {"biomes_fir_tree_top.png", "biomes_fir_tree_top.png", "biomes_fir_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +-- Fir needles +minetest.register_node("30biomes:fir_needles", { + description = "Fir Needles", + drawtype = "allfaces_optional", + waving = 1, + tiles = {"biomes_fir_leaves.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + --[[drop = { + max_items = 1, + items = { + { + -- player will get sapling with 1/20 chance + items = {'default:sapling'}, + rarity = 20, + }, + { + -- player will get leaves only if he get no saplings, + -- this is because max_items is 1 + items = {'default:leaves'}, + } + } + },]] + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + +minetest.register_alias("30biomes:fir_needles", "fir_needles") diff --git a/schematics/fir_tree.mts b/schematics/fir_tree.mts new file mode 100644 index 0000000000000000000000000000000000000000..b4f0966ae2af3de35b304bce7ad0b72fe4f9002e GIT binary patch literal 176 zcmeYb3HD`RVPIw8XJD6#sisx1lv4L44QEnay{ zGxJs7r=rQ()^ocp?Ze-Pe0+DUOw{x1!PwBH*CJmzb82~<3s_*;T>IsJubl0gGkTg+ Q+mEcP(>cV(nP|!f0CCkxBLDyZ literal 0 HcmV?d00001 diff --git a/schematics/fir_tree_backup.mts b/schematics/fir_tree_backup.mts new file mode 100644 index 0000000..d7cad8a --- /dev/null +++ b/schematics/fir_tree_backup.mts @@ -0,0 +1,2 @@ +MTSM\00\00\00\00?????\00\00air\00biomes:fir_needles\00biomes:fir_treex\9C\EDR[ +\C00\8B\BDh\8F\E0r\F4\AE{\E0\FA%ݴ\ECg)\88!%\84 \80\D8\CBV\A3\A9\C6)i\EA\8E\F2r\93k;\9D\8B9?W\EFT\F1\EE\D6vI\F5\C1]U\A5\D6Y\EAC *H\CEP\A09\83}\F4\FF\8D=\AC\CC.)\95\87Į~,\C2 a5 diff --git a/schematics/pine_tree.mts b/schematics/pine_tree.mts new file mode 100644 index 0000000000000000000000000000000000000000..164e51fb488f7a4591e5dc3c5f46e2819a50d9f3 GIT binary patch literal 258 zcmeYb3HD`RVc=xoX5g$x00w3T=ETe*29cE1w8YY!603sDywv!-)YO!m)M5rf6w#8R z)YOVOZ>QYmJ*>dv+Q@0cq+G$$e}F@-kym1_Q%Kau6dPMT{>igdHVg}18|MH3fY5F= literal 0 HcmV?d00001 diff --git a/schematics/pine_tree_old.mts b/schematics/pine_tree_old.mts new file mode 100644 index 0000000000000000000000000000000000000000..d2c4742ffeb5268431b0e0dcd8b03703542e91bc GIT binary patch literal 305 zcmeYb3HD`RVc=xoX5g$x00w3T=ETe*29cE1w8YY!603sDywv!-)YO!m)M5rf6w#8R z)YOVOcc;DOZBgK9(-baYaZ3QBf@bNv%zGErNC+<#c=vYxswcHk+-{1?1dhz`%se{5 zrS@#a)2~ZJoduuH`grQ~N$qu|f%E$WHWj=tRllOxt@mWH-m#TWb=+RbpL6v!u3P-B z^z$?Ox2;~9DIdOGippnsJjYm?c_VLE&6cfU?1zLzBrd^$xz+Jt-T`KN7g#r!{3hci&;TBM){*yF2+rTLph)n0RrO>?g&? o%!OIce>|_4#Ngp{BHN{1FV6U!PFtjiPMd6~v+A{Yri7Wk0HolAx&QzG literal 0 HcmV?d00001 diff --git a/textures/biomes_fir_leaves.png b/textures/biomes_fir_leaves.png new file mode 100644 index 0000000000000000000000000000000000000000..e1487f78454885066404679a9f64af81cbaa7b53 GIT binary patch literal 379 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;V>#}}%5it=-Q4v8&QAIIP zF)1M-IZ+uIQE?>^epOLoaXxdY*=`EZzkxv|`XpX0gV~E6MS^sFEBMKbcT3KF^ zJO5{zmwjnI+03$F5rc@6e(Ylv?x|A~xZEGzWKOnuK1ZOnyvux7;j?JP$0oB5^qO|& z$DX}wc1w$K4}-2sFw5#&XQem(zPE49WAP*TJWIFCJ1M@v=8VCN;F_bC`bw-G$}RqQ zN823@?N4=^mgg{-#QUlE4<$q{b78%nB9D{j9U)x~kF&I+C)6GNwAp z(x&oqrc%;Ya`r}=jz+5D_KLDjauRMz!rrRf0h)Hs+5rwm9bzI;K<$hrL4Lsu4$p3+ zfjCLt?k)@+tg;?J4rhT!WHAE+w=f7ZGR&GI0Tg5}@$_|Nzt1Met;kgO&#M9`lieO zWB#Jqou5x#jc8ls8J+xL&g-B+kE&zopr06`K_T>t<8 literal 0 HcmV?d00001 diff --git a/textures/biomes_fir_tree.png b/textures/biomes_fir_tree.png new file mode 100644 index 0000000000000000000000000000000000000000..c34932c46ff534d05e06b619ab83847626dd96a1 GIT binary patch literal 443 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}LV!<*tCg{cy^&~$k%)(-Oo)|K zthJnumlLc5>#tsIazr2^qczWq4n=yoay-W zy0rLrUEmg9R_;!@YjEJ}*9ZZ2PZqH2zR{pF{VzblJPthP3j zNceubDnNT%^AUwzFQVOLr__Cw@0t?(#wlqYThK1&Ns>(+(c3n;SA>}Bb!_sT82zU% z{fZvbn>@kSpDlExGIko=bp364p1pnINGW+>{=(jF50{Vl&)78&qol`;+0IJNKnE(I) literal 0 HcmV?d00001 diff --git a/textures/biomes_fir_tree_top.png b/textures/biomes_fir_tree_top.png new file mode 100644 index 0000000000000000000000000000000000000000..d421525462ce0052e9f3648c338204825cf24709 GIT binary patch literal 362 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDUwK5h7a#V@(G0KW|>`1bz zO84z5jho((vu;A>-r4!bmR6lwUUOkp<*nVlPmWH1e}3U#HoaJ&UdAMEcNc~ZR#^`q zhqJ&VvY3H^TNs2H8D`Cq01C2~c>21s-)EEKR%W+Zbf*+3Bw6AbQR1ARo12SCe7#)YC0Z^KxFz9hHgTe~DWM4fqJ)>G literal 0 HcmV?d00001 diff --git a/textures/biomes_fir_wood.png b/textures/biomes_fir_wood.png new file mode 100644 index 0000000000000000000000000000000000000000..49fd55babcccb24d79df34f6d1b601b2aae4ef88 GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa3-AeX?JoE3tM-}R7`S>;=<3Ol ztEQ!`o}RvWe(Bc5mD`t8OV*y*2vo_K?+4=jBDtZjfKQCI5i?)HoHV9>Il-Zyb!&oztqnPPUN#IpvG_Eot7)XR79} z@^AAw+-cr;#rLQ8`=IMRGj-