Improve mapgen, add grass, and include the fill tool.
This commit is contained in:
parent
1e897665bb
commit
4659a008ac
86 changed files with 1098 additions and 293 deletions
30
mods/rgt_workbench/init.lua
Normal file
30
mods/rgt_workbench/init.lua
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
local ns = rgt
|
||||
|
||||
|
||||
rgt.register_node("workbench", {
|
||||
on_construct = function()
|
||||
|
||||
end,
|
||||
on_rightclick = function(pos, node, p)
|
||||
local name = p:get_player_name()
|
||||
local fs = {
|
||||
"formspec_version[10]\
|
||||
size[12,11]\
|
||||
",
|
||||
ui.list("current_player", "main", 1.125, 5.5, 8, 4),
|
||||
ui.list("current_player", "craft", 2, 1, 3, 3),
|
||||
"listring[]\n",
|
||||
ui.list("current_player", "craftpreview", 6, 2.1, 1, 1)
|
||||
}
|
||||
rgt.players[name].inv:set_craft_grid_size(3)
|
||||
minetest.show_formspec(name, "workbench", table.concat(fs))
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
minetest.register_on_player_receive_fields(function(p, form, data)
|
||||
if form == "workbench" and data.quit then
|
||||
local name = p:get_player_name()
|
||||
rgt.players[name].inv:set_craft_grid_size(2)
|
||||
end
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue