forked from Mirrorlandia_minetest/digilines
Remove unused args.
This commit is contained in:
parent
5caacf3019
commit
196a6da26c
@ -58,10 +58,10 @@ minetest.register_node("digilines:chest", {
|
|||||||
end,
|
end,
|
||||||
after_place_node = tubescan,
|
after_place_node = tubescan,
|
||||||
after_dig_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")
|
return minetest.get_meta(pos):get_inventory():is_empty("main")
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, _, fields, sender)
|
||||||
local name = sender:get_player_name()
|
local name = sender:get_player_name()
|
||||||
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
minetest.record_protection_violation(pos, name)
|
minetest.record_protection_violation(pos, name)
|
||||||
@ -74,7 +74,7 @@ minetest.register_node("digilines:chest", {
|
|||||||
digiline = {
|
digiline = {
|
||||||
receptor = {},
|
receptor = {},
|
||||||
effector = {
|
effector = {
|
||||||
action = function(pos,node,channel,msg) end
|
action = function() end
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tube = {
|
tube = {
|
||||||
@ -83,10 +83,10 @@ minetest.register_node("digilines:chest", {
|
|||||||
return not pipeworks.connects.facingFront(i,param2)
|
return not pipeworks.connects.facingFront(i,param2)
|
||||||
end,
|
end,
|
||||||
input_inventory = "main",
|
input_inventory = "main",
|
||||||
can_insert = function(pos, node, stack, direction)
|
can_insert = function(pos, _, stack)
|
||||||
return can_insert(pos, stack)
|
return can_insert(pos, stack)
|
||||||
end,
|
end,
|
||||||
insert_object = function(pos, node, stack, direction)
|
insert_object = function(pos, _, stack)
|
||||||
local inv = minetest.get_meta(pos):get_inventory()
|
local inv = minetest.get_meta(pos):get_inventory()
|
||||||
local leftover = inv:add_item("main", stack)
|
local leftover = inv:add_item("main", stack)
|
||||||
local count = leftover:get_count()
|
local count = leftover:get_count()
|
||||||
@ -108,16 +108,16 @@ minetest.register_node("digilines:chest", {
|
|||||||
return leftover
|
return leftover
|
||||||
end,
|
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
|
if not can_insert(pos, stack) then
|
||||||
sendMessage(pos,"uoverflow "..maybeString(stack))
|
sendMessage(pos,"uoverflow "..maybeString(stack))
|
||||||
end
|
end
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
end,
|
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))
|
minetest.log("action", player:get_player_name().." moves stuff in chest at "..minetest.pos_to_string(pos))
|
||||||
end,
|
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 channel = minetest.get_meta(pos):get_string("channel")
|
||||||
local send = function(msg)
|
local send = function(msg)
|
||||||
sendMessage(pos,msg,channel)
|
sendMessage(pos,msg,channel)
|
||||||
@ -132,7 +132,7 @@ minetest.register_node("digilines:chest", {
|
|||||||
end
|
end
|
||||||
minetest.log("action", player:get_player_name().." puts stuff into chest at "..minetest.pos_to_string(pos))
|
minetest.log("action", player:get_player_name().." puts stuff into chest at "..minetest.pos_to_string(pos))
|
||||||
end,
|
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 meta = minetest.get_meta(pos)
|
||||||
local channel = meta:get_string("channel")
|
local channel = meta:get_string("channel")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
6
lcd.lua
6
lcd.lua
@ -140,7 +140,7 @@ local prepare_writing = function(pos)
|
|||||||
return text
|
return text
|
||||||
end
|
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 meta = minetest.get_meta(pos)
|
||||||
local setchan = meta:get_string("channel")
|
local setchan = meta:get_string("channel")
|
||||||
if setchan ~= channel then return end
|
if setchan ~= channel then return end
|
||||||
@ -173,7 +173,7 @@ minetest.register_node("digilines:lcd", {
|
|||||||
selection_box = lcd_box,
|
selection_box = lcd_box,
|
||||||
groups = {choppy = 3, dig_immediate = 2},
|
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
|
local param2 = minetest.get_node(pos).param2
|
||||||
if param2 == 0 or param2 == 1 then
|
if param2 == 0 or param2 == 1 then
|
||||||
minetest.add_node(pos, {name = "digilines:lcd", param2 = 3})
|
minetest.add_node(pos, {name = "digilines:lcd", param2 = 3})
|
||||||
@ -189,7 +189,7 @@ minetest.register_node("digilines:lcd", {
|
|||||||
clearscreen(pos)
|
clearscreen(pos)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, _, fields, sender)
|
||||||
local name = sender:get_player_name()
|
local name = sender:get_player_name()
|
||||||
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
minetest.record_protection_violation(pos, name)
|
minetest.record_protection_violation(pos, name)
|
||||||
|
@ -21,7 +21,7 @@ local lsensor_selbox =
|
|||||||
fixed = {{ -8/16, -8/16, -8/16, 8/16, -3/16, 8/16 }}
|
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")
|
local setchan = minetest.get_meta(pos):get_string("channel")
|
||||||
if channel == setchan and msg == GET_COMMAND then
|
if channel == setchan and msg == GET_COMMAND then
|
||||||
local lightval = minetest.get_node_light(pos)
|
local lightval = minetest.get_node_light(pos)
|
||||||
@ -50,7 +50,7 @@ minetest.register_node("digilines:lightsensor", {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, _, fields, sender)
|
||||||
local name = sender:get_player_name()
|
local name = sender:get_player_name()
|
||||||
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
minetest.record_protection_violation(pos, name)
|
minetest.record_protection_violation(pos, name)
|
||||||
|
4
rtc.lua
4
rtc.lua
@ -16,7 +16,7 @@ local rtc_selbox =
|
|||||||
fixed = {{ -8/16, -8/16, -8/16, 8/16, -3/16, 8/16 }}
|
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")
|
local setchan = minetest.get_meta(pos):get_string("channel")
|
||||||
if channel == setchan and msg == GET_COMMAND then
|
if channel == setchan and msg == GET_COMMAND then
|
||||||
local timeofday = minetest.get_timeofday()
|
local timeofday = minetest.get_timeofday()
|
||||||
@ -46,7 +46,7 @@ minetest.register_node("digilines:rtc", {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, _, fields, sender)
|
||||||
local name = sender:get_player_name()
|
local name = sender:get_player_name()
|
||||||
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
minetest.record_protection_violation(pos, name)
|
minetest.record_protection_violation(pos, name)
|
||||||
|
6
util.lua
6
util.lua
@ -22,9 +22,9 @@ function digilines.rotate_rules_left(rules)
|
|||||||
local nr={}
|
local nr={}
|
||||||
for i, rule in ipairs(rules) do
|
for i, rule in ipairs(rules) do
|
||||||
nr[i]={}
|
nr[i]={}
|
||||||
nr[i].z=-rules[i].x
|
nr[i].z=-rule.x
|
||||||
nr[i].x=rules[i].z
|
nr[i].x=rule.z
|
||||||
nr[i].y=rules[i].y
|
nr[i].y=rule.y
|
||||||
end
|
end
|
||||||
return nr
|
return nr
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user