diff options
author | Dániel Juhász <juhdanad@gmail.com> | 2017-06-20 09:19:56 +0000 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2018-06-03 17:31:59 +0200 |
commit | 322e5aaf9285e9686101393967f1a3c1e7db986c (patch) | |
tree | 27333ec46921d624cbe96b3d082a0cf189239e90 /builtin/game/falling.lua | |
parent | 03bc584f5738e21ef6c07e7c0928d0083be9995e (diff) | |
download | minetest-322e5aaf9285e9686101393967f1a3c1e7db986c.tar.gz minetest-322e5aaf9285e9686101393967f1a3c1e7db986c.tar.bz2 minetest-322e5aaf9285e9686101393967f1a3c1e7db986c.zip |
Automatic item and node colorization (#5640)
* Automatic item and node colorization
Now nodes with a palette yield colored item stacks, and colored items
place colored nodes by default. The client predicts the colorization.
* Backwards compatibility
* Use nil
* Style fixes
* Fix code style
* Document changes
Diffstat (limited to 'builtin/game/falling.lua')
-rw-r--r-- | builtin/game/falling.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua index b1beb1ab0..1ac4f7081 100644 --- a/builtin/game/falling.lua +++ b/builtin/game/falling.lua @@ -93,7 +93,7 @@ core.register_entity(":__builtin:falling_node", { core.remove_node(np) if nd and nd.buildable_to == false then -- Add dropped items - local drops = core.get_node_drops(n2.name, "") + local drops = core.get_node_drops(n2, "") for _, dropped_item in pairs(drops) do core.add_item(np, dropped_item) end @@ -145,9 +145,9 @@ function core.spawn_falling_node(pos) end local function drop_attached_node(p) - local nn = core.get_node(p).name + local n = core.get_node(p) core.remove_node(p) - for _, item in pairs(core.get_node_drops(nn, "")) do + for _, item in pairs(core.get_node_drops(n, "")) do local pos = { x = p.x + math.random()/2 - 0.25, y = p.y + math.random()/2 - 0.25, |