forked from mtcontrib/homedecor_modpack
Do not update signs on quit, and fix passing a nil value to format.
This commit is contained in:
parent
61a21e6c39
commit
d04eb1cdef
@ -462,7 +462,7 @@ if not homedecor.disable_signs then
|
|||||||
homedecor.destruct_sign(pos)
|
homedecor.destruct_sign(pos)
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
if fields then
|
if fields and (not fields.quit) and fields.text then
|
||||||
print(S("%s wrote \"%s\" to sign at %s"):format(
|
print(S("%s wrote \"%s\" to sign at %s"):format(
|
||||||
(sender:get_player_name() or ""),
|
(sender:get_player_name() or ""),
|
||||||
fields.text,
|
fields.text,
|
||||||
@ -499,7 +499,7 @@ minetest.register_node(":signs:sign_yard", {
|
|||||||
homedecor.destruct_sign(pos)
|
homedecor.destruct_sign(pos)
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
if fields then
|
if fields and (not fields.quit) and fields.text then
|
||||||
print(S("%s wrote \"%s\" to sign at %s"):format(
|
print(S("%s wrote \"%s\" to sign at %s"):format(
|
||||||
(sender:get_player_name() or ""),
|
(sender:get_player_name() or ""),
|
||||||
fields.text,
|
fields.text,
|
||||||
@ -622,7 +622,7 @@ function homedecor.register_fence_with_sign(fencename, fencewithsignname)
|
|||||||
homedecor.destruct_sign(pos)
|
homedecor.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 then
|
if fields and (not fields.quit) and fields.text then
|
||||||
print(S("%s wrote \"%s\" to sign at %s"):format(
|
print(S("%s wrote \"%s\" to sign at %s"):format(
|
||||||
(sender:get_player_name() or ""),
|
(sender:get_player_name() or ""),
|
||||||
fields.text,
|
fields.text,
|
||||||
|
Loading…
Reference in New Issue
Block a user