Minor change
This commit is contained in:
parent
a975cb30fc
commit
ccb678a33a
@ -8,6 +8,22 @@ local function formspec(pos)
|
||||
return table.concat(t)
|
||||
end
|
||||
|
||||
local function after_place_node(pos, placer)
|
||||
local meta = core.get_meta(pos)
|
||||
meta:set_string("text", "Edit text.")
|
||||
meta:set_string("infotext", "Edit text.")
|
||||
meta:set_string("formspec", formspec(pos))
|
||||
end
|
||||
|
||||
local function on_receive_fields(pos, formname, fields, player)
|
||||
if fields.settext then
|
||||
local text = fields.settext
|
||||
local meta = core.get_meta(pos)
|
||||
meta:set_string("text", text)
|
||||
meta:set_string("infotext", text)
|
||||
end
|
||||
end
|
||||
|
||||
PyuTest.make_sign = function (name, desc, craftitem, texture, groups, extra)
|
||||
core.register_node(name, PyuTest.util.tableconcat({
|
||||
description = Translate(desc),
|
||||
@ -21,25 +37,13 @@ PyuTest.make_sign = function (name, desc, craftitem, texture, groups, extra)
|
||||
|
||||
groups = PyuTest.util.tableconcat(groups, {
|
||||
block = 0,
|
||||
sign = 1
|
||||
sign = 1,
|
||||
attached_node = 3,
|
||||
}),
|
||||
tiles = texture,
|
||||
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = core.get_meta(pos)
|
||||
meta:set_string("text", "Edit text.")
|
||||
meta:set_string("infotext", "Edit text.")
|
||||
meta:set_string("formspec", formspec(pos))
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
if fields.settext then
|
||||
local text = fields.settext
|
||||
local meta = core.get_meta(pos)
|
||||
meta:set_string("text", text)
|
||||
meta:set_string("infotext", text)
|
||||
end
|
||||
end
|
||||
after_place_node = after_place_node,
|
||||
on_receive_fields = on_receive_fields,
|
||||
}, extra or {}))
|
||||
|
||||
if craftitem ~= nil then
|
||||
|
@ -162,7 +162,7 @@ PyuTest.register_overworld_biome = function(name, type, opts, only_base)
|
||||
nopts["_enable_beaches"] = true
|
||||
end
|
||||
|
||||
local y_min = (nopts["_enable_beaches"] and not only_base) and nopts["y_min"] + 2 or nopts["y_min"]
|
||||
local y_min = (nopts["_enable_beaches"] and not only_base) and (nopts["y_min"] + 2) or nopts["y_min"]
|
||||
|
||||
core.register_biome(PyuTest.util.tableconcat(nopts, {
|
||||
_pyutest_biome_type = type,
|
||||
|
Loading…
x
Reference in New Issue
Block a user