2019-05-05 23:29:00 +03:00
|
|
|
--[[
|
|
|
|
|
|
|
|
TechAge
|
|
|
|
=======
|
|
|
|
|
|
|
|
Copyright (C) 2019 Joachim Stolberg
|
|
|
|
|
2019-08-22 21:49:47 +03:00
|
|
|
GPL v3
|
2019-05-05 23:29:00 +03:00
|
|
|
See LICENSE.txt for more information
|
|
|
|
|
|
|
|
TA3 Coal Power Station Boiler Base
|
|
|
|
|
|
|
|
]]--
|
|
|
|
|
|
|
|
-- for lazy programmers
|
|
|
|
local M = minetest.get_meta
|
2019-07-02 22:33:12 +03:00
|
|
|
local S = techage.S
|
2019-05-05 23:29:00 +03:00
|
|
|
|
|
|
|
local Pipe = techage.SteamPipe
|
|
|
|
|
|
|
|
minetest.register_node("techage:coalboiler_base", {
|
2019-07-02 22:33:12 +03:00
|
|
|
description = S("TA3 Boiler Base"),
|
2019-05-05 23:29:00 +03:00
|
|
|
tiles = {"techage_coal_boiler_mesh_base.png"},
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "techage_boiler_large.obj",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-13/32, -16/32, -13/32, 13/32, 16/32, 13/32},
|
|
|
|
},
|
|
|
|
|
2019-05-21 17:37:05 +03:00
|
|
|
on_construct = tubelib2.init_mem,
|
2019-05-05 23:29:00 +03:00
|
|
|
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
on_rotate = screwdriver.disallow,
|
|
|
|
groups = {cracky=2},
|
|
|
|
is_ground_content = false,
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
2019-05-21 17:37:05 +03:00
|
|
|
techage.power.register_node({"techage:coalboiler_base"}, {
|
|
|
|
conn_sides = {"F"},
|
|
|
|
power_network = Pipe,
|
|
|
|
})
|
2019-05-05 23:29:00 +03:00
|
|
|
|
2019-06-08 23:57:01 +03:00
|
|
|
-- for logical communication
|
|
|
|
techage.register_node({"techage:coalboiler_base"}, {
|
|
|
|
on_transfer = function(pos, in_dir, topic, payload)
|
|
|
|
if topic == "start" then
|
|
|
|
return true
|
|
|
|
elseif topic == "stop" then
|
|
|
|
return true
|
2019-06-16 22:06:16 +03:00
|
|
|
elseif topic == "running" then
|
|
|
|
return true
|
2019-06-08 23:57:01 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
2019-05-05 23:29:00 +03:00
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "techage:coalboiler_base",
|
|
|
|
recipe = {
|
|
|
|
{"default:stone", "", "default:stone"},
|
|
|
|
{"techage:iron_ingot", "", "techage:iron_ingot"},
|
|
|
|
{"default:stone", "default:stone", "default:stone"},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2019-07-02 22:33:12 +03:00
|
|
|
techage.register_entry_page("ta3ps", "coalboiler_base",
|
|
|
|
S("TA3 Boiler Base"),
|
2019-07-06 21:23:11 +03:00
|
|
|
S("Part of the Power Station. Has to be placed on top of the TA3 Power Station Firebox and filled with water.@n"..
|
|
|
|
"(see TA3 Power Station)"),
|
2019-07-02 22:33:12 +03:00
|
|
|
"techage:coalboiler_base")
|