summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-02-07 12:42:18 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-02-07 12:42:18 -0500
commit5ac93cccc9163a65e7e53e714f5e965ada2c070d (patch)
tree07135d5d9751b2c0cf1e4dc77cec2769c4a18db7
parentcbfeb0192c7ae4e13b6833c00b7115a7157c5d1d (diff)
simplify pipeworks tube detect
deMorgan's axiom, which I suck at using :P
-rw-r--r--technic/machines/register/battery_box.lua4
-rw-r--r--technic/machines/register/generator.lua4
-rw-r--r--technic/machines/register/machine_base.lua4
3 files changed, 6 insertions, 6 deletions
diff --git a/technic/machines/register/battery_box.lua b/technic/machines/register/battery_box.lua
index 244a0bc..55dc4a7 100644
--- a/technic/machines/register/battery_box.lua
+++ b/technic/machines/register/battery_box.lua
@@ -195,8 +195,8 @@ function technic.register_battery_box(data)
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
- after_place_node = (not tube) or pipeworks.after_place,
- after_dig_node = (not tube) or pipeworks.after_dig
+ after_place_node = tube and pipeworks.after_place,
+ after_dig_node = tube and pipeworks.after_dig
})
end
diff --git a/technic/machines/register/generator.lua b/technic/machines/register/generator.lua
index ffeaf55..719dc93 100644
--- a/technic/machines/register/generator.lua
+++ b/technic/machines/register/generator.lua
@@ -109,8 +109,8 @@ function technic.register_generator(data)
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
- after_place_node = (not tube) or pipeworks.after_place,
- after_dig_node = (not tube) or pipeworks.after_dig
+ after_place_node = tube and pipeworks.after_place,
+ after_dig_node = tube and pipeworks.after_dig
})
minetest.register_node("technic:"..ltier.."_generator_active", {
diff --git a/technic/machines/register/machine_base.lua b/technic/machines/register/machine_base.lua
index c76f576..9cdcce9 100644
--- a/technic/machines/register/machine_base.lua
+++ b/technic/machines/register/machine_base.lua
@@ -153,8 +153,8 @@ function technic.register_base_machine(data)
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
- after_place_node = (not tube) or pipeworks.after_place,
- after_dig_node = (not tube) or pipeworks.after_dig
+ after_place_node = tube and pipeworks.after_place,
+ after_dig_node = tube and pipeworks.after_dig
})
minetest.register_node("technic:"..ltier.."_"..machine_name.."_active",{