Remove unused args.

This commit is contained in:
Diego Martínez 2017-03-01 07:31:48 -03:00 committed by Auke Kok
parent 5caacf3019
commit 196a6da26c
5 changed files with 19 additions and 19 deletions

View File

@ -58,10 +58,10 @@ minetest.register_node("digilines:chest", {
end,
after_place_node = tubescan,
after_dig_node = tubescan,
can_dig = function(pos, player)
can_dig = function(pos)
return minetest.get_meta(pos):get_inventory():is_empty("main")
end,
on_receive_fields = function(pos, formname, fields, sender)
on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
minetest.record_protection_violation(pos, name)
@ -74,7 +74,7 @@ minetest.register_node("digilines:chest", {
digiline = {
receptor = {},
effector = {
action = function(pos,node,channel,msg) end
action = function() end
}
},
tube = {
@ -83,10 +83,10 @@ minetest.register_node("digilines:chest", {
return not pipeworks.connects.facingFront(i,param2)
end,
input_inventory = "main",
can_insert = function(pos, node, stack, direction)
can_insert = function(pos, _, stack)
return can_insert(pos, stack)
end,
insert_object = function(pos, node, stack, direction)
insert_object = function(pos, _, stack)
local inv = minetest.get_meta(pos):get_inventory()
local leftover = inv:add_item("main", stack)
local count = leftover:get_count()
@ -108,16 +108,16 @@ minetest.register_node("digilines:chest", {
return leftover
end,
},
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
allow_metadata_inventory_put = function(pos, _, _, stack)
if not can_insert(pos, stack) then
sendMessage(pos,"uoverflow "..maybeString(stack))
end
return stack:get_count()
end,
on_metadata_inventory_move = function(pos, fromlistname, fromindex, tolistname, toindex, count, player)
on_metadata_inventory_move = function(pos, _, _, _, _, _, player)
minetest.log("action", player:get_player_name().." moves stuff in chest at "..minetest.pos_to_string(pos))
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
on_metadata_inventory_put = function(pos, _, _, stack, player)
local channel = minetest.get_meta(pos):get_string("channel")
local send = function(msg)
sendMessage(pos,msg,channel)
@ -132,7 +132,7 @@ minetest.register_node("digilines:chest", {
end
minetest.log("action", player:get_player_name().." puts stuff into chest at "..minetest.pos_to_string(pos))
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
on_metadata_inventory_take = function(pos, listname, _, stack, player)
local meta = minetest.get_meta(pos)
local channel = meta:get_string("channel")
local inv = meta:get_inventory()

View File

@ -140,7 +140,7 @@ local prepare_writing = function(pos)
return text
end
local on_digiline_receive = function(pos, node, channel, msg)
local on_digiline_receive = function(pos, _, channel, msg)
local meta = minetest.get_meta(pos)
local setchan = meta:get_string("channel")
if setchan ~= channel then return end
@ -173,7 +173,7 @@ minetest.register_node("digilines:lcd", {
selection_box = lcd_box,
groups = {choppy = 3, dig_immediate = 2},
after_place_node = function (pos, placer, itemstack)
after_place_node = function (pos)
local param2 = minetest.get_node(pos).param2
if param2 == 0 or param2 == 1 then
minetest.add_node(pos, {name = "digilines:lcd", param2 = 3})
@ -189,7 +189,7 @@ minetest.register_node("digilines:lcd", {
clearscreen(pos)
end,
on_receive_fields = function(pos, formname, fields, sender)
on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
minetest.record_protection_violation(pos, name)

View File

@ -21,7 +21,7 @@ local lsensor_selbox =
fixed = {{ -8/16, -8/16, -8/16, 8/16, -3/16, 8/16 }}
}
local on_digiline_receive = function (pos, node, channel, msg)
local on_digiline_receive = function (pos, _, channel, msg)
local setchan = minetest.get_meta(pos):get_string("channel")
if channel == setchan and msg == GET_COMMAND then
local lightval = minetest.get_node_light(pos)
@ -50,7 +50,7 @@ minetest.register_node("digilines:lightsensor", {
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[channel;Channel;${channel}]")
end,
on_receive_fields = function(pos, formname, fields, sender)
on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
minetest.record_protection_violation(pos, name)

View File

@ -16,7 +16,7 @@ local rtc_selbox =
fixed = {{ -8/16, -8/16, -8/16, 8/16, -3/16, 8/16 }}
}
local on_digiline_receive = function (pos, node, channel, msg)
local on_digiline_receive = function (pos, _, channel, msg)
local setchan = minetest.get_meta(pos):get_string("channel")
if channel == setchan and msg == GET_COMMAND then
local timeofday = minetest.get_timeofday()
@ -46,7 +46,7 @@ minetest.register_node("digilines:rtc", {
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[channel;Channel;${channel}]")
end,
on_receive_fields = function(pos, formname, fields, sender)
on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
minetest.record_protection_violation(pos, name)

View File

@ -22,9 +22,9 @@ function digilines.rotate_rules_left(rules)
local nr={}
for i, rule in ipairs(rules) do
nr[i]={}
nr[i].z=-rules[i].x
nr[i].x=rules[i].z
nr[i].y=rules[i].y
nr[i].z=-rule.x
nr[i].x=rule.z
nr[i].y=rule.y
end
return nr
end