Default: Rename pine tree nodes, textures and mapgen aliases
authorparamat <mat.gregory@virginmedia.com>
Sun, 9 Aug 2015 07:50:57 +0000 (08:50 +0100)
committerparamat <mat.gregory@virginmedia.com>
Mon, 10 Aug 2015 08:19:02 +0000 (09:19 +0100)
13 files changed:
mods/default/aliases.lua
mods/default/crafting.lua
mods/default/mapgen.lua
mods/default/nodes.lua
mods/default/schematics/pine_tree.mts
mods/default/textures/default_pine_tree.png [new file with mode: 0644]
mods/default/textures/default_pine_tree_top.png [new file with mode: 0644]
mods/default/textures/default_pine_wood.png [new file with mode: 0644]
mods/default/textures/default_pinetree.png [deleted file]
mods/default/textures/default_pinetree_top.png [deleted file]
mods/default/textures/default_pinewood.png [deleted file]
mods/default/trees.lua
mods/stairs/init.lua

index 203cd6168814ab1a4f0928d079f59e44974b1763..64e6ebbaaee1cdddac3356bbba8c30ffcee15e48 100644 (file)
@@ -68,5 +68,9 @@ minetest.register_alias("steel_ingot", "default:steel_ingot")
 minetest.register_alias("clay_brick", "default:clay_brick")
 minetest.register_alias("snow", "default:snow")
 
--- Mese now comes in the form of blocks, ore, crystal and fragments
+-- 'mese_block' was used for a while for the block form of mese
 minetest.register_alias("default:mese_block", "default:mese")
+
+-- Aliases for corrected pine node names
+minetest.register_alias("default:pinetree", "default:pine_tree")
+minetest.register_alias("default:pinewood", "default:pine_wood")
index 304b20322f3bac426c36be65f1517a4fd6c94e43..fa8df2d6312ebdcda3acaa92a015e08ba4e4b913 100644 (file)
@@ -15,9 +15,9 @@ minetest.register_craft({
 })
 
 minetest.register_craft({
-       output = 'default:pinewood 4',
+       output = 'default:pine_wood 4',
        recipe = {
-               {'default:pinetree'},
+               {'default:pine_tree'},
        }
 })
 
index 661c8a0cb1cfa8a438843a579c2871d721749993..c40f2204494b29879888aea6d725bf548ff9ee6b 100644 (file)
@@ -26,7 +26,7 @@ minetest.register_alias("mapgen_apple", "default:apple")
 minetest.register_alias("mapgen_jungletree", "default:jungletree")
 minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves")
 minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
-minetest.register_alias("mapgen_pinetree", "default:pinetree")
+minetest.register_alias("mapgen_pine_tree", "default:pine_tree")
 minetest.register_alias("mapgen_pine_needles", "default:pine_needles")
 
 -- Dungeons
index 2b70fff1a46b1d5c50bf1a832c72b98fafc675fb..f70e6b64f60e1ce0181e93ae42269753b89deec0 100644 (file)
@@ -1,5 +1,15 @@
 -- mods/default/nodes.lua
 
