Made all leaves draw as cubes in the inventory regardless of whether
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Fri, 15 Nov 2013 01:39:07 +0000 (20:39 -0500)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Fri, 15 Nov 2013 01:39:07 +0000 (20:39 -0500)
they are plantlike or not in the world.  This has the side effect that a
dropped leaf block will look like a flat sprite.  Oh well, no other way
to fix it.

Adjusted the offset of the textures so that leaves place more accurately
in the world (blame this on the engine, it has no option for me to
adjust the precise vertical visual scale independently from the
horizontal scale, so I have to fake it with the textures).

18 files changed:
node_defs.lua
textures/default_jungleleaves_plantlike.png
textures/default_leaves_plantlike.png
textures/moretrees_apple_tree_leaves_plantlike.png
textures/moretrees_beech_leaves_plantlike.png
textures/moretrees_birch_leaves_plantlike.png
textures/moretrees_fir_leaves_bright_plantlike.png
textures/moretrees_fir_leaves_plantlike.png
textures/moretrees_jungletree_leaves_green_plantlike.png
textures/moretrees_jungletree_leaves_red_plantlike.png
textures/moretrees_jungletree_leaves_yellow_plantlike.png
textures/moretrees_oak_leaves_plantlike.png
textures/moretrees_palm_leaves_plantlike.png
textures/moretrees_pine_leaves_plantlike.png
textures/moretrees_rubber_tree_leaves_plantlike.png
textures/moretrees_sequoia_leaves_plantlike.png
textures/moretrees_spruce_leaves_plantlike.png
textures/moretrees_willow_leaves_plantlike.png

index b0b796b457410235c5adfd7084d29de44243275c..dc51939afbbb799b4d08d7362aae091337784765 100644 (file)
@@ -33,6 +33,9 @@ new_default_leaves = moretrees:clone_node("default:leaves")
        if moretrees.enable_default_leafdecay then
                new_default_leaves.groups = {snappy=3, flammable=2, leaves=1}
        end
+       if moretrees.plantlike_leaves then
+               new_default_leaves.inventory_image = minetest.inventorycube("default_leaves.png")
+       end
        new_default_leaves.drawtype = moretrees_new_leaves_drawtype
        new_default_leaves.visual_scale = moretrees_new_leaves_visual_scale
        new_default_leaves.tiles = {"default_leaves"..moretrees_new_leaves_extension}
@@ -40,9 +43,11 @@ new_default_leaves = moretrees:clone_node("default:leaves")
 
 new_default_jungle_leaves = moretrees:clone_node("default:jungleleaves")
        if moretrees.enable_default_jungle_leafdecay then
-       new_default_jungle_leaves.groups = {snappy=3, flammable=2, leaves=1}
+               new_default_jungle_leaves.groups = {snappy=3, flammable=2, leaves=1}
+       end
+       if moretrees.plantlike_leaves then
+               new_default_jungle_leaves.inventory_image = minetest.inventorycube("default_jungleleaves.png")
        end
-       new_default_jungle_leaves = moretrees:clone_node("default:jungleleaves")
        new_default_jungle_leaves.drawtype = moretrees_new_leaves_drawtype
        new_default_jungle_leaves.visual_scale = moretrees_new_leaves_visual_scale
        new_default_jungle_leaves.tiles = {"default_jungleleaves"..moretrees_new_leaves_extension}
@@ -130,11 +135,17 @@ for i in ipairs(moretrees.treelist) do
                        droprarity = 20
                end
 
