From 50b417ce134a8549d4fa3a245babbcb30e0a9f34 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 3 Feb 2015 15:35:44 +0100 Subject: Add the High Priority tube segment that can be used as replacement of sorting tubes where they are only used to deactivate paths. The Priority tube uses as less cpu as the default tube, is easier to maintain as well as cheaper as the sorting tube. --- routing_tubes.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'routing_tubes.lua') diff --git a/routing_tubes.lua b/routing_tubes.lua index 831dbd3..c629e2a 100644 --- a/routing_tubes.lua +++ b/routing_tubes.lua @@ -9,6 +9,32 @@ minetest.register_craft( { }, }) +-- the high priority tube is a low-cpu replacement for sorting tubes in situations +-- where players would use them for simple routing (turning off paths) +-- without doing actual sorting, like at outputs of tubedevices that might both accept and eject items +if pipeworks.enable_priority_tube then + local color = "#ff3030:128" + pipeworks.register_tube("pipeworks:priority_tube", { + description = "High Priority Tube Segment", + inventory_image = "pipeworks_tube_inv.png^[colorize:" .. color, + plain = { "pipeworks_tube_plain.png^[colorize:" .. color }, + noctr = { "pipeworks_tube_noctr.png^[colorize:" .. color }, + ends = { "pipeworks_tube_end.png^[colorize:" .. color }, + short = "pipeworks_tube_tube_short.png^[colorize:" .. color, + node_def = { + tube = { priority = 150 } -- higher than tubedevices (100) + }, + }) + minetest.register_craft( { + output = "pipeworks:priority_tube_1 6", + recipe = { + { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }, + { "default:gold_ingot", "", "default:gold_ingot" }, + { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" } + }, + }) +end + if pipeworks.enable_accelerator_tube then pipeworks.register_tube("pipeworks:accelerator_tube", { description = "Accelerating Pneumatic Tube Segment", -- cgit v1.2.3