Remove unused vars from table code, fix bug in copy cost calculation
This commit is contained in:
parent
dc8cc1e10b
commit
9e47171b30
@ -97,7 +97,7 @@ local function get_copy_material_cost(meta)
|
||||
local scale = smeta:get_int("cartographer:scale") or SCALE_SMALL;
|
||||
local detail = smeta:get_int("cartographer:detail") or 1;
|
||||
|
||||
return get_material_cost(size, detail - 1);
|
||||
return get_material_cost(scale, detail - 1);
|
||||
end
|
||||
|
||||
return {
|
||||
@ -575,7 +575,7 @@ minetest.register_node("cartographer:simple_table", {
|
||||
{-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375},
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
on_rightclick = function(_, _, player, _, pointed_thing)
|
||||
player_tables[player:get_player_name()] = {
|
||||
pos = minetest.get_pointed_thing_position(pointed_thing),
|
||||
tab = 1,
|
||||
@ -615,7 +615,7 @@ minetest.register_node("cartographer:standard_table", {
|
||||
{-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375},
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
on_rightclick = function(_, _, player, _, pointed_thing)
|
||||
player_tables[player:get_player_name()] = {
|
||||
pos = minetest.get_pointed_thing_position(pointed_thing),
|
||||
tab = 1,
|
||||
@ -655,7 +655,7 @@ minetest.register_node("cartographer:advanced_table", {
|
||||
{-0.5, -0.5, -0.375, 0.5, 0.6875, 0.375},
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
on_rightclick = function(_, _, player, _, pointed_thing)
|
||||
player_tables[player:get_player_name()] = {
|
||||
pos = minetest.get_pointed_thing_position(pointed_thing),
|
||||
tab = 1,
|
||||
|
Loading…
Reference in New Issue
Block a user