+               moretrees_render_inventory_image = nil
+               if moretrees.plantlike_leaves then
+                       moretrees_render_inventory_image = minetest.inventorycube
+               end
+
                minetest.register_node("moretrees:"..treename.."_leaves", {
                        description = treedesc.." Leaves",
                        drawtype = moretrees_new_leaves_drawtype,
                        visual_scale = moretrees_new_leaves_visual_scale,
                        tiles = { "moretrees_"..treename.."_leaves"..moretrees_new_leaves_extension },
+                       inventory_image = moretrees_render_inventory_image("moretrees_"..treename.."_leaves.png"),
                        paramtype = "light",
                        groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
                        sounds = default.node_sound_leaves_defaults(),
@@ -341,6 +352,7 @@ for color = 1, 3 do
                drawtype = moretrees_new_leaves_drawtype,
                visual_scale = moretrees_new_leaves_visual_scale,
                tiles = {"moretrees_jungletree_leaves_"..jungleleaves[color]..moretrees_new_leaves_extension},
+               inventory_image = moretrees_render_inventory_image("moretrees_jungletree_leaves_"..jungleleaves[color]..".png"),
                paramtype = "light",
                groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
                drop = {
@@ -360,9 +372,9 @@ minetest.register_node("moretrees:fir_leaves_bright", {
        drawtype = moretrees_new_leaves_drawtype,
        visual_scale = moretrees_new_leaves_visual_scale,
        description = "Douglas Fir Leaves (Bright)",
-       tile_images = { "moretrees_fir_leaves_bright"..moretrees_new_leaves_extension },
+       tiles = { "moretrees_fir_leaves_bright"..moretrees_new_leaves_extension },
+       inventory_image = moretrees_render_inventory_image("moretrees_fir_leaves_bright.png"),
        paramtype = "light",
-
        groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1 },
        drop = {
                max_items = 1,
index d7cac732dea9e7e803377da828ca34c189e19ab5..ad3e3e4ffc5f9c301d9b0a2040a2f4f320050f56 100644 (file)
Binary files a/textures/default_jungleleaves_plantlike.png and b/textures/default_jungleleaves_plantlike.png differ
index 6786a034c6e59705d6b6028d42542fd92d883be3..7d93edebc6e06a9e816e293f14412b7b17a624ca 100644 (file)
Binary files a/textures/default_leaves_plantlike.png and b/textures/default_leaves_plantlike.png differ
index f333fd0a87ea8257a818bcdca0e650fd8c0d2036..b08582bd256bbfad29a552ba280eb94be10101e3 100644 (file)
Binary files a/textures/moretrees_apple_tree_leaves_plantlike.png and b/textures/moretrees_apple_tree_leaves_plantlike.png differ
index 6786a034c6e59705d6b6028d42542fd92d883be3..7d93edebc6e06a9e816e293f14412b7b17a624ca 100644 (file)
Binary files a/textures/moretrees_beech_leaves_plantlike.png and b/textures/moretrees_beech_leaves_plantlike.png differ
index 5c85e3da96fb35cf40a0de8ac81a49d8fd5d256e..0633d79dd68e800917c95a0919f8b96e6805a1f4 100644 (file)
Binary files a/textures/moretrees_birch_leaves_plantlike.png and b/textures/moretrees_birch_leaves_plantlike.png differ
index 96bab2f8d7eac4ca62c7901510ce414e9630569f..9ecc81cee262597e576bf71d37decc0d60b877df 100644 (file)
Binary files a/textures/moretrees_fir_leaves_bright_plantlike.png and b/textures/moretrees_fir_leaves_bright_plantlike.png differ
index 05c93eefd84e909ba166ed9be3b9232e5b2a7894..e80836f3247b59873d31612c031dc8ed0933cf88 100644 (file)
Binary files a/textures/moretrees_fir_leaves_plantlike.png and b/textures/moretrees_fir_leaves_plantlike.png differ
index 89da8c6625febd41994f62f3088235e01191de63..9c482f267b1151db43f9fef6126fb85c87058194 100644 (file)
Binary files a/textures/moretrees_jungletree_leaves_green_plantlike.png and b/textures/moretrees_jungletree_leaves_green_plantlike.png differ
index d13ce691000e69a968a5bb57bfcd867494bc227a..a137954bada50ac05c3ede1366fe4ec3ff3b036f 100644 (file)
Binary files a/textures/moretrees_jungletree_leaves_red_plantlike.png and b/textures/moretrees_jungletree_leaves_red_plantlike.png differ
index 06cf56636197a6fb2686c6b6743cd75f948c70cb..e02217c6697e627b0fe1b18ec6c16694562dc0f0 100644 (file)
Binary files a/textures/moretrees_jungletree_leaves_yellow_plantlike.png and b/textures/moretrees_jungletree_leaves_yellow_plantlike.png differ
index e86016675855532e75dcc56250e5d414badb1969..d90092859efe8e947b4d418b4150561442865b73 100644 (file)
Binary files a/textures/moretrees_oak_leaves_plantlike.png and b/textures/moretrees_oak_leaves_plantlike.png differ
index dd410d1b838cf253effe6af0e8ddeeaa7c6933dd..6dcf65c30fadf84fb8bb2e72c81f8068bc376f28 100644 (file)
Binary files a/textures/moretrees_palm_leaves_plantlike.png and b/textures/moretrees_palm_leaves_plantlike.png differ
index c0334fbde9ef60d76347d9680e86e747d8e81357..1264e1aabbb8305f85c0d37ec8db2e5052c5f8d2 100644 (file)
Binary files a/textures/moretrees_pine_leaves_plantlike.png and b/textures/moretrees_pine_leaves_plantlike.png differ
index 0ac8a8b17a9b2cfe4ea9f091f7ba3964aa1a4a21..476393bd889150c7c1e323d77ae23b5f6297e279 100644 (file)
Binary files a/textures/moretrees_rubber_tree_leaves_plantlike.png and b/textures/moretrees_rubber_tree_leaves_plantlike.png differ
index 88b292c6192eb8cbb9e83d54eaa536791bd8e1bf..6321be82181cdfc07d00c85a09423cf279234cb2 100644 (file)
Binary files a/textures/moretrees_sequoia_leaves_plantlike.png and b/textures/moretrees_sequoia_leaves_plantlike.png differ
index 05c93eefd84e909ba166ed9be3b9232e5b2a7894..e80836f3247b59873d31612c031dc8ed0933cf88 100644 (file)
Binary files a/textures/moretrees_spruce_leaves_plantlike.png and b/textures/moretrees_spruce_leaves_plantlike.png differ
index 49ad83409ee128af7b1858688e23a45352690a88..ae612059c5a41e35447fb3ff8a62d42f5ba4cd5e 100644 (file)
Binary files a/textures/moretrees_willow_leaves_plantlike.png and b/textures/moretrees_willow_leaves_plantlike.png differ