diff options
author | PilzAdam <adam-k@outlook.com> | 2012-11-24 19:02:16 +0100 |
---|---|---|
committer | PilzAdam <adam-k@outlook.com> | 2012-11-26 18:30:07 +0100 |
commit | ffad18e42442fed10c312adc989fc62b74e05896 (patch) | |
tree | 72d711eb593e4a87b09460e55222b26efc10855f | |
parent | e0eaed5fdbdad79b47c2c6fba15a21dbea03fe96 (diff) | |
download | minetest-ffad18e42442fed10c312adc989fc62b74e05896.tar.gz minetest-ffad18e42442fed10c312adc989fc62b74e05896.tar.bz2 minetest-ffad18e42442fed10c312adc989fc62b74e05896.zip |
Use wielditem drawtype for all nodes in item_entity
-rw-r--r-- | builtin/item_entity.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/item_entity.lua b/builtin/item_entity.lua index 2b12764f1..8657e64af 100644 --- a/builtin/item_entity.lua +++ b/builtin/item_entity.lua @@ -41,17 +41,17 @@ minetest.register_entity("__builtin:item", { prop = { is_visible = true, visual = "sprite", - textures = {"unknown_item.png"} + textures = {"unknown_item.png"}, + visual_size = {x=0.50, y=0.50} } - if item_texture and item_texture ~= "" then - prop.visual = "sprite" - prop.textures = {item_texture} - prop.visual_size = {x=0.50, y=0.50} - else + if item_type == "node" then prop.visual = "wielditem" prop.textures = {itemname} prop.visual_size = {x=0.20, y=0.20} prop.automatic_rotate = math.pi * 0.25 + elseif item_texture and item_texture ~= "" then + prop.visual = "sprite" + prop.textures = {item_texture} end self.object:set_properties(prop) end, |