123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- local anvil_table_functions = simplecrafting_lib.generate_table_functions('anvil', {
- show_guides = true,
- alphabetize_items = true,
- --active_node = 'stations:anvil1',
- })
- --[[local anvil_multifurnace0_def = { --off furnace
- description = 'Tool Repair Station',
- drawtype = 'mesh',
- mesh = 'stations_anvil.obj',
- tiles = {'stations_anvil_rust.png', 'stations_anvil_default.png', 'stations_anvil.png'},
- sounds = default.node_sound_wood_defaults(),
- paramtype2 = 'facedir',
- paramtype = 'light',
- selection_box = {
- type = 'fixed',
- fixed = {
- {1.5, -.5, -.375, -.44, 0, .4},
- {1.1, .1, 0, .38, .5, .38},
- }
- },
- collision_box = {
- type = 'fixed',
- fixed = {
- {1.5, -.5, -.375, -.44, 0, .4},
- {1.1, .1, 0, .38, .5, .38},
- }
- },
- groups = {oddly_breakable_by_hand = 1, choppy=3},
- }
- --]]
- local anvil_multifurnace_def = { --on furnace
- description = 'Smithy Station',
- drawtype = 'mesh',
- mesh = 'stations_anvil.obj',
- tiles = {'stations_anvil.png'},
- use_texture_alpha = 'opaque',
- sounds = default.node_sound_wood_defaults(),
- paramtype2 = 'facedir',
- paramtype = 'light',
- selection_box = {
- type = 'fixed',
- fixed = {
- {1.5, -.5, -.375, -.44, 0, .4},
- {1.1, .1, 0, .38, .5, .38},
- }
- },
- collision_box = {
- type = 'fixed',
- fixed = {
- {1.5, -.5, -.375, -.44, 0, .4},
- {1.1, .1, 0, .38, .5, .38},
- }
- },
- groups = {oddly_breakable_by_hand = 1, choppy=3},
- after_place_node = function(pos, placer, itemstack)
- if not epic.space_to_side(pos) then
- minetest.remove_node(pos)
- return itemstack
- end
- local meta = minetest.get_meta(pos)
- meta:set_string('infotext', 'Smithy Station')
- end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- epic.remove_side_node(pos, oldnode)
- end,
- on_rotate = function(pos, node)
- return false
- end,
- }
- for k, v in pairs(anvil_table_functions) do
- --anvil_multifurnace0_def[k] = v
- anvil_multifurnace_def[k] = v
- end
- --minetest.register_node('stations:anvil0', anvil_multifurnace0_def)
- minetest.register_node('stations:anvil1', anvil_multifurnace_def)
- local anvil_locked_table_functions = simplecrafting_lib.generate_table_functions('anvil', {
- show_guides = true,
- alphabetize_items = true,
- protect_inventory = true,
- })
- local anvil_locked_multifurnace_def = {
- description = 'Smithy Station (locked)',
- drawtype = 'mesh',
- mesh = 'stations_anvil.obj',
- tiles = {'stations_anvil.png'},
- use_texture_alpha = 'opaque',
- sounds = default.node_sound_wood_defaults(),
- paramtype2 = 'facedir',
- paramtype = 'light',
- selection_box = {
- type = 'fixed',
- fixed = {
- {1.5, -.5, -.375, -.44, 0, .4},
- {1.1, .1, 0, .38, .5, .38},
- }
- },
- collision_box = {
- type = 'fixed',
- fixed = {
- {1.5, -.5, -.375, -.44, 0, .4},
- {1.1, .1, 0, .38, .5, .38},
- }
- },
- groups = {oddly_breakable_by_hand = 1, choppy=3},
- after_place_node = function(pos, placer, itemstack)
- if not epic.space_to_side(pos) then
- minetest.remove_node(pos)
- return itemstack
- end
- local meta = minetest.get_meta(pos)
- meta:set_string('infotext', 'Smithy Station (locked)')
- end,
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- epic.remove_side_node(pos, oldnode)
- end,
- on_rotate = function(pos, node)
- return false
- end,
- }
- for k, v in pairs(anvil_locked_table_functions) do
- anvil_locked_multifurnace_def[k] = v
- end
- --minetest.register_node('stations:anvil0', anvil_multifurnace0_def)
- minetest.register_node('stations:anvil_locked', anvil_locked_multifurnace_def)
- unified_inventory.register_craft_type("anvil", {
- description = "Smithy Station",
- icon = 'stations_anvil_icon.png',
- width = 4,
- height = 2,
- uses_crafting_grid = false
- })
|