forked from mtcontrib/homedecor_modpack
Fix signs logging for real now.
This commit is contained in:
parent
287559ac97
commit
7bf1c43c2d
@ -506,7 +506,7 @@ minetest.register_node(":default:sign_wall", {
|
|||||||
signs_lib.destruct_sign(pos)
|
signs_lib.destruct_sign(pos)
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
if fields and (not fields.quit) and fields.text then
|
if fields and fields.text then
|
||||||
minetest.log("action", S("%s wrote \"%s\" to sign at %s"):format(
|
minetest.log("action", S("%s wrote \"%s\" to sign at %s"):format(
|
||||||
(sender:get_player_name() or ""),
|
(sender:get_player_name() or ""),
|
||||||
fields.text,
|
fields.text,
|
||||||
@ -518,7 +518,9 @@ minetest.register_node(":default:sign_wall", {
|
|||||||
sender:get_player_name())
|
sender:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
signs_lib.update_sign(pos, fields)
|
if fields and fields.text then
|
||||||
|
signs_lib.update_sign(pos, fields)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos)
|
||||||
@ -546,7 +548,7 @@ minetest.register_node(":signs:sign_yard", {
|
|||||||
signs_lib.destruct_sign(pos)
|
signs_lib.destruct_sign(pos)
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
if fields and (not fields.quit) and fields.text then
|
if fields and fields.text then
|
||||||
minetest.log("action", S("%s wrote \"%s\" to sign at %s"):format(
|
minetest.log("action", S("%s wrote \"%s\" to sign at %s"):format(
|
||||||
(sender:get_player_name() or ""),
|
(sender:get_player_name() or ""),
|
||||||
fields.text,
|
fields.text,
|
||||||
@ -558,7 +560,9 @@ minetest.register_node(":signs:sign_yard", {
|
|||||||
sender:get_player_name())
|
sender:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
signs_lib.update_sign(pos, fields)
|
if fields and fields.text then
|
||||||
|
signs_lib.update_sign(pos, fields)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos)
|
||||||
@ -676,7 +680,7 @@ function signs_lib.register_fence_with_sign(fencename, fencewithsignname)
|
|||||||
signs_lib.destruct_sign(pos)
|
signs_lib.destruct_sign(pos)
|
||||||
end
|
end
|
||||||
def_sign.on_receive_fields = function(pos, formname, fields, sender, ...)
|
def_sign.on_receive_fields = function(pos, formname, fields, sender, ...)
|
||||||
if fields and (not fields.quit) and fields.text then
|
if fields and fields.text then
|
||||||
minetest.log("action", S("%s wrote \"%s\" to sign at %s"):format(
|
minetest.log("action", S("%s wrote \"%s\" to sign at %s"):format(
|
||||||
(sender:get_player_name() or ""),
|
(sender:get_player_name() or ""),
|
||||||
fields.text,
|
fields.text,
|
||||||
@ -688,7 +692,9 @@ function signs_lib.register_fence_with_sign(fencename, fencewithsignname)
|
|||||||
sender:get_player_name())
|
sender:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
signs_lib.update_sign(pos, fields)
|
if fields and fields.text then
|
||||||
|
signs_lib.update_sign(pos, fields)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
def_sign.on_punch = function(pos, node, puncher, ...)
|
def_sign.on_punch = function(pos, node, puncher, ...)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user