2018-04-08 14:11:39 +00:00
|
|
|
-- holostorage controller
|
2018-04-07 15:27:34 +00:00
|
|
|
|
2018-04-08 14:11:39 +00:00
|
|
|
minetest.register_node("holostorage:controller", {
|
2018-04-07 15:27:34 +00:00
|
|
|
description = "Storage Controller",
|
2018-04-08 14:11:39 +00:00
|
|
|
tiles = {"holostorage_controller.png"},
|
2018-04-07 15:27:34 +00:00
|
|
|
on_construct = function (pos)
|
|
|
|
local meta = minetest.get_meta(pos)
|
|
|
|
meta:set_string("infotext", "Storage Controller")
|
|
|
|
meta:set_string("active", 1)
|
|
|
|
meta:set_string("channel", "controller"..minetest.pos_to_string(pos))
|
2018-04-08 14:11:39 +00:00
|
|
|
minetest.swap_node(pos, {name="holostorage:controller_active"})
|
2018-04-07 15:27:34 +00:00
|
|
|
local poshash = minetest.hash_node_position(pos)
|
2018-04-08 14:11:39 +00:00
|
|
|
holostorage.network.redundant_warn[poshash] = nil
|
2018-04-07 15:27:34 +00:00
|
|
|
end,
|
|
|
|
after_dig_node = function(pos)
|
|
|
|
minetest.forceload_free_block(pos)
|
|
|
|
pos.y = pos.y - 1
|
|
|
|
minetest.forceload_free_block(pos)
|
|
|
|
local poshash = minetest.hash_node_position(pos)
|
|
|
|
technic.redundant_warn[poshash] = nil
|
|
|
|
end,
|
|
|
|
groups = {
|
|
|
|
cracky = 1,
|
2018-04-08 14:11:39 +00:00
|
|
|
holostorage_controller = 1
|
2018-04-07 15:27:34 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2018-04-08 14:11:39 +00:00
|
|
|
minetest.register_node("holostorage:controller_active", {
|
2018-04-07 15:27:34 +00:00
|
|
|
description = "Storage Controller",
|
|
|
|
tiles = {
|
|
|
|
{
|
2018-04-08 14:11:39 +00:00
|
|
|
name = "holostorage_controller_animated.png",
|
2018-04-07 15:27:34 +00:00
|
|
|
animation = {
|
|
|
|
type = "vertical_frames",
|
|
|
|
aspect_w = 16,
|
|
|
|
aspect_h = 16,
|
|
|
|
length = 5.0,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
2018-04-08 14:25:50 +00:00
|
|
|
paramtype = "light",
|
|
|
|
light_source = 8,
|
2018-04-08 14:11:39 +00:00
|
|
|
drop = "holostorage:controller",
|
2018-04-07 15:27:34 +00:00
|
|
|
groups = {
|
|
|
|
cracky = 1,
|
|
|
|
not_in_creative_inventory = 1,
|
2018-04-08 14:11:39 +00:00
|
|
|
holostorage_controller = 1
|
2018-04-07 15:27:34 +00:00
|
|
|
}
|
|
|
|
})
|