Ferns: Add 3 sizes for coniferous forest biome
authorparamat <paramat@users.noreply.github.com>
Sun, 24 Dec 2017 02:23:29 +0000 (02:23 +0000)
committerparamat <mat.gregory@virginmedia.com>
Sun, 24 Dec 2017 20:50:44 +0000 (20:50 +0000)
Remove flowers from coniferous forest.
Add 'dirt with coniferous litter' to farming mod overrides.

mods/default/README.txt
mods/default/crafting.lua
mods/default/license.txt
mods/default/mapgen.lua
mods/default/nodes.lua
mods/default/textures/default_fern_1.png [new file with mode: 0644]
mods/default/textures/default_fern_2.png [new file with mode: 0644]
mods/default/textures/default_fern_3.png [new file with mode: 0644]
mods/farming/nodes.lua
mods/flowers/mapgen.lua

index d27e8a870b63bf38c53d21bd3d31822ce8851ab2..f749b0e356ac82effe7a43d95d0f2fd532242af3 100644 (file)
@@ -218,6 +218,9 @@ tobyplowy (CC BY-SA 3.0):
 CloudyProton (CC BY-SA 3.0):
   default_book_written.png, based on default_book.png by Gambit
 
+Mossmanikin (CC BY-SA 3.0):
+  default_fern_*.png
+
 Glass breaking sounds (CC BY 3.0):
   1: http://www.freesound.org/people/cmusounddesign/sounds/71947/
   2: http://www.freesound.org/people/Tomlija/sounds/97669/
index 2d11d26ceaddf50e1652a51fc11219fa70ecf84b..dd91ad4205574c2934463fc3db0248916b7b5182 100644 (file)
@@ -1098,6 +1098,12 @@ minetest.register_craft({
        burntime = 2,
 })
 
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:fern_1",
+       burntime = 2,
+})
+
 minetest.register_craft({
        type = "fuel",
        recipe = "default:paper",
index ce143ee5908ea761f22bcc847cfc462bd61bf336..4610bac82e983e66a5d340630382703e4d4359dd 100644 (file)
@@ -48,6 +48,7 @@ Copyright (C) 2010-2017:
   tobyplowy
   CloudyProton
   TumeniNodes
+  Mossmanikin
 
 You are free to:
 Share — copy and redistribute the material in any medium or format.
index e06d1285fda7f8a49e304bd94c2c34f04feec510..a12fe580a0064da199549068d43179dde3c1cb38 100644 (file)
@@ -1640,6 +1640,26 @@ local function register_dry_grass_decoration(offset, scale, length)
        })
 end
 
+local function register_fern_decoration(seed, length)
+       minetest.register_decoration({
+               deco_type = "simple",
+               place_on = {"default:dirt_with_coniferous_litter"},
+               sidelen = 16,
+               noise_params = {
+                       offset = 0,
+                       scale = 0.2,
+                       spread = {x = 100, y = 100, z = 100},
+                       seed = seed,
+                       octaves = 3,
+                       persist = 0.7
+               },
+               biomes = {"coniferous_forest"},
+               y_min = 6,
+               y_max = 31000,
+               decoration = "default:fern_" .. length,
+       })
+end
+
 
 function default.register_decorations()
 
@@ -1960,6 +1980,12 @@ function default.register_decorations()
        register_dry_grass_decoration(0.07, -0.01, 2)
        register_dry_grass_decoration(0.09, -0.03, 1)
 
+       -- Ferns
+
+       register_fern_decoration(14936, 3)
+       register_fern_decoration(801,   2)
+       register_fern_decoration(5,     1)
+
        -- Junglegrass
 
        minetest.register_decoration({
index 2522230812a94dbd3a9c73bd08a258423ef9965d..a366892d3e75da93e4608e05393e3a9b6e3c324b 100644 (file)
@@ -143,6 +143,10 @@ default:dry_grass_3
 default:dry_grass_4
 default:dry_grass_5
 
+default:fern_1
+default:fern_2
+default:fern_3
+
 default:bush_stem
 default:bush_leaves
 default:bush_sapling
@@ -1315,6 +1319,58 @@ for i = 2, 5 do
 end
 
 
+minetest.register_node("default:fern_1", {
+       description = "Fern",
+       drawtype = "plantlike",
+       waving = 1,
+       tiles = {"default_fern_1.png"},
+       inventory_image = "default_fern_1.png",
+       wield_image = "default_fern_1.png",
+       paramtype = "light",
+       sunlight_propagates = true,
+       walkable = false,
+       buildable_to = true,
+       groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1},
+       sounds = default.node_sound_leaves_defaults(),
+       selection_box = {
+               type = "fixed",
+               fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
+       },
+
+       on_place = function(itemstack, placer, pointed_thing)
+               -- place a random fern node
+               local stack = ItemStack("default:fern_" .. math.random(1, 3))
+               local ret = minetest.item_place(stack, placer, pointed_thing)
+               return ItemStack("default:fern_1 " ..
+                       itemstack:get_count() - (1 - ret:get_count()))
+       end,
+})
+
+for i = 2, 3 do
+       minetest.register_node("default:fern_" .. i, {
+               description = "Fern",
+               drawtype = "plantlike",
+               waving = 1,
+               visual_scale = 2,
+               tiles = {"default_fern_" .. i .. ".png"},
+               inventory_image = "default_fern_" .. i .. ".png",
+               wield_image = "default_fern_" .. i .. ".png",
+               paramtype = "light",
+               sunlight_propagates = true,
+               walkable = false,
+               buildable_to = true,
+               groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
+                       not_in_creative_inventory=1},
+               drop = "default:fern_1",
+               sounds = default.node_sound_leaves_defaults(),
+               selection_box = {
+                       type = "fixed",
+                       fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
+               },
+       })
+end
+
+
 minetest.register_node("default:bush_stem", {
        description = "Bush Stem",
        drawtype = "plantlike",
diff --git a/mods/default/textures/default_fern_1.png b/mods/default/textures/default_fern_1.png
new file mode 100644 (file)
index 0000000..b307986
Binary files /dev/null and b/mods/default/textures/default_fern_1.png differ
diff --git a/mods/default/textures/default_fern_2.png b/mods/default/textures/default_fern_2.png
new file mode 100644 (file)
index 0000000..6c5f7d5
Binary files /dev/null and b/mods/default/textures/default_fern_2.png differ
diff --git a/mods/default/textures/default_fern_3.png b/mods/default/textures/default_fern_3.png
new file mode 100644 (file)
index 0000000..2c1f605
Binary files /dev/null and b/mods/default/textures/default_fern_3.png differ
index 1e746ecd43bc23db136da2876bdddab43d38b2f3..c85c7c87abdcf13135cfb000b32fa53ea61ade05 100644 (file)
@@ -30,6 +30,14 @@ minetest.override_item("default:dirt_with_rainforest_litter", {
        }
 })
 
+minetest.override_item("default:dirt_with_coniferous_litter", {
+       soil = {
+               base = "default:dirt_with_coniferous_litter",
+               dry = "farming:soil",
+               wet = "farming:soil_wet"
+       }
+})
+
 minetest.register_node("farming:soil", {
        description = "Soil",
        tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
index b13c9731af290567c43eafd3250b83e183bc62b5..c8cc604f62c9faf3d223b83a30e653306fdeb954 100644 (file)
@@ -84,7 +84,7 @@ end
 local function register_flower(seed, name)
        minetest.register_decoration({
                deco_type = "simple",
-               place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
+               place_on = {"default:dirt_with_grass"},
                sidelen = 16,
                noise_params = {
                        offset = -0.02,
@@ -94,8 +94,7 @@ local function register_flower(seed, name)
                        octaves = 3,
                        persist = 0.6
                },
-               biomes = {"grassland", "deciduous_forest", "coniferous_forest",
-                       "floatland_grassland"},
+               biomes = {"grassland", "deciduous_forest", "floatland_grassland"},
                y_min = 1,
                y_max = 31000,
                decoration = "flowers:"..name,