diff options
author | Rui <Rui914@users.noreply.github.com> | 2015-09-01 06:57:12 +0900 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-09-01 19:14:08 +0200 |
commit | 4124e360cb676f68ee0d20ff7f9282f8f80f44c7 (patch) | |
tree | 9f1a4c93b456a64b832e2708a9fcfd9d0aea37d7 /builtin/game | |
parent | 0903190ba2ed2134c464f2efe694d7281ead1c09 (diff) | |
download | minetest-4124e360cb676f68ee0d20ff7f9282f8f80f44c7.tar.gz minetest-4124e360cb676f68ee0d20ff7f9282f8f80f44c7.tar.bz2 minetest-4124e360cb676f68ee0d20ff7f9282f8f80f44c7.zip |
Minor tweaks __builtin:falling_node
Diffstat (limited to 'builtin/game')
-rw-r--r-- | builtin/game/falling.lua | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua index 58f68fc56..5b5e806f5 100644 --- a/builtin/game/falling.lua +++ b/builtin/game/falling.lua @@ -18,18 +18,6 @@ core.register_entity(":__builtin:falling_node", { set_node = function(self, node) self.node = node - local stack = ItemStack(node.name) - local itemtable = stack:to_table() - local itemname = nil - if itemtable then - itemname = stack:to_table().name - end - local item_texture = nil - local item_type = "" - if core.registered_items[itemname] then - item_texture = core.registered_items[itemname].inventory_image - item_type = core.registered_items[itemname].type - end local prop = { is_visible = true, textures = {node.name}, @@ -43,7 +31,9 @@ core.register_entity(":__builtin:falling_node", { on_activate = function(self, staticdata) self.object:set_armor_groups({immortal=1}) - self:set_node({name=staticdata}) + if staticdata then + self:set_node({name=staticdata}) + end end, on_step = function(self, dtime) |