techage_modpack/techage/basis/tube_wall_entry.lua

58 lines
1.3 KiB
Lua
Raw Normal View History

2020-05-31 23:31:18 +03:00
--[[
TechAge
=======
Copyright (C) 2019-2020 Joachim Stolberg
2020-10-25 23:32:47 +03:00
AGPL v3
2020-05-31 23:31:18 +03:00
See LICENSE.txt for more information
2022-01-04 21:43:30 +03:00
2020-05-31 23:31:18 +03:00
Tube wall entry
]]--
local S = techage.S
local Tube = techage.Tube
minetest.register_node("techage:tube_wall_entry", {
description = S("Tube Wall Entry"),
tiles = {
-- up, down, right, left, back, front
"basic_materials_concrete_block.png",
"basic_materials_concrete_block.png",
"basic_materials_concrete_block.png",
"basic_materials_concrete_block.png",
"basic_materials_concrete_block.png^techage_tube_hole.png",
"basic_materials_concrete_block.png^techage_tube_hole.png",
},
2022-01-04 21:43:30 +03:00
2020-05-31 23:31:18 +03:00
after_place_node = function(pos, placer, itemstack, pointed_thing)
if not Tube:after_place_tube(pos, placer, pointed_thing) then
minetest.remove_node(pos)
return true
end
return false
end,
2022-01-04 21:43:30 +03:00
2020-05-31 23:31:18 +03:00
after_dig_node = function(pos, oldnode, oldmetadata, digger)
Tube:after_dig_tube(pos, oldnode, oldmetadata)
end,
2022-01-04 21:43:30 +03:00
2020-05-31 23:31:18 +03:00
paramtype2 = "facedir", -- important!
on_rotate = screwdriver.disallow, -- important!
groups = {crumbly = 2, cracky = 2, snappy = 2},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = "techage:tube_wall_entry",
recipe = {
{"", "techage:tubeS", ""},
{"", "basic_materials:concrete_block", ""},
{"", "",""},
},
})