From: Vanessa Ezekowitz Date: Fri, 15 Nov 2013 01:39:07 +0000 (-0500) Subject: Made all leaves draw as cubes in the inventory regardless of whether X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=d3e68b31491874c7a74c1cfecf96d8d45422bc15;p=zefram%2Fminetest%2Fmoretrees.git Made all leaves draw as cubes in the inventory regardless of whether 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). --- diff --git a/node_defs.lua b/node_defs.lua index b0b796b..dc51939 100644 --- a/node_defs.lua +++ b/node_defs.lua @@ -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, diff --git a/textures/default_jungleleaves_plantlike.png b/textures/default_jungleleaves_plantlike.png index d7cac73..ad3e3e4 100644 Binary files a/textures/default_jungleleaves_plantlike.png and b/textures/default_jungleleaves_plantlike.png differ diff --git a/textures/default_leaves_plantlike.png b/textures/default_leaves_plantlike.png index 6786a03..7d93ede 100644 Binary files a/textures/default_leaves_plantlike.png and b/textures/default_leaves_plantlike.png differ diff --git a/textures/moretrees_apple_tree_leaves_plantlike.png b/textures/moretrees_apple_tree_leaves_plantlike.png index f333fd0..b08582b 100644 Binary files a/textures/moretrees_apple_tree_leaves_plantlike.png and b/textures/moretrees_apple_tree_leaves_plantlike.png differ diff --git a/textures/moretrees_beech_leaves_plantlike.png b/textures/moretrees_beech_leaves_plantlike.png index 6786a03..7d93ede 100644 Binary files a/textures/moretrees_beech_leaves_plantlike.png and b/textures/moretrees_beech_leaves_plantlike.png differ diff --git a/textures/moretrees_birch_leaves_plantlike.png b/textures/moretrees_birch_leaves_plantlike.png index 5c85e3d..0633d79 100644 Binary files a/textures/moretrees_birch_leaves_plantlike.png and b/textures/moretrees_birch_leaves_plantlike.png differ diff --git a/textures/moretrees_fir_leaves_bright_plantlike.png b/textures/moretrees_fir_leaves_bright_plantlike.png index 96bab2f..9ecc81c 100644 Binary files a/textures/moretrees_fir_leaves_bright_plantlike.png and b/textures/moretrees_fir_leaves_bright_plantlike.png differ diff --git a/textures/moretrees_fir_leaves_plantlike.png b/textures/moretrees_fir_leaves_plantlike.png index 05c93ee..e80836f 100644 Binary files a/textures/moretrees_fir_leaves_plantlike.png and b/textures/moretrees_fir_leaves_plantlike.png differ diff --git a/textures/moretrees_jungletree_leaves_green_plantlike.png b/textures/moretrees_jungletree_leaves_green_plantlike.png index 89da8c6..9c482f2 100644 Binary files a/textures/moretrees_jungletree_leaves_green_plantlike.png and b/textures/moretrees_jungletree_leaves_green_plantlike.png differ diff --git a/textures/moretrees_jungletree_leaves_red_plantlike.png b/textures/moretrees_jungletree_leaves_red_plantlike.png index d13ce69..a137954 100644 Binary files a/textures/moretrees_jungletree_leaves_red_plantlike.png and b/textures/moretrees_jungletree_leaves_red_plantlike.png differ diff --git a/textures/moretrees_jungletree_leaves_yellow_plantlike.png b/textures/moretrees_jungletree_leaves_yellow_plantlike.png index 06cf566..e02217c 100644 Binary files a/textures/moretrees_jungletree_leaves_yellow_plantlike.png and b/textures/moretrees_jungletree_leaves_yellow_plantlike.png differ diff --git a/textures/moretrees_oak_leaves_plantlike.png b/textures/moretrees_oak_leaves_plantlike.png index e860166..d900928 100644 Binary files a/textures/moretrees_oak_leaves_plantlike.png and b/textures/moretrees_oak_leaves_plantlike.png differ diff --git a/textures/moretrees_palm_leaves_plantlike.png b/textures/moretrees_palm_leaves_plantlike.png index dd410d1..6dcf65c 100644 Binary files a/textures/moretrees_palm_leaves_plantlike.png and b/textures/moretrees_palm_leaves_plantlike.png differ diff --git a/textures/moretrees_pine_leaves_plantlike.png b/textures/moretrees_pine_leaves_plantlike.png index c0334fb..1264e1a 100644 Binary files a/textures/moretrees_pine_leaves_plantlike.png and b/textures/moretrees_pine_leaves_plantlike.png differ diff --git a/textures/moretrees_rubber_tree_leaves_plantlike.png b/textures/moretrees_rubber_tree_leaves_plantlike.png index 0ac8a8b..476393b 100644 Binary files a/textures/moretrees_rubber_tree_leaves_plantlike.png and b/textures/moretrees_rubber_tree_leaves_plantlike.png differ diff --git a/textures/moretrees_sequoia_leaves_plantlike.png b/textures/moretrees_sequoia_leaves_plantlike.png index 88b292c..6321be8 100644 Binary files a/textures/moretrees_sequoia_leaves_plantlike.png and b/textures/moretrees_sequoia_leaves_plantlike.png differ diff --git a/textures/moretrees_spruce_leaves_plantlike.png b/textures/moretrees_spruce_leaves_plantlike.png index 05c93ee..e80836f 100644 Binary files a/textures/moretrees_spruce_leaves_plantlike.png and b/textures/moretrees_spruce_leaves_plantlike.png differ diff --git a/textures/moretrees_willow_leaves_plantlike.png b/textures/moretrees_willow_leaves_plantlike.png index 49ad834..ae61205 100644 Binary files a/textures/moretrees_willow_leaves_plantlike.png and b/textures/moretrees_willow_leaves_plantlike.png differ