Simplify the use of the watermill
This commit is contained in:
parent
5f48e026c4
commit
d68105cf21
@ -347,22 +347,23 @@ techage.manual_DE.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"Mit der Wassermühle können Weizen und andere Getreide zu Mehl gemahlen und dann im Ofen zu Brot gebacken werden. Die Mühle wird mit\n"..
|
"Mit der Wassermühle können Weizen und andere Getreide zu Mehl gemahlen und dann im Ofen zu Brot gebacken werden. Die Mühle wird mit\n"..
|
||||||
"Wasserkraft angetrieben. Dazu muss ein Mühlbach über einen Kanal zum Mühlrad geführt werden. Für den Mühlbach muss oberhalb des Mühlrades\n"..
|
"Wasserkraft angetrieben. Dazu muss ein Mühlbach über einen Kanal zum Mühlrad geführt werden.\n"..
|
||||||
"ein Teich angelegt werden. Der Teich und damit die Wassermenge muss mindestens 8 x 8 Blöcke groß und 2 Blöcke tief sein. An den Rand des Teiches wird eine Schleuse gesetzt. Über die Schleuse kann das Wasserfluss und damit das Mühlrad gesteuert werden. Die Schleuse bestehend aus Schleusenschieber und Schleusengriff.\n"..
|
"Über eine Schleuse kann das Wasserfluss und damit das Mühlrad gesteuert werden.\n"..
|
||||||
|
"Die Schleuse bestehend aus Schleusenschieber und Schleusengriff.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"Die Abbildung rechts (auf \"Plan\" klicken) zeigt den Aufbau der Wassermühle.\n"..
|
"Die Abbildung rechts (auf \"Plan\" klicken) zeigt den Aufbau der Wassermühle.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"Mit der Wassermühle können Weizen und andere Getreide zu Mehl gemahlen und dann im Ofen zu Brot gebacken werden. Die Mühle muss mit einer TA1 Achse mit dem Mühlrad verbunden werden. Die Kraft des Mühlrades reicht nur für eine Mühle.\n"..
|
"Mit der Wassermühle können Weizen und andere Getreide zu Mehl gemahlen und dann im Ofen zu Brot gebacken werden.\n"..
|
||||||
|
"Die Mühle muss mit einer TA1 Achse mit dem Mühlrad verbunden werden. Die Kraft des Mühlrades reicht nur für eine Mühle.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"Die Mühle kann mit Hilfe eines Minecart Hoppers automatisiert werden\\, so dass das Mehl bspw. direkt von der Mühle in einen Ofen befördert wird\\, um daraus Brot zu backen.\n"..
|
"Die Mühle kann mit Hilfe eines Minecart Hoppers automatisiert werden\\, so dass das Mehl bspw. direkt von der Mühle in einen Ofen befördert wird\\, um daraus Brot zu backen.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"Der Schleusenschieber muss auf gleicher Höhe wir die Wasseroberfläche direkt an den Teich gesetzt werden. Wird die Schleuse geöffnet\\, so fließt Wasser durch den Schieber. Dieses Wasser muss dann zum Mühlrad geleitet werden und treibt dort die Mühle an.\n"..
|
"Der Schleusenschieber muss auf gleicher Höhe wie die Wasseroberfläche direkt an einen Teich oder in einen Bach gesetzt werden.\n"..
|
||||||
"\n"..
|
"Wird die Schleuse geöffnet\\, so fließt Wasser durch den Schieber. Dieses Wasser muss dann zum Mühlrad geleitet werden und treibt dort die Mühle an.\n"..
|
||||||
"Technisch überprüft der Schleusenschieber\\, ob es einen Teich mit der notwendigen Größe gibt. Wird die Schleuse geöffnet\\, so fließt ein \"spezielles Wasser\" zur Mühle. Nur mit diesem Wasser kann das Mühlrad angetrieben werden. Es macht daher keinen Sinn\\, einen \"normalen\" Bach zum Mühlrad zu leiten. \n"..
|
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -355,7 +355,8 @@ techage.manual_EN.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"The watermill can be used to grind wheat and other grains into flour and then bake them in the furnace to make bread. \n"..
|
"The watermill can be used to grind wheat and other grains into flour and then bake them in the furnace to make bread. \n"..
|
||||||
"The mill is powered by water power. To do this\\, a millrace must be led to the mill wheel via a canal. For the Mühlbach a pond must be created above the mill wheel. The pond and thus the amount of water must be at least 8x8 blocks large and 2 blocks deep. A sluice will be set at the edge of the pond. The water flow and thus the mill wheel can be controlled via the sluice. The sluice consists of the sluice lock and sluice handle.\n"..
|
"The mill is powered by water power. To do this\\, a millrace must be led to the mill wheel via a canal.\n"..
|
||||||
|
"The water flow and thus the mill wheel can be controlled via a sluice. The sluice consists of the sluice lock and sluice handle.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"The picture on the right (click on \"Plan\") shows the structure of the watermill. \n"..
|
"The picture on the right (click on \"Plan\") shows the structure of the watermill. \n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
@ -367,9 +368,8 @@ techage.manual_EN.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"The sluice gate must be placed directly on the pond at the same height as the water surface. When the lock is opened\\, water flows through the slide. This water then has to be fed to the mill wheel\\, where it drives the mill.\n"..
|
"The sluice gate valve must be placed directly next to a pond or in a stream at the same height as the water surface.\n"..
|
||||||
"\n"..
|
"When the gate is opened\\, water flows through the slide. This water then has to be fed to the mill wheel\\, where it drives the mill.\n"..
|
||||||
"Technically\\, the sluice gate checks whether there is a pond of the required size. When the lock is opened\\, \"special water\" flows to the mill. The mill wheel can only be driven with this water. It therefore makes no sense to lead a \"normal\" stream to the mill wheel.\n"..
|
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
|
1
init.lua
1
init.lua
@ -137,7 +137,6 @@ end
|
|||||||
-- TA1 Watermill
|
-- TA1 Watermill
|
||||||
dofile(MP.."/ta1_watermill/ta1_axle.lua")
|
dofile(MP.."/ta1_watermill/ta1_axle.lua")
|
||||||
dofile(MP.."/ta1_watermill/watermill.lua")
|
dofile(MP.."/ta1_watermill/watermill.lua")
|
||||||
dofile(MP.."/ta1_watermill/water.lua")
|
|
||||||
dofile(MP.."/ta1_watermill/sluice.lua")
|
dofile(MP.."/ta1_watermill/sluice.lua")
|
||||||
dofile(MP.."/ta1_watermill/millboard.lua")
|
dofile(MP.."/ta1_watermill/millboard.lua")
|
||||||
dofile(MP.."/ta1_watermill/mill.lua")
|
dofile(MP.."/ta1_watermill/mill.lua")
|
||||||
|
@ -902,7 +902,7 @@ TA Lamp=TA Lampe
|
|||||||
|
|
||||||
TA1 Sluice Gate=TA1 Schleusenschieber
|
TA1 Sluice Gate=TA1 Schleusenschieber
|
||||||
TA1 Sluice Handle=TA1 Schleusengriff
|
TA1 Sluice Handle=TA1 Schleusengriff
|
||||||
Your pond is too small!=ein Teich ist zu klein!
|
Your pond is too small!=Der Teich ist zu klein!
|
||||||
|
|
||||||
### solarcell.lua ###
|
### solarcell.lua ###
|
||||||
|
|
||||||
|
@ -57,8 +57,9 @@ Der Schmelztiegel hat ein eigenes Menü mit Rezepten und ein Inventar, wo du die
|
|||||||
## Wassermühle
|
## Wassermühle
|
||||||
|
|
||||||
Mit der Wassermühle können Weizen und andere Getreide zu Mehl gemahlen und dann im Ofen zu Brot gebacken werden. Die Mühle wird mit
|
Mit der Wassermühle können Weizen und andere Getreide zu Mehl gemahlen und dann im Ofen zu Brot gebacken werden. Die Mühle wird mit
|
||||||
Wasserkraft angetrieben. Dazu muss ein Mühlbach über einen Kanal zum Mühlrad geführt werden. Für den Mühlbach muss oberhalb des Mühlrades
|
Wasserkraft angetrieben. Dazu muss ein Mühlbach über einen Kanal zum Mühlrad geführt werden.
|
||||||
ein Teich angelegt werden. Der Teich und damit die Wassermenge muss mindestens 8 x 8 Blöcke groß und 2 Blöcke tief sein. An den Rand des Teiches wird eine Schleuse gesetzt. Über die Schleuse kann das Wasserfluss und damit das Mühlrad gesteuert werden. Die Schleuse bestehend aus Schleusenschieber und Schleusengriff.
|
Über eine Schleuse kann das Wasserfluss und damit das Mühlrad gesteuert werden.
|
||||||
|
Die Schleuse bestehend aus Schleusenschieber und Schleusengriff.
|
||||||
|
|
||||||
Die Abbildung rechts (auf "Plan" klicken) zeigt den Aufbau der Wassermühle.
|
Die Abbildung rechts (auf "Plan" klicken) zeigt den Aufbau der Wassermühle.
|
||||||
|
|
||||||
@ -66,7 +67,8 @@ Die Abbildung rechts (auf "Plan" klicken) zeigt den Aufbau der Wassermühle.
|
|||||||
|
|
||||||
### TA1 Mühle
|
### TA1 Mühle
|
||||||
|
|
||||||
Mit der Wassermühle können Weizen und andere Getreide zu Mehl gemahlen und dann im Ofen zu Brot gebacken werden. Die Mühle muss mit einer TA1 Achse mit dem Mühlrad verbunden werden. Die Kraft des Mühlrades reicht nur für eine Mühle.
|
Mit der Wassermühle können Weizen und andere Getreide zu Mehl gemahlen und dann im Ofen zu Brot gebacken werden.
|
||||||
|
Die Mühle muss mit einer TA1 Achse mit dem Mühlrad verbunden werden. Die Kraft des Mühlrades reicht nur für eine Mühle.
|
||||||
|
|
||||||
Die Mühle kann mit Hilfe eines Minecart Hoppers automatisiert werden, so dass das Mehl bspw. direkt von der Mühle in einen Ofen befördert wird, um daraus Brot zu backen.
|
Die Mühle kann mit Hilfe eines Minecart Hoppers automatisiert werden, so dass das Mehl bspw. direkt von der Mühle in einen Ofen befördert wird, um daraus Brot zu backen.
|
||||||
|
|
||||||
@ -74,9 +76,8 @@ Die Mühle kann mit Hilfe eines Minecart Hoppers automatisiert werden, so dass d
|
|||||||
|
|
||||||
### TA1 Schleusenschieber / TA1 Sluice Gate
|
### TA1 Schleusenschieber / TA1 Sluice Gate
|
||||||
|
|
||||||
Der Schleusenschieber muss auf gleicher Höhe wir die Wasseroberfläche direkt an den Teich gesetzt werden. Wird die Schleuse geöffnet, so fließt Wasser durch den Schieber. Dieses Wasser muss dann zum Mühlrad geleitet werden und treibt dort die Mühle an.
|
Der Schleusenschieber muss auf gleicher Höhe wie die Wasseroberfläche direkt an einen Teich oder in einen Bach gesetzt werden.
|
||||||
|
Wird die Schleuse geöffnet, so fließt Wasser durch den Schieber. Dieses Wasser muss dann zum Mühlrad geleitet werden und treibt dort die Mühle an.
|
||||||
Technisch überprüft der Schleusenschieber, ob es einen Teich mit der notwendigen Größe gibt. Wird die Schleuse geöffnet, so fließt ein "spezielles Wasser" zur Mühle. Nur mit diesem Wasser kann das Mühlrad angetrieben werden. Es macht daher keinen Sinn, einen "normalen" Bach zum Mühlrad zu leiten.
|
|
||||||
|
|
||||||
[ta1_sluice|image]
|
[ta1_sluice|image]
|
||||||
|
|
||||||
|
@ -57,7 +57,8 @@ The melting pot has its own menu of recipes and an inventory where you have to p
|
|||||||
## Watermill
|
## Watermill
|
||||||
|
|
||||||
The watermill can be used to grind wheat and other grains into flour and then bake them in the furnace to make bread.
|
The watermill can be used to grind wheat and other grains into flour and then bake them in the furnace to make bread.
|
||||||
The mill is powered by water power. To do this, a millrace must be led to the mill wheel via a canal. For the Mühlbach a pond must be created above the mill wheel. The pond and thus the amount of water must be at least 8x8 blocks large and 2 blocks deep. A sluice will be set at the edge of the pond. The water flow and thus the mill wheel can be controlled via the sluice. The sluice consists of the sluice lock and sluice handle.
|
The mill is powered by water power. To do this, a millrace must be led to the mill wheel via a canal.
|
||||||
|
The water flow and thus the mill wheel can be controlled via a sluice. The sluice consists of the sluice lock and sluice handle.
|
||||||
|
|
||||||
The picture on the right (click on "Plan") shows the structure of the watermill.
|
The picture on the right (click on "Plan") shows the structure of the watermill.
|
||||||
|
|
||||||
@ -74,9 +75,8 @@ The mill can be automated with the help of a Minecart Hopper, so that the flour,
|
|||||||
|
|
||||||
### TA1 sluice gate
|
### TA1 sluice gate
|
||||||
|
|
||||||
The sluice gate must be placed directly on the pond at the same height as the water surface. When the lock is opened, water flows through the slide. This water then has to be fed to the mill wheel, where it drives the mill.
|
The sluice gate valve must be placed directly next to a pond or in a stream at the same height as the water surface.
|
||||||
|
When the gate is opened, water flows through the slide. This water then has to be fed to the mill wheel, where it drives the mill.
|
||||||
Technically, the sluice gate checks whether there is a pond of the required size. When the lock is opened, "special water" flows to the mill. The mill wheel can only be driven with this water. It therefore makes no sense to lead a "normal" stream to the mill wheel.
|
|
||||||
|
|
||||||
[ta1_sluice|image]
|
[ta1_sluice|image]
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ local function register_board1(output, description, tiles, input)
|
|||||||
use_texture_alpha = techage.CLIP,
|
use_texture_alpha = techage.CLIP,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ local function register_board2(output, description, tiles, input1, input2)
|
|||||||
use_texture_alpha = techage.CLIP,
|
use_texture_alpha = techage.CLIP,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, fence = 1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -15,61 +15,37 @@
|
|||||||
local M = minetest.get_meta
|
local M = minetest.get_meta
|
||||||
local S = techage.S
|
local S = techage.S
|
||||||
|
|
||||||
local RADIUS = 8
|
|
||||||
local DEPTH = 2
|
|
||||||
local AMOUNT = RADIUS * RADIUS * 1.5
|
|
||||||
|
|
||||||
local function check_position(pos, facedir)
|
local function check_position(pos, facedir)
|
||||||
local dir = minetest.facedir_to_dir(facedir)
|
local dir = minetest.facedir_to_dir(facedir)
|
||||||
local pos_ = vector.add(pos, dir)
|
local pos_ = vector.add(pos, dir)
|
||||||
local node = minetest.get_node(pos_)
|
local node = minetest.get_node(pos_)
|
||||||
|
return node.name == "default:water_source" or node.name == "default:water_flowing"
|
||||||
if node.name ~= "default:water_source" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
dir = vector.multiply(dir, RADIUS)
|
|
||||||
local center = vector.add(pos, dir)
|
|
||||||
local pos1 = {x = center.x - RADIUS, y = center.y - DEPTH, z = center.z - RADIUS}
|
|
||||||
local pos2 = {x = center.x + RADIUS, y = center.y + 0, z = center.z + RADIUS}
|
|
||||||
local _, nodes = minetest.find_nodes_in_area(pos1, pos2, {"default:water_source"})
|
|
||||||
return (nodes["default:water_source"] and nodes["default:water_source"] > AMOUNT) or false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Function checks if a millpond is avaliable and
|
-- Function checks if a millpond is avaliable and
|
||||||
-- returns the pos for the new water block, and the type of block.
|
-- returns the pos for the new water block, and the type of block.
|
||||||
local function has_water(pos, facedir, player)
|
local function has_water(pos, facedir)
|
||||||
local facedir2, res, dir, pos2
|
local res, dir, pos2
|
||||||
|
|
||||||
-- check left side
|
-- check left side
|
||||||
facedir2 = (facedir + 3) % 4
|
res = check_position(pos, (facedir + 3) % 4)
|
||||||
res = check_position(pos, facedir2)
|
dir = minetest.facedir_to_dir((facedir + 1) % 4)
|
||||||
facedir2 = (facedir + 1) % 4
|
|
||||||
dir = minetest.facedir_to_dir(facedir2)
|
|
||||||
pos2 = vector.add(pos, dir)
|
pos2 = vector.add(pos, dir)
|
||||||
|
|
||||||
if res == nil then
|
if res == true then
|
||||||
return pos2, "air"
|
|
||||||
elseif res == true then
|
|
||||||
return pos2, "water"
|
return pos2, "water"
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player:get_player_name(), S("Your pond is too small!"))
|
|
||||||
return pos2, "air"
|
return pos2, "air"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- check right side
|
-- check right side
|
||||||
facedir2 = (facedir + 1) % 4
|
res = check_position(pos, (facedir + 1) % 4)
|
||||||
res = check_position(pos, facedir2)
|
dir = minetest.facedir_to_dir((facedir + 3) % 4)
|
||||||
facedir2 = (facedir + 3) % 4
|
|
||||||
dir = minetest.facedir_to_dir(facedir2)
|
|
||||||
pos2 = vector.add(pos, dir)
|
pos2 = vector.add(pos, dir)
|
||||||
|
|
||||||
if res == nil then
|
if res == true then
|
||||||
return pos2, "air"
|
|
||||||
elseif res == true then
|
|
||||||
return pos2, "water"
|
return pos2, "water"
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player:get_player_name(), S("Your pond is too small!"))
|
|
||||||
return pos2, "air"
|
return pos2, "air"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -84,8 +60,8 @@ local function on_rightclick(pos, node, clicker, itemstack, pointed_thing)
|
|||||||
minetest.swap_node(pos, {name = "techage:ta1_sluice_handle_open", param2 = node.param2})
|
minetest.swap_node(pos, {name = "techage:ta1_sluice_handle_open", param2 = node.param2})
|
||||||
minetest.swap_node(pos2, {name = "techage:ta1_sluice_open", param2 = node.param2})
|
minetest.swap_node(pos2, {name = "techage:ta1_sluice_open", param2 = node.param2})
|
||||||
if res == "water" then
|
if res == "water" then
|
||||||
if node3.name == "air" or node3.name == "techage:water_flowing" then
|
if node3.name == "air" or node3.name == "default:water_flowing" then
|
||||||
minetest.add_node(pos3, {name = "techage:water_source"})
|
minetest.add_node(pos3, {name = "default:water_source"})
|
||||||
minetest.get_node_timer(pos3):start(2)
|
minetest.get_node_timer(pos3):start(2)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -97,11 +73,11 @@ local function on_rightclick(pos, node, clicker, itemstack, pointed_thing)
|
|||||||
minetest.swap_node(pos, {name = "techage:ta1_sluice_handle_closed", param2 = node.param2})
|
minetest.swap_node(pos, {name = "techage:ta1_sluice_handle_closed", param2 = node.param2})
|
||||||
minetest.swap_node(pos2, {name = "techage:ta1_sluice_closed", param2 = node.param2})
|
minetest.swap_node(pos2, {name = "techage:ta1_sluice_closed", param2 = node.param2})
|
||||||
if res == "water" then
|
if res == "water" then
|
||||||
if node3.name == "techage:water_source" then
|
if node3.name == "default:water_source" then
|
||||||
minetest.add_node(pos3, {name = "techage:water_flowing"})
|
minetest.add_node(pos3, {name = "default:water_flowing"})
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if node3.name == "techage:water_flowing" then
|
if node3.name == "default:water_flowing" then
|
||||||
minetest.add_node(pos3, {name = "air"})
|
minetest.add_node(pos3, {name = "air"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,117 +0,0 @@
|
|||||||
-- Based on and derived from minetest_game.default
|
|
||||||
-- License: LGPL v2.1
|
|
||||||
|
|
||||||
-- support for MT game translation.
|
|
||||||
local S = default.get_translator
|
|
||||||
|
|
||||||
minetest.register_node("techage:water_flowing", {
|
|
||||||
description = S("Flowing Water"),
|
|
||||||
drawtype = "flowingliquid",
|
|
||||||
waving = 0,
|
|
||||||
tiles = {"default_water.png"},
|
|
||||||
special_tiles = {
|
|
||||||
{
|
|
||||||
name = "default_water_flowing_animated.png",
|
|
||||||
backface_culling = false,
|
|
||||||
animation = {
|
|
||||||
type = "vertical_frames",
|
|
||||||
aspect_w = 16,
|
|
||||||
aspect_h = 16,
|
|
||||||
length = 0.5,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "default_water_flowing_animated.png",
|
|
||||||
backface_culling = true,
|
|
||||||
animation = {
|
|
||||||
type = "vertical_frames",
|
|
||||||
aspect_w = 16,
|
|
||||||
aspect_h = 16,
|
|
||||||
length = 0.5,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
use_texture_alpha = "blend",
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "flowingliquid",
|
|
||||||
walkable = false,
|
|
||||||
pointable = false,
|
|
||||||
diggable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
is_ground_content = false,
|
|
||||||
drop = "",
|
|
||||||
drowning = 1,
|
|
||||||
liquidtype = "flowing",
|
|
||||||
liquid_alternative_flowing = "techage:water_flowing",
|
|
||||||
liquid_alternative_source = "techage:water_source",
|
|
||||||
liquid_viscosity = 1,
|
|
||||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
|
||||||
groups = {water = 3, liquid = 3, cools_lava = 1, not_in_creative_inventory = 1},
|
|
||||||
sounds = default.node_sound_water_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("techage:water_source", {
|
|
||||||
description = S("Water Source"),
|
|
||||||
drawtype = "flowingliquid",
|
|
||||||
waving = 0,
|
|
||||||
tiles = {"default_water.png"},
|
|
||||||
special_tiles = {
|
|
||||||
{
|
|
||||||
name = "default_water_flowing_animated.png",
|
|
||||||
backface_culling = false,
|
|
||||||
animation = {
|
|
||||||
type = "vertical_frames",
|
|
||||||
aspect_w = 16,
|
|
||||||
aspect_h = 16,
|
|
||||||
length = 0.5,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "default_water_flowing_animated.png",
|
|
||||||
backface_culling = true,
|
|
||||||
animation = {
|
|
||||||
type = "vertical_frames",
|
|
||||||
aspect_w = 16,
|
|
||||||
aspect_h = 16,
|
|
||||||
length = 0.5,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
use_texture_alpha = "blend",
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "flowingliquid",
|
|
||||||
walkable = false,
|
|
||||||
pointable = false,
|
|
||||||
diggable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
is_ground_content = false,
|
|
||||||
drop = "",
|
|
||||||
drowning = 1,
|
|
||||||
liquidtype = "source",
|
|
||||||
liquid_alternative_flowing = "techage:water_flowing",
|
|
||||||
liquid_alternative_source = "techage:water_source",
|
|
||||||
liquid_viscosity = 1,
|
|
||||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
|
||||||
groups = {water = 3, liquid = 3, cools_lava = 1, not_in_creative_inventory = 1},
|
|
||||||
sounds = default.node_sound_water_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("techage:water_stop", {
|
|
||||||
description = "Water Stop",
|
|
||||||
drawtype = "glasslike_framed_optional",
|
|
||||||
tiles = {"techage_invisible.png"},
|
|
||||||
inventory_image = 'techage_invisible_inv.png',
|
|
||||||
|
|
||||||
use_texture_alpha = "blend",
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
pointable = false,
|
|
||||||
diggable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
is_ground_content = false,
|
|
||||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
drop = "",
|
|
||||||
})
|
|
@ -49,7 +49,7 @@ local function water_flowing(pos, facedir, tRes)
|
|||||||
local pos2 = vector.add(pos, dir)
|
local pos2 = vector.add(pos, dir)
|
||||||
pos2.y = pos2.y + 1
|
pos2.y = pos2.y + 1
|
||||||
local node = minetest.get_node(pos2)
|
local node = minetest.get_node(pos2)
|
||||||
if node.name == "techage:water_flowing" then
|
if node.name == "default:water_flowing" then
|
||||||
tRes.backward = false
|
tRes.backward = false
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -57,7 +57,7 @@ local function water_flowing(pos, facedir, tRes)
|
|||||||
pos2 = vector.subtract(pos, dir)
|
pos2 = vector.subtract(pos, dir)
|
||||||
pos2.y = pos2.y + 1
|
pos2.y = pos2.y + 1
|
||||||
node = minetest.get_node(pos2)
|
node = minetest.get_node(pos2)
|
||||||
if node.name == "techage:water_flowing" then
|
if node.name == "default:water_flowing" then
|
||||||
tRes.backward = true
|
tRes.backward = true
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -290,6 +290,25 @@ minetest.register_entity("techage:ta1_watermill_entity", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:water_stop", {
|
||||||
|
description = "Water Stop",
|
||||||
|
drawtype = "glasslike_framed_optional",
|
||||||
|
tiles = {"techage_invisible.png"},
|
||||||
|
inventory_image = 'techage_invisible_inv.png',
|
||||||
|
|
||||||
|
use_texture_alpha = "blend",
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
pointable = false,
|
||||||
|
diggable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
drop = "",
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "techage:ta1_watermill_inv",
|
output = "techage:ta1_watermill_inv",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
Loading…
Reference in New Issue
Block a user