summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--WHISKERS75_README9
-rw-r--r--mesecons/settings.lua2
-rw-r--r--mesecons_temperest/init.lua30
-rw-r--r--mesecons_temperest/textures/whiskers75andblock.pngbin0 -> 364 bytes
-rw-r--r--mesecons_whiskers75/depends.txt3
-rw-r--r--mesecons_whiskers75/init.lua27
-rw-r--r--mesecons_whiskers75/textures/Untitled.xcfbin821 -> 0 bytes
-rw-r--r--mesecons_whiskers75/textures/whiskers75andblock.pngbin242 -> 0 bytes
8 files changed, 40 insertions, 31 deletions
diff --git a/WHISKERS75_README b/WHISKERS75_README
new file mode 100644
index 0000000..3511ef7
--- /dev/null
+++ b/WHISKERS75_README
@@ -0,0 +1,9 @@
+README for Whiskers75's contributions
+-------------------------------------
+
+1: You need Temperest's code enabled (ENABLE_TEMPEREST=1 in settings.lua).
+2: To work it, place mesecons (on) in the position x plus or minus 1 from the block.
+3: Then punch, and off mesecons in the position y plus or minus 1 from the block will be powered.
+4: Currently, you will have to dig the mesecons in the above positions up if the circuit changes, but that will be fixed.
+5: The name of the block is mesecons_temperest:andblock.
+6: Enjoy!
diff --git a/mesecons/settings.lua b/mesecons/settings.lua
index c68c2a8..7366e3b 100644
--- a/mesecons/settings.lua
+++ b/mesecons/settings.lua
@@ -2,4 +2,4 @@
ENABLE_PISTON_ANIMATION=0
BLINKY_PLANT_INTERVAL=3
OLD_PISTON_DIRECTION=0
-ENABLE_TEMPEREST=0 \ No newline at end of file
+ENABLE_TEMPEREST=1
diff --git a/mesecons_temperest/init.lua b/mesecons_temperest/init.lua
index 2bda111..c54f3e7 100644
--- a/mesecons_temperest/init.lua
+++ b/mesecons_temperest/init.lua
@@ -217,3 +217,33 @@ if ENABLE_TEMPEREST==1 then
}
})
end
+
+--End Temperest's code
+
+--Whiskers75's code
+--AND block
+
+local i
+
+
+-- Make the block:
+
+minetest.register_node ("mesecons_temperest:andblock", {
+ drawtype = raillike,
+ description = "AND block",
+ tile_images = {"whiskers75andblock.png"},
+ inventory_image = {"whiskers75andblock.png"},
+ sunlight_propagates = true,
+ paramtype = 'light',
+ walkable = true,
+ groups = {dig_immediate=2},
+ material = minetest.digprop_constanttime(1.0),
+ })
+
+minetest.register_on_punchnode(function(pos, node, puncher)
+ if node.name=="mesecons_temperest:andblock" then
+ anode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z})
+ bnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z})
+ if anode.name=="mesecons:mesecon_on" and bnode.name=="mesecons:mesecon_on" then mesecon:receptor_on({x=pos.x, y=pos.y+1, z=pos.z}) end
+ end
+end)
diff --git a/mesecons_temperest/textures/whiskers75andblock.png b/mesecons_temperest/textures/whiskers75andblock.png
new file mode 100644
index 0000000..63fc07a
--- /dev/null
+++ b/mesecons_temperest/textures/whiskers75andblock.png
Binary files differ
diff --git a/mesecons_whiskers75/depends.txt b/mesecons_whiskers75/depends.txt
deleted file mode 100644
index fd42454..0000000
--- a/mesecons_whiskers75/depends.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-default
-mesecons
-mesecons_temperest \ No newline at end of file
diff --git a/mesecons_whiskers75/init.lua b/mesecons_whiskers75/init.lua
deleted file mode 100644
index 7fb7a70..0000000
--- a/mesecons_whiskers75/init.lua
+++ /dev/null
@@ -1,27 +0,0 @@
---Whiskers75's code
---AND block
-
--- Make the block:
-
-minetest.register_node ("mesecons_whiskers75:andblock", {
- drawtype = signlike,
- description = "AND block",
- tile_images = {"whiskers75andblock.png"},
- inventory_image = {"whiskers75andblock.png"},
- sunlight_propagates = true,
- paramtype = 'light',
- walkable = true,
- groups = {dig_immediate=2},
- material = minetest.digprop_constanttime(1.0),
- })
-
-local update = function(pos)
- local node = minetest.env:get_node(pos)
- if node.name=="mesecons_whiskers75:andblock" then
- lnode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z})
- if lnode.name=="mesecons:mesecon_on" then set_node_on({x=pos.x, y=pos.y+1, z=pos.z}) end
- lnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z})
- if lnode.name=="mesecons:mesecon_on" then set_node_on({x=pos.x, y=pos.y+1, z=pos.z}) end
- end
-end
--- This SHOULD detect mesecons on x+ or -1 and turn a node y+1 on...
diff --git a/mesecons_whiskers75/textures/Untitled.xcf b/mesecons_whiskers75/textures/Untitled.xcf
deleted file mode 100644
index 8722194..0000000
--- a/mesecons_whiskers75/textures/Untitled.xcf
+++ /dev/null
Binary files differ
diff --git a/mesecons_whiskers75/textures/whiskers75andblock.png b/mesecons_whiskers75/textures/whiskers75andblock.png
deleted file mode 100644
index dc4af0e..0000000
--- a/mesecons_whiskers75/textures/whiskers75andblock.png
+++ /dev/null
Binary files differ