78 lines
2.1 KiB
Lua
78 lines
2.1 KiB
Lua
local mortar_table_functions = simplecrafting_lib.generate_table_functions('pottery', {
|
|
show_guides = true,
|
|
alphabetize_items = true,}
|
|
)
|
|
|
|
local mortar_table_def = {
|
|
description = 'Pottery Wheel',
|
|
drawtype = 'mesh',
|
|
mesh = 'stations_pottery_wheel.obj',
|
|
tiles = {'stations_pottery_wheel.png'},
|
|
use_texture_alpha = 'opaque',
|
|
sounds = default.node_sound_wood_defaults(),
|
|
paramtype2 = 'facedir',
|
|
paramtype = 'light',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, -.5, .5, .5, .5}
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, -.5, .5, .5, .5}
|
|
},
|
|
groups = {oddly_breakable_by_hand = 1, choppy=3},
|
|
after_place_node = function(pos)
|
|
local meta = minetest.get_meta(pos)
|
|
meta:set_string('infotext', 'Pottery Wheel')
|
|
end,
|
|
}
|
|
for k, v in pairs(mortar_table_functions) do
|
|
mortar_table_def[k] = v
|
|
end
|
|
|
|
minetest.register_node('stations:pottery', mortar_table_def)
|
|
|
|
|
|
local mortar_locked_functions = simplecrafting_lib.generate_table_functions('pottery', {
|
|
show_guides = true,
|
|
alphabetize_items = true,
|
|
protect_inventory = true,}
|
|
)
|
|
|
|
local mortar_locked_def = {
|
|
description = 'Pottery Wheel (locked)',
|
|
drawtype = 'mesh',
|
|
mesh = 'stations_pottery_wheel.obj',
|
|
tiles = {'stations_pottery_wheel.png'},
|
|
use_texture_alpha = 'opaque',
|
|
sounds = default.node_sound_wood_defaults(),
|
|
paramtype2 = 'facedir',
|
|
paramtype = 'light',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, -.5, .5, .5, .5}
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, -.5, .5, .5, .5}
|
|
},
|
|
groups = {oddly_breakable_by_hand = 1, choppy=3},
|
|
after_place_node = function(pos)
|
|
local meta = minetest.get_meta(pos)
|
|
meta:set_string('infotext', 'Pottery Wheel (locked)')
|
|
end,
|
|
}
|
|
for k, v in pairs(mortar_locked_functions) do
|
|
mortar_locked_def[k] = v
|
|
end
|
|
|
|
minetest.register_node('stations:pottery_locked', mortar_locked_def)
|
|
|
|
unified_inventory.register_craft_type("pottery", {
|
|
description = "Pottery Wheel",
|
|
icon = 'stations_pottery_icon.png',
|
|
width = 4,
|
|
height = 2,
|
|
uses_crafting_grid = false
|
|
})
|