+
+--[[ Node name convention:
+
+Although many node names are in combined-word form, the required form for new
+node names is words separated by underscores. If both forms are used in written
+language (for example pinewood and pine wood) the underscore form should be used.
+
+--]]
+
+
 --[[ Index:
 
 Stone
@@ -58,8 +68,8 @@ default:junglewood
 default:jungleleaves
 default:junglesapling
 
-default:pinetree
-default:pinewood
+default:pine_tree
+default:pine_wood
 default:pine_needles
 default:pine_sapling
 
@@ -562,13 +572,10 @@ minetest.register_node("default:junglesapling", {
 
 
 
-minetest.register_node("default:pinetree", {
+minetest.register_node("default:pine_tree", {
        description = "Pine Tree",
-       tiles = {
-               "default_pinetree_top.png",
-               "default_pinetree_top.png",
-               "default_pinetree.png"
-       },
+       tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
+               "default_pine_tree.png"},
        paramtype2 = "facedir",
        is_ground_content = false,
        groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
@@ -577,9 +584,9 @@ minetest.register_node("default:pinetree", {
        on_place = minetest.rotate_node
 })
 
-minetest.register_node("default:pinewood", {
-       description = "Pinewood Planks",
-       tiles = {"default_pinewood.png"},
+minetest.register_node("default:pine_wood", {
+       description = "Pine Wood Planks",
+       tiles = {"default_pine_wood.png"},
        is_ground_content = false,
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
        sounds = default.node_sound_wood_defaults(),
@@ -620,23 +627,15 @@ minetest.register_node("default:pine_sapling", {
                type = "fixed",
                fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
        },
-       groups = {
-               snappy = 2,
-               dig_immediate = 3,
-               flammable = 2,
-               attached_node = 1,
-               sapling = 1
-       },
+       groups = {snappy = 2, dig_immediate = 3, flammable = 2,
+               attached_node = 1, sapling = 1},
        sounds = default.node_sound_leaves_defaults(),
 })
 
 minetest.register_node("default:acacia_tree", {
        description = "Acacia Tree",
-       tiles = {
-               "default_acacia_tree_top.png",
-               "default_acacia_tree_top.png",
-               "default_acacia_tree.png"
-       },
+       tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
+               "default_acacia_tree.png"},
        paramtype2 = "facedir",
        is_ground_content = false,
        groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
@@ -687,13 +686,8 @@ minetest.register_node("default:acacia_sapling", {
                type = "fixed",
                fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
        },
-       groups = {
-               snappy = 2,
-               dig_immediate = 3,
-               flammable = 2,
-               attached_node = 1,
-               sapling = 1
-       },
+       groups = {snappy = 2, dig_immediate = 3, flammable = 2,
+               attached_node = 1, sapling = 1},
        sounds = default.node_sound_leaves_defaults(),
 })
 
index 3f4eeb09bbcbf27fbd7be5d60d03fd2cd6d8fa66..9eb6302762d0c766a423ae46d3df5b7662b80629 100644 (file)
Binary files a/mods/default/schematics/pine_tree.mts and b/mods/default/schematics/pine_tree.mts differ
diff --git a/mods/default/textures/default_pine_tree.png b/mods/default/textures/default_pine_tree.png
new file mode 100644 (file)
index 0000000..4a5328f
Binary files /dev/null and b/mods/default/textures/default_pine_tree.png differ
diff --git a/mods/default/textures/default_pine_tree_top.png b/mods/default/textures/default_pine_tree_top.png
new file mode 100644 (file)
index 0000000..8705710
Binary files /dev/null and b/mods/default/textures/default_pine_tree_top.png differ
diff --git a/mods/default/textures/default_pine_wood.png b/mods/default/textures/default_pine_wood.png
new file mode 100644 (file)
index 0000000..6844ceb
Binary files /dev/null and b/mods/default/textures/default_pine_wood.png differ
diff --git a/mods/default/textures/default_pinetree.png b/mods/default/textures/default_pinetree.png
deleted file mode 100644 (file)
index 4a5328f..0000000
Binary files a/mods/default/textures/default_pinetree.png and /dev/null differ
diff --git a/mods/default/textures/default_pinetree_top.png b/mods/default/textures/default_pinetree_top.png
deleted file mode 100644 (file)
index 8705710..0000000
Binary files a/mods/default/textures/default_pinetree_top.png and /dev/null differ
diff --git a/mods/default/textures/default_pinewood.png b/mods/default/textures/default_pinewood.png
deleted file mode 100644 (file)
index 6844ceb..0000000
Binary files a/mods/default/textures/default_pinewood.png and /dev/null differ
index 4f2b229020fcec02172419cdd8c3fa61a2a7e670..c55708c45c424f9e9916752ced67b8cd37a10128 100644 (file)
@@ -237,7 +237,7 @@ function default.grow_pine_tree(pos)
 
        local c_air = minetest.get_content_id("air")
        local c_ignore = minetest.get_content_id("ignore")
-       local c_pinetree = minetest.get_content_id("default:pinetree")
+       local c_pine_tree = minetest.get_content_id("default:pine_tree")
        local c_pine_needles  = minetest.get_content_id("default:pine_needles")
        local c_snow = minetest.get_content_id("default:snow")
        local c_snowblock = minetest.get_content_id("default:snowblock")
@@ -341,12 +341,13 @@ function default.grow_pine_tree(pos)
        end
 
        -- Trunk
-       data[a:index(x, y, z)] = c_pinetree -- Force-place lowest trunk node to replace sapling
+       data[a:index(x, y, z)] = c_pine_tree -- Force-place lowest trunk node to replace sapling
        for yy = y + 1, maxy do
                local vi = a:index(x, yy, z)
                local node_id = data[vi]
-               if node_id == c_air or node_id == c_ignore or node_id == c_pine_needles then
-                       data[vi] = c_pinetree
+               if node_id == c_air or node_id == c_ignore or
+                               node_id == c_pine_needles or node_id == c_snow then
+                       data[vi] = c_pine_tree
                end
        end
 
index 078a3a28306fa118b26b36c2cee00fa53b4f062a..7e752d138f0a16551e54d8ff4386a95fab6ac786 100644 (file)
@@ -234,11 +234,11 @@ stairs.register_stair_and_slab("junglewood", "default:junglewood",
                "Junglewood Slab",
                default.node_sound_wood_defaults())
 
-stairs.register_stair_and_slab("pinewood", "default:pinewood",
+stairs.register_stair_and_slab("pine_wood", "default:pine_wood",
                {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
-               {"default_pinewood.png"},
-               "Pinewood Stair",
-               "Pinewood Slab",
+               {"default_pine_wood.png"},
+               "Pine Wood Stair",
+               "Pine Wood Slab",
                default.node_sound_wood_defaults())
 
 stairs.register_stair_and_slab("acacia_wood", "default:acacia_wood",