summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim <t4im@users.noreply.github.com>2015-02-03 15:35:44 +0100
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-02-03 14:46:45 -0500
commit50b417ce134a8549d4fa3a245babbcb30e0a9f34 (patch)
tree4c8d32145b25ec46dc4319eeff71257d334b8e41
parentf499f6a8c7d330a6a3e2282d03b797fbb71eff5e (diff)
downloadpipeworks-50b417ce134a8549d4fa3a245babbcb30e0a9f34.tar
pipeworks-50b417ce134a8549d4fa3a245babbcb30e0a9f34.tar.gz
pipeworks-50b417ce134a8549d4fa3a245babbcb30e0a9f34.tar.bz2
pipeworks-50b417ce134a8549d4fa3a245babbcb30e0a9f34.tar.xz
pipeworks-50b417ce134a8549d4fa3a245babbcb30e0a9f34.zip
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.
-rw-r--r--default_settings.txt1
-rw-r--r--routing_tubes.lua26
2 files changed, 27 insertions, 0 deletions
diff --git a/default_settings.txt b/default_settings.txt
index 4aa4150..a95038d 100644
--- a/default_settings.txt
+++ b/default_settings.txt
@@ -16,4 +16,5 @@ pipeworks.enable_crossing_tube = true
pipeworks.enable_sand_tube = true
pipeworks.enable_mese_sand_tube = true
pipeworks.enable_one_way_tube = true
+pipeworks.enable_priority_tube = true
pipeworks.enable_cyclic_mode = true
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",