Line 915 of minetest_game\mods\default\nodes.lua not needed

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

Line 915 of minetest_game\mods\default\nodes.lua not needed

by LionsDen » Thu Aug 08, 2013 23:38

Line 915 of the nodes.lua from the minetest_game mode is a copy of a line a few lines above and as far as I can tell does nothing new. I tested the code in a little mod I made and it doesn't seem to matter if it is there or not. The line is:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local meta0 = meta:to_table()


It is part of the hacky_swap_node function. If it does do something and I'm just not seeing it could someone please tell me what because all I see is a copy of line 910 with no changes to the variables in between.
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Fri Aug 09, 2013 12:27

It seems to be there two times.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
function hacky_swap_node(pos,name)
    local node = minetest.get_node(pos)
    local meta = minetest.get_meta(pos)
    local meta0 = meta:to_table() -- here
    if node.name == name then
        return
    end
    node.name = name
    local meta0 = meta:to_table() -- here
    minetest.set_node(pos,node)
    meta = minetest.get_meta(pos)
    meta:from_table(meta0)
end
Last edited by Casimir on Fri Aug 09, 2013 12:27, edited 1 time in total.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 5 guests

cron