built on 21/07/2020 17:45:15
This commit is contained in:
parent
869fa9dd21
commit
6f3146f7bf
30
basic_materials/.luacheckrc
Normal file
30
basic_materials/.luacheckrc
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
std = "lua51+minetest"
|
||||||
|
unused_args = false
|
||||||
|
allow_defined_top = true
|
||||||
|
max_line_length = 999
|
||||||
|
|
||||||
|
stds.minetest = {
|
||||||
|
read_globals = {
|
||||||
|
"DIR_DELIM",
|
||||||
|
"minetest",
|
||||||
|
"core",
|
||||||
|
"dump",
|
||||||
|
"vector",
|
||||||
|
"nodeupdate",
|
||||||
|
"VoxelManip",
|
||||||
|
"VoxelArea",
|
||||||
|
"PseudoRandom",
|
||||||
|
"ItemStack",
|
||||||
|
"default",
|
||||||
|
table = {
|
||||||
|
fields = {
|
||||||
|
"copy",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
read_globals = {
|
||||||
|
"default",
|
||||||
|
"moreores",
|
||||||
|
}
|
@ -7,6 +7,7 @@
|
|||||||
local modpath = minetest.get_modpath("basic_materials")
|
local modpath = minetest.get_modpath("basic_materials")
|
||||||
|
|
||||||
basic_materials = {}
|
basic_materials = {}
|
||||||
|
basic_materials.mod = { author = "Vanessa Dannenberg" }
|
||||||
|
|
||||||
dofile(modpath.."/metals.lua")
|
dofile(modpath.."/metals.lua")
|
||||||
dofile(modpath.."/plastics.lua")
|
dofile(modpath.."/plastics.lua")
|
||||||
|
@ -5,31 +5,37 @@ local S = minetest.get_translator("basic_materials")
|
|||||||
|
|
||||||
minetest.register_craftitem("basic_materials:steel_wire", {
|
minetest.register_craftitem("basic_materials:steel_wire", {
|
||||||
description = S("Spool of steel wire"),
|
description = S("Spool of steel wire"),
|
||||||
|
groups = { wire = 1 },
|
||||||
inventory_image = "basic_materials_steel_wire.png"
|
inventory_image = "basic_materials_steel_wire.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:copper_wire", {
|
minetest.register_craftitem("basic_materials:copper_wire", {
|
||||||
description = S("Spool of copper wire"),
|
description = S("Spool of copper wire"),
|
||||||
|
groups = { wire = 1 },
|
||||||
inventory_image = "basic_materials_copper_wire.png"
|
inventory_image = "basic_materials_copper_wire.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:silver_wire", {
|
minetest.register_craftitem("basic_materials:silver_wire", {
|
||||||
description = S("Spool of silver wire"),
|
description = S("Spool of silver wire"),
|
||||||
|
groups = { wire = 1 },
|
||||||
inventory_image = "basic_materials_silver_wire.png"
|
inventory_image = "basic_materials_silver_wire.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:gold_wire", {
|
minetest.register_craftitem("basic_materials:gold_wire", {
|
||||||
description = S("Spool of gold wire"),
|
description = S("Spool of gold wire"),
|
||||||
|
groups = { wire = 1 },
|
||||||
inventory_image = "basic_materials_gold_wire.png"
|
inventory_image = "basic_materials_gold_wire.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:steel_strip", {
|
minetest.register_craftitem("basic_materials:steel_strip", {
|
||||||
description = S("Steel Strip"),
|
description = S("Steel Strip"),
|
||||||
|
groups = { strip = 1 },
|
||||||
inventory_image = "basic_materials_steel_strip.png"
|
inventory_image = "basic_materials_steel_strip.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:copper_strip", {
|
minetest.register_craftitem("basic_materials:copper_strip", {
|
||||||
description = S("Copper Strip"),
|
description = S("Copper Strip"),
|
||||||
|
groups = { strip = 1 },
|
||||||
inventory_image = "basic_materials_copper_strip.png"
|
inventory_image = "basic_materials_copper_strip.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -40,11 +46,13 @@ minetest.register_craftitem("basic_materials:steel_bar", {
|
|||||||
|
|
||||||
minetest.register_craftitem("basic_materials:chainlink_brass", {
|
minetest.register_craftitem("basic_materials:chainlink_brass", {
|
||||||
description = S("Chainlinks (brass)"),
|
description = S("Chainlinks (brass)"),
|
||||||
|
groups = { chainlinks = 1 },
|
||||||
inventory_image = "basic_materials_chainlink_brass.png"
|
inventory_image = "basic_materials_chainlink_brass.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:chainlink_steel", {
|
minetest.register_craftitem("basic_materials:chainlink_steel", {
|
||||||
description = S("Chainlinks (steel)"),
|
description = S("Chainlinks (steel)"),
|
||||||
|
groups = { chainlinks = 1 },
|
||||||
inventory_image = "basic_materials_chainlink_steel.png"
|
inventory_image = "basic_materials_chainlink_steel.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -70,14 +78,6 @@ local chains_sbox = {
|
|||||||
fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }
|
fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }
|
||||||
}
|
}
|
||||||
|
|
||||||
local topchains_sbox = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 },
|
|
||||||
{ -0.1, -0.5, -0.1, 0.1, 0.4, 0.1 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
minetest.register_node("basic_materials:chain_steel", {
|
minetest.register_node("basic_materials:chain_steel", {
|
||||||
description = S("Chain (steel, hanging)"),
|
description = S("Chain (steel, hanging)"),
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
|
@ -10,6 +10,7 @@ minetest.register_craftitem("basic_materials:plastic_sheet", {
|
|||||||
|
|
||||||
minetest.register_craftitem("basic_materials:plastic_strip", {
|
minetest.register_craftitem("basic_materials:plastic_strip", {
|
||||||
description = S("Plastic strips"),
|
description = S("Plastic strips"),
|
||||||
|
groups = { strip = 1 },
|
||||||
inventory_image = "basic_materials_plastic_strip.png",
|
inventory_image = "basic_materials_plastic_strip.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -40,6 +40,14 @@ minetest.after(1, function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
for name,ndef in pairs(minetest.registered_nodes) do
|
||||||
|
if type(name) == "string" then
|
||||||
|
local mod = string.split(name, ":")[1]
|
||||||
|
if mod == "flowers" then
|
||||||
|
signs_bot.register_flower(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local function soil_availabe(pos)
|
local function soil_availabe(pos)
|
||||||
|
@ -240,8 +240,8 @@ function api.check_script(script)
|
|||||||
param2 = tonumber(param2) or param2
|
param2 = tonumber(param2) or param2
|
||||||
param3 = tonumber(param3) or param3
|
param3 = tonumber(param3) or param3
|
||||||
local num_param = (param1 and 1 or 0) + (param2 and 1 or 0) + (param3 and 1 or 0)
|
local num_param = (param1 and 1 or 0) + (param2 and 1 or 0) + (param3 and 1 or 0)
|
||||||
if tCmdDef[cmnd].num_param ~= num_param then
|
if tCmdDef[cmnd].num_param < num_param then
|
||||||
return false, I("Wrong number of parameters"), idx
|
return false, I("Too many parameters"), idx
|
||||||
end
|
end
|
||||||
if tCmdDef[cmnd].num_param > 0 and not tCmdDef[cmnd].check(param1, param2, param3) then
|
if tCmdDef[cmnd].num_param > 0 and not tCmdDef[cmnd].check(param1, param2, param3) then
|
||||||
return false, I("Parameter error"), idx
|
return false, I("Parameter error"), idx
|
||||||
|
Binary file not shown.
@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-05-30 15:09+0200\n"
|
"POT-Creation-Date: 2020-06-23 17:16+0200\n"
|
||||||
"PO-Revision-Date: 2020-05-30 15:14+0200\n"
|
"PO-Revision-Date: 2020-06-23 17:19+0200\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
@ -784,14 +784,13 @@ msgid "jump to a label"
|
|||||||
msgstr "Sprung zu einer Marke"
|
msgstr "Sprung zu einer Marke"
|
||||||
|
|
||||||
#: commands.lua
|
#: commands.lua
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Move the robot 1..999 steps forward\n"
|
"Move the robot 1..999 steps forward\n"
|
||||||
"without paying attention to any signs.\n"
|
"without paying attention to any signs.\n"
|
||||||
"Up and down movements also become\n"
|
"Up and down movements also become\n"
|
||||||
"counted as steps."
|
"counted as steps."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Bewege den Roboter 1..99 Schritte\n"
|
"Bewege den Roboter 1..999 Schritte\n"
|
||||||
"vorwärts ohne auf Zeichen zu achten.\n"
|
"vorwärts ohne auf Zeichen zu achten.\n"
|
||||||
"Auf- und Ab-Bewegungen werden auch\n"
|
"Auf- und Ab-Bewegungen werden auch\n"
|
||||||
"als Schritte gezählt."
|
"als Schritte gezählt."
|
||||||
@ -821,10 +820,12 @@ msgid "Crop Sensor"
|
|||||||
msgstr "Ernte Sensor"
|
msgstr "Ernte Sensor"
|
||||||
|
|
||||||
#: crop_sensor.lua
|
#: crop_sensor.lua
|
||||||
msgid "The Crop Sensor sends a signal when, for example wheat is fully grown."
|
msgid ""
|
||||||
|
"The Crop Sensor sends cyclical signals when, for example, wheat is fully "
|
||||||
|
"grown."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Der Ernte Sensor sendet ein Signal, wenn bspw. der Weizen voll ausgewachsen "
|
"Der Ernte Sensor sendet zyklisch ein Signal, wenn bspw. der Weizen voll "
|
||||||
"ist."
|
"ausgewachsen ist."
|
||||||
|
|
||||||
#: crop_sensor.lua
|
#: crop_sensor.lua
|
||||||
msgid "The sensor range is one node/meter."
|
msgid "The sensor range is one node/meter."
|
||||||
@ -1425,10 +1426,10 @@ msgstr "Block Sensor"
|
|||||||
|
|
||||||
#: node_sensor.lua
|
#: node_sensor.lua
|
||||||
msgid ""
|
msgid ""
|
||||||
"The node sensor can send a signal when it detects that nodes appear or "
|
"The node sensor sends cyclical signals when it detects that nodes have "
|
||||||
"disappear,"
|
"appeared or disappeared,"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Der Block Sensor kann ein Signal senden, wenn er eine Veränderung von "
|
"Der Block Sensor sendet zyklisch ein Signal, wenn er eine Veränderung von "
|
||||||
"Blöcken vor sich entdeckt (ein Block erscheint oder verschwindet),"
|
"Blöcken vor sich entdeckt (ein Block erscheint oder verschwindet),"
|
||||||
|
|
||||||
#: node_sensor.lua
|
#: node_sensor.lua
|
||||||
@ -1602,6 +1603,10 @@ msgstr "Signal wird gesendet, wenn all Eingangssignale empfangen wurden."
|
|||||||
msgid "Maximum programm size exceeded"
|
msgid "Maximum programm size exceeded"
|
||||||
msgstr "Maximale Programmlänge überschritten"
|
msgstr "Maximale Programmlänge überschritten"
|
||||||
|
|
||||||
|
#: interpreter.lua
|
||||||
|
msgid "Too many parameters"
|
||||||
|
msgstr "Zu viele Parameter"
|
||||||
|
|
||||||
#: interpreter.lua
|
#: interpreter.lua
|
||||||
msgid "Parameter error"
|
msgid "Parameter error"
|
||||||
msgstr "Parameter Fehler"
|
msgstr "Parameter Fehler"
|
||||||
@ -1618,18 +1623,16 @@ msgstr "Es fehlt ein 'repeat'"
|
|||||||
msgid "'end' missing"
|
msgid "'end' missing"
|
||||||
msgstr "Es fehlt ein 'end'"
|
msgstr "Es fehlt ein 'end'"
|
||||||
|
|
||||||
#: interpreter.lua
|
|
||||||
msgid "'return' missing"
|
|
||||||
msgstr "Es fehlt ein 'return'"
|
|
||||||
|
|
||||||
#: interpreter.lua
|
|
||||||
msgid "'call' missing"
|
|
||||||
msgstr "Es fehlt ein 'call'"
|
|
||||||
|
|
||||||
#: interpreter.lua
|
#: interpreter.lua
|
||||||
msgid "Checked and approved"
|
msgid "Checked and approved"
|
||||||
msgstr "Geprüft und genehmigt"
|
msgstr "Geprüft und genehmigt"
|
||||||
|
|
||||||
|
#~ msgid "'return' missing"
|
||||||
|
#~ msgstr "Es fehlt ein 'return'"
|
||||||
|
|
||||||
|
#~ msgid "'call' missing"
|
||||||
|
#~ msgstr "Es fehlt ein 'call'"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Take <num> items from a chest like node\n"
|
#~ "Take <num> items from a chest like node\n"
|
||||||
#~ "and put it into the item inventory.\n"
|
#~ "and put it into the item inventory.\n"
|
||||||
|
@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-05-30 14:59+0200\n"
|
"POT-Creation-Date: 2020-05-30 15:09+0200\n"
|
||||||
"PO-Revision-Date: 2020-05-30 15:01+0200\n"
|
"PO-Revision-Date: 2020-05-30 15:14+0200\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
@ -797,7 +797,6 @@ msgstr ""
|
|||||||
"als Schritte gezählt."
|
"als Schritte gezählt."
|
||||||
|
|
||||||
#: commands.lua
|
#: commands.lua
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Walk until a sign or obstacle is\n"
|
"Walk until a sign or obstacle is\n"
|
||||||
"reached. Then continue with the next command.\n"
|
"reached. Then continue with the next command.\n"
|
||||||
@ -811,7 +810,7 @@ msgstr ""
|
|||||||
"Kommando aus. \n"
|
"Kommando aus. \n"
|
||||||
"Wurde ein Zeichen erreicht, so arbeite\n"
|
"Wurde ein Zeichen erreicht, so arbeite\n"
|
||||||
"die Kommandos des Zeichens als\n"
|
"die Kommandos des Zeichens als\n"
|
||||||
"Unter-Prozess ab."
|
"Unter-Prozess ab"
|
||||||
|
|
||||||
#: crop_sensor.lua
|
#: crop_sensor.lua
|
||||||
msgid "Crop Sensor: Connected with "
|
msgid "Crop Sensor: Connected with "
|
||||||
@ -1599,14 +1598,37 @@ msgstr "Signal UND"
|
|||||||
msgid "Signal is sent, if all input signals are received."
|
msgid "Signal is sent, if all input signals are received."
|
||||||
msgstr "Signal wird gesendet, wenn all Eingangssignale empfangen wurden."
|
msgstr "Signal wird gesendet, wenn all Eingangssignale empfangen wurden."
|
||||||
|
|
||||||
#~ msgid "Parameter error in line "
|
#: interpreter.lua
|
||||||
#~ msgstr "Parameter Fehler in Zeile "
|
msgid "Maximum programm size exceeded"
|
||||||
|
msgstr "Maximale Programmlänge überschritten"
|
||||||
|
|
||||||
#~ msgid "Command error in line "
|
#: interpreter.lua
|
||||||
#~ msgstr "Kommandozeilen Fehler in Zeile "
|
msgid "Parameter error"
|
||||||
|
msgstr "Parameter Fehler"
|
||||||
|
|
||||||
#~ msgid "Checked and approved"
|
#: interpreter.lua
|
||||||
#~ msgstr "Geprüft und genehmigt"
|
msgid "Command error"
|
||||||
|
msgstr "Kommandozeilen Fehler"
|
||||||
|
|
||||||
|
#: interpreter.lua
|
||||||
|
msgid "'repeat' missing"
|
||||||
|
msgstr "Es fehlt ein 'repeat'"
|
||||||
|
|
||||||
|
#: interpreter.lua
|
||||||
|
msgid "'end' missing"
|
||||||
|
msgstr "Es fehlt ein 'end'"
|
||||||
|
|
||||||
|
#: interpreter.lua
|
||||||
|
msgid "'return' missing"
|
||||||
|
msgstr "Es fehlt ein 'return'"
|
||||||
|
|
||||||
|
#: interpreter.lua
|
||||||
|
msgid "'call' missing"
|
||||||
|
msgstr "Es fehlt ein 'call'"
|
||||||
|
|
||||||
|
#: interpreter.lua
|
||||||
|
msgid "Checked and approved"
|
||||||
|
msgstr "Geprüft und genehmigt"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Take <num> items from a chest like node\n"
|
#~ "Take <num> items from a chest like node\n"
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-05-30 15:09+0200\n"
|
"POT-Creation-Date: 2020-06-23 17:16+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -665,7 +665,9 @@ msgid "Crop Sensor"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: crop_sensor.lua
|
#: crop_sensor.lua
|
||||||
msgid "The Crop Sensor sends a signal when, for example wheat is fully grown."
|
msgid ""
|
||||||
|
"The Crop Sensor sends cyclical signals when, for example, wheat is fully "
|
||||||
|
"grown."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: crop_sensor.lua
|
#: crop_sensor.lua
|
||||||
@ -1168,8 +1170,8 @@ msgstr ""
|
|||||||
|
|
||||||
#: node_sensor.lua
|
#: node_sensor.lua
|
||||||
msgid ""
|
msgid ""
|
||||||
"The node sensor can send a signal when it detects that nodes appear or "
|
"The node sensor sends cyclical signals when it detects that nodes have "
|
||||||
"disappear,"
|
"appeared or disappeared,"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: node_sensor.lua
|
#: node_sensor.lua
|
||||||
@ -1329,6 +1331,10 @@ msgstr ""
|
|||||||
msgid "Maximum programm size exceeded"
|
msgid "Maximum programm size exceeded"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: interpreter.lua
|
||||||
|
msgid "Too many parameters"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: interpreter.lua
|
#: interpreter.lua
|
||||||
msgid "Parameter error"
|
msgid "Parameter error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -1345,14 +1351,6 @@ msgstr ""
|
|||||||
msgid "'end' missing"
|
msgid "'end' missing"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: interpreter.lua
|
|
||||||
msgid "'return' missing"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: interpreter.lua
|
|
||||||
msgid "'call' missing"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: interpreter.lua
|
#: interpreter.lua
|
||||||
msgid "Checked and approved"
|
msgid "Checked and approved"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -158,6 +158,23 @@ if minetest.get_modpath("techage") then
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
techage.register_node({"signs_bot:chest"}, {
|
||||||
|
on_pull_item = function(pos, in_dir, num)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
return techage.get_items(pos, inv, "main", num)
|
||||||
|
end,
|
||||||
|
on_push_item = function(pos, in_dir, stack)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
return techage.put_items(inv, "main", stack)
|
||||||
|
end,
|
||||||
|
on_unpull_item = function(pos, in_dir, stack)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
return techage.put_items(inv, "main", stack)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
else
|
else
|
||||||
function signs_bot.formspec_battery_capa(max_capa, current_capa)
|
function signs_bot.formspec_battery_capa(max_capa, current_capa)
|
||||||
|
@ -75,6 +75,26 @@ Available worlds will be converted to 'lsqlite3', but there is no way back, so:
|
|||||||
|
|
||||||
### History
|
### History
|
||||||
|
|
||||||
|
**2020-07-21 V0.18**
|
||||||
|
- Pull request #13: Use Monospace Font for Code-Related Formspecs (from Thomas-S)
|
||||||
|
- Pull request #14: Don't allow to put items with meta or wear information into the 8x2000 chest (from Thomas-S)
|
||||||
|
- Pull request #15: Blackhole: Add support for liquids (from Thomas-S)
|
||||||
|
- Pull request #16: ICTA Controller: Add support for valves by adding on/off states (from Thomas-S)
|
||||||
|
- Bugfix: Digging Redstone gives an 'unknown block'
|
||||||
|
- ICTA Controller: Escape quotation marks for text outputs
|
||||||
|
|
||||||
|
**2020-07-16 V0.17**
|
||||||
|
- TA4 Reactor recipe bugfix
|
||||||
|
- TA3 furnace power bugfix (response to the pull request #12 from Thomas-S)
|
||||||
|
- Manual bugfix (Thomas-S)
|
||||||
|
- Charcoal pile doesn't start smoking after beeing unloaded (issue #9 from Skamiz)
|
||||||
|
|
||||||
|
**2020-07-06 V0.16**
|
||||||
|
- Oil cracking/hydrogenation recipes added
|
||||||
|
- Ethereal growlight bugfix
|
||||||
|
- Charcoal pile bugfix (issue #9) Thanks to Skamiz
|
||||||
|
- Quarry bugfix (pull request #10) Thanks to programmerjake
|
||||||
|
|
||||||
**2020-07-02 V0.15**
|
**2020-07-02 V0.15**
|
||||||
- pipe valve added
|
- pipe valve added
|
||||||
- growlight bugfix
|
- growlight bugfix
|
||||||
|
@ -8,11 +8,32 @@
|
|||||||
GPL v3
|
GPL v3
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
All items disappear.
|
All items and liquids disappear.
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
local S = techage.S
|
local S = techage.S
|
||||||
|
local Pipe = techage.LiquidPipe
|
||||||
|
local liquid = techage.liquid
|
||||||
|
|
||||||
|
local function take_liquid(pos, indir, name, amount)
|
||||||
|
return 0, name
|
||||||
|
end
|
||||||
|
|
||||||
|
local function put_liquid(pos, indir, name, amount)
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local function peek_liquid(pos, indir)
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local networks_def = {
|
||||||
|
pipe2 = {
|
||||||
|
sides = {R=1}, -- Pipe connection sides
|
||||||
|
ntype = "tank",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
minetest.register_node("techage:blackhole", {
|
minetest.register_node("techage:blackhole", {
|
||||||
description = S("TechAge Black Hole"),
|
description = S("TechAge Black Hole"),
|
||||||
@ -20,7 +41,7 @@ minetest.register_node("techage:blackhole", {
|
|||||||
-- up, down, right, left, back, front
|
-- up, down, right, left, back, front
|
||||||
"techage_filling_ta2.png^techage_frame_ta2.png",
|
"techage_filling_ta2.png^techage_frame_ta2.png",
|
||||||
"techage_filling_ta2.png^techage_frame_ta2.png",
|
"techage_filling_ta2.png^techage_frame_ta2.png",
|
||||||
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png",
|
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png^techage_appl_hole_pipe.png",
|
||||||
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png^techage_appl_inp.png",
|
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png^techage_appl_inp.png",
|
||||||
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png",
|
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png",
|
||||||
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png",
|
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png",
|
||||||
@ -30,7 +51,14 @@ minetest.register_node("techage:blackhole", {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
meta:set_int("push_dir", techage.side_to_indir("L", node.param2))
|
meta:set_int("push_dir", techage.side_to_indir("L", node.param2))
|
||||||
meta:set_string("infotext", S("TechAge Black Hole (let items disappear)"))
|
meta:set_string("infotext", S("TechAge Black Hole (let items and liquids disappear)"))
|
||||||
|
Pipe:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode)
|
||||||
|
Pipe:after_dig_node(pos)
|
||||||
|
end,
|
||||||
|
tubelib2_on_update2 = function(pos, outdir, tlib2, node)
|
||||||
|
liquid.update_network(pos, outdir)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_rotate = screwdriver.disallow,
|
on_rotate = screwdriver.disallow,
|
||||||
@ -38,13 +66,20 @@ minetest.register_node("techage:blackhole", {
|
|||||||
groups = {choppy=2, cracky=2, crumbly=2},
|
groups = {choppy=2, cracky=2, crumbly=2},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
liquid = {
|
||||||
|
capa = 999999,
|
||||||
|
peek = peek_liquid,
|
||||||
|
put = put_liquid,
|
||||||
|
take = take_liquid,
|
||||||
|
},
|
||||||
|
networks = networks_def,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "techage:blackhole",
|
output = "techage:blackhole",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"group:wood", "", "group:wood"},
|
{"group:wood", "", "group:wood"},
|
||||||
{"techage:tubeS", "default:coal_lump", ""},
|
{"techage:tubeS", "default:coal_lump", "techage:ta3_pipeS"},
|
||||||
{"group:wood", "techage:iron_ingot", "group:wood"},
|
{"group:wood", "techage:iron_ingot", "group:wood"},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -61,3 +96,4 @@ techage.register_node({"techage:blackhole"}, {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Pipe:add_secondary_node_names({"techage:blackhole"})
|
||||||
|
@ -332,7 +332,7 @@ end
|
|||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
label = "[techage] Rinser update",
|
label = "[techage] Rinser update",
|
||||||
name = "techage:update",
|
name = "techage:rinser_update",
|
||||||
nodenames = {"techage:ta2_rinser_act", "techage:ta3_rinser_act"},
|
nodenames = {"techage:ta2_rinser_act", "techage:ta3_rinser_act"},
|
||||||
run_at_every_load = true,
|
run_at_every_load = true,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
|
@ -167,8 +167,8 @@ end
|
|||||||
|
|
||||||
local function add_to_inv(pos, item_name)
|
local function add_to_inv(pos, item_name)
|
||||||
local inv = M(pos):get_inventory()
|
local inv = M(pos):get_inventory()
|
||||||
if inv:room_for_item("main", {name = item_name}) then
|
if inv:room_for_item("main", item_name) then
|
||||||
inv:add_item("main", {name = item_name})
|
inv:add_item("main", item_name)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -381,6 +381,12 @@ local function move_from_inv_to_nvm(pos, idx)
|
|||||||
local nvm_stack = get_stack(nvm, idx)
|
local nvm_stack = get_stack(nvm, idx)
|
||||||
|
|
||||||
if inv_stack:get_count() > 0 then
|
if inv_stack:get_count() > 0 then
|
||||||
|
-- Don't handle items with meta or wear information because it would get lost.
|
||||||
|
local meta_table = inv_stack:get_meta():to_table()
|
||||||
|
if meta_table ~= nil and next(meta_table.fields) ~= nil or inv_stack:get_wear() ~= 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if nvm_stack.count == 0 or nvm_stack.name == inv_stack:get_name() then
|
if nvm_stack.count == 0 or nvm_stack.name == inv_stack:get_name() then
|
||||||
local count = math.min(inv_stack:get_count(), get_stacksize(pos) - nvm_stack.count)
|
local count = math.min(inv_stack:get_count(), get_stacksize(pos) - nvm_stack.count)
|
||||||
nvm_stack.count = nvm_stack.count + count
|
nvm_stack.count = nvm_stack.count + count
|
||||||
|
@ -226,6 +226,21 @@ function techage.item_image(x, y, itemname)
|
|||||||
label
|
label
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function techage.item_image_small(x, y, itemname, tooltip_prefix)
|
||||||
|
local name = unpack(string.split(itemname, " "))
|
||||||
|
local tooltip = ""
|
||||||
|
local ndef = minetest.registered_nodes[name] or minetest.registered_items[name] or minetest.registered_craftitems[name]
|
||||||
|
|
||||||
|
if ndef and ndef.description then
|
||||||
|
local text = minetest.formspec_escape(ndef.description)
|
||||||
|
tooltip = "tooltip["..x..","..y..";0.8,0.8;"..tooltip_prefix..": "..text..";#0C3D32;#FFFFFF]"
|
||||||
|
end
|
||||||
|
|
||||||
|
return "box["..x..","..y..";0.65,0.7;#808080]"..
|
||||||
|
"item_image["..x..","..y..";0.8,0.8;"..name.."]"..
|
||||||
|
tooltip
|
||||||
|
end
|
||||||
|
|
||||||
function techage.mydump(o, indent, nested, level)
|
function techage.mydump(o, indent, nested, level)
|
||||||
local t = type(o)
|
local t = type(o)
|
||||||
if not level and t == "userdata" then
|
if not level and t == "userdata" then
|
||||||
|
@ -176,13 +176,19 @@ local function fill_on_punch(nvm, empty_container, item_count, puncher)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function legacy_items(full_container, item_count)
|
||||||
|
if full_container == "techage:hydrogen" then
|
||||||
|
return {container = "", size = item_count, inv_item = full_container}
|
||||||
|
elseif full_container == "techage:oil_source" then
|
||||||
|
return {container = "", size = item_count, inv_item = full_container}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- check if the wielded full container can be emptied into the tank
|
||||||
-- check of the wielded full container can be emptied into the tank
|
|
||||||
local function empty_on_punch(pos, nvm, full_container, item_count)
|
local function empty_on_punch(pos, nvm, full_container, item_count)
|
||||||
nvm.liquid = nvm.liquid or {}
|
nvm.liquid = nvm.liquid or {}
|
||||||
nvm.liquid.amount = nvm.liquid.amount or 0
|
nvm.liquid.amount = nvm.liquid.amount or 0
|
||||||
local lqd_def = get_liquid_def(full_container)
|
local lqd_def = get_liquid_def(full_container) or legacy_items(full_container, item_count)
|
||||||
local ndef_lqd = LQD(pos)
|
local ndef_lqd = LQD(pos)
|
||||||
if lqd_def and ndef_lqd then
|
if lqd_def and ndef_lqd then
|
||||||
local tank_size = ndef_lqd.capa or 0
|
local tank_size = ndef_lqd.capa or 0
|
||||||
|
@ -16,7 +16,6 @@ local S = techage.S
|
|||||||
local M = minetest.get_meta
|
local M = minetest.get_meta
|
||||||
|
|
||||||
local Recipes = {} -- {rtype = {ouput = {....},...}}
|
local Recipes = {} -- {rtype = {ouput = {....},...}}
|
||||||
local RecipeList = {} -- {rtype = {<output name>,...}}
|
|
||||||
|
|
||||||
local range = techage.in_range
|
local range = techage.in_range
|
||||||
|
|
||||||
@ -47,8 +46,7 @@ end
|
|||||||
|
|
||||||
function techage.recipes.get(nvm, rtype)
|
function techage.recipes.get(nvm, rtype)
|
||||||
local recipes = Recipes[rtype] or {}
|
local recipes = Recipes[rtype] or {}
|
||||||
local recipe_list = RecipeList[rtype] or {}
|
return recipes[nvm.recipe_idx or 1]
|
||||||
return recipes[recipe_list[nvm.recipe_idx or 1]]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add 4 input/output/waste recipe
|
-- Add 4 input/output/waste recipe
|
||||||
@ -64,9 +62,6 @@ function techage.recipes.add(rtype, recipe)
|
|||||||
if not Recipes[rtype] then
|
if not Recipes[rtype] then
|
||||||
Recipes[rtype] = {}
|
Recipes[rtype] = {}
|
||||||
end
|
end
|
||||||
if not RecipeList[rtype] then
|
|
||||||
RecipeList[rtype] = {}
|
|
||||||
end
|
|
||||||
|
|
||||||
local name, num
|
local name, num
|
||||||
local item = {input = {}}
|
local item = {input = {}}
|
||||||
@ -83,8 +78,8 @@ function techage.recipes.add(rtype, recipe)
|
|||||||
item.waste = {name = name or "", num = tonumber(num) or 0}
|
item.waste = {name = name or "", num = tonumber(num) or 0}
|
||||||
name, num = unpack(string.split(recipe.output, " "))
|
name, num = unpack(string.split(recipe.output, " "))
|
||||||
item.output = {name = name or "", num = tonumber(num) or 0}
|
item.output = {name = name or "", num = tonumber(num) or 0}
|
||||||
Recipes[rtype][name] = item
|
item.catalyst = recipe.catalyst
|
||||||
RecipeList[rtype][#(RecipeList[rtype])+1] = name
|
Recipes[rtype][#Recipes[rtype]+1] = item
|
||||||
|
|
||||||
if minetest.global_exists("unified_inventory") then
|
if minetest.global_exists("unified_inventory") then
|
||||||
unified_inventory.register_craft({
|
unified_inventory.register_craft({
|
||||||
@ -97,21 +92,22 @@ end
|
|||||||
|
|
||||||
function techage.recipes.formspec(x, y, rtype, nvm)
|
function techage.recipes.formspec(x, y, rtype, nvm)
|
||||||
local recipes = Recipes[rtype] or {}
|
local recipes = Recipes[rtype] or {}
|
||||||
local recipe_list = RecipeList[rtype] or {}
|
nvm.recipe_idx = range(nvm.recipe_idx or 1, 1, #recipes)
|
||||||
nvm.recipe_idx = range(nvm.recipe_idx or 1, 1, #recipe_list)
|
|
||||||
local idx = nvm.recipe_idx
|
local idx = nvm.recipe_idx
|
||||||
local recipe = recipes[recipe_list[idx]] or RECIPE
|
local recipe = recipes[idx] or RECIPE
|
||||||
local output = recipe.output.name.." "..recipe.output.num
|
local output = recipe.output.name.." "..recipe.output.num
|
||||||
local waste = recipe.waste.name.." "..recipe.waste.num
|
local waste = recipe.waste.name.." "..recipe.waste.num
|
||||||
|
local catalyst = recipe.catalyst and techage.item_image_small(2.05, 0, recipe.catalyst, S("Catalyst")) or ""
|
||||||
return "container["..x..","..y.."]"..
|
return "container["..x..","..y.."]"..
|
||||||
"background[0,0;4,3;techage_form_grey.png]"..
|
"background[0,0;4,3;techage_form_grey.png]"..
|
||||||
input_string(recipe)..
|
input_string(recipe)..
|
||||||
"image[2,0.5;1,1;techage_form_arrow.png]"..
|
"image[2,0.7;1,1;techage_form_arrow.png]"..
|
||||||
|
catalyst..
|
||||||
techage.item_image(2.95, 0, output)..
|
techage.item_image(2.95, 0, output)..
|
||||||
techage.item_image(2.95, 1, waste)..
|
techage.item_image(2.95, 1, waste)..
|
||||||
"button[0,2;1,1;priv;<<]"..
|
"button[0,2;1,1;priv;<<]"..
|
||||||
"button[1,2;1,1;next;>>]"..
|
"button[1,2;1,1;next;>>]"..
|
||||||
"label[1.9,2.2;"..S("Recipe")..": "..idx.."/"..#recipe_list.."]"..
|
"label[1.9,2.2;"..S("Recipe")..": "..idx.."/"..#recipes.."]"..
|
||||||
"container_end[]"
|
"container_end[]"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -117,6 +117,16 @@ local function can_start(pos, nvm, state)
|
|||||||
if not res then
|
if not res then
|
||||||
return S("reactor defect or no power")
|
return S("reactor defect or no power")
|
||||||
end
|
end
|
||||||
|
local recipe = recipes.get(nvm, "ta4_doser")
|
||||||
|
if recipe.catalyst then
|
||||||
|
res = reactor_cmnd(pos, "catalyst")
|
||||||
|
if not res or res == "" then
|
||||||
|
return S("catalyst missing")
|
||||||
|
end
|
||||||
|
if res ~= recipe.catalyst then
|
||||||
|
return S("wrong catalyst")
|
||||||
|
end
|
||||||
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -154,6 +164,10 @@ local function dosing(pos, nvm, elapsed)
|
|||||||
State:idle(pos, nvm)
|
State:idle(pos, nvm)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
-- available liquids
|
||||||
|
local liquids = get_liquids(pos)
|
||||||
|
local recipe = recipes.get(nvm, "ta4_doser")
|
||||||
|
if not liquids or not recipe then return end
|
||||||
-- check from time to time
|
-- check from time to time
|
||||||
nvm.check_cnt = (nvm.check_cnt or 0) + 1
|
nvm.check_cnt = (nvm.check_cnt or 0) + 1
|
||||||
if nvm.check_cnt >= 4 then
|
if nvm.check_cnt >= 4 then
|
||||||
@ -164,11 +178,20 @@ local function dosing(pos, nvm, elapsed)
|
|||||||
reactor_cmnd(pos, "stop")
|
reactor_cmnd(pos, "stop")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if recipe.catalyst then
|
||||||
|
res = reactor_cmnd(pos, "catalyst")
|
||||||
|
if not res then
|
||||||
|
State:fault(pos, nvm, S("catalyst missing"))
|
||||||
|
reactor_cmnd(pos, "stop")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if res ~= recipe.catalyst then
|
||||||
|
State:fault(pos, nvm, S("wrong catalyst"))
|
||||||
|
reactor_cmnd(pos, "stop")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- available liquids
|
|
||||||
local liquids = get_liquids(pos)
|
|
||||||
local recipe = recipes.get(nvm, "ta4_doser")
|
|
||||||
if not liquids or not recipe then return end
|
|
||||||
-- inputs
|
-- inputs
|
||||||
local starter = get_starter_name(pos)
|
local starter = get_starter_name(pos)
|
||||||
for _,item in pairs(recipe.input) do
|
for _,item in pairs(recipe.input) do
|
||||||
|
@ -102,12 +102,49 @@ techage.register_node({"techage:ta4_reactor_fillerpipe"}, {
|
|||||||
return true
|
return true
|
||||||
elseif topic == "waste" then
|
elseif topic == "waste" then
|
||||||
return base_waste(pos, payload or {})
|
return base_waste(pos, payload or {})
|
||||||
|
elseif topic == "catalyst" then
|
||||||
|
local pos2,node = Pipe:get_node(pos, 5)
|
||||||
|
if not node or node.name ~= "techage:ta4_reactor" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local inv = M(pos2):get_inventory()
|
||||||
|
local stack = inv:get_stack("main", 1)
|
||||||
|
return stack and stack:get_name()
|
||||||
else
|
else
|
||||||
return stand_cmnd(pos, topic, payload or {})
|
return stand_cmnd(pos, topic, payload or {})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local function formspec()
|
||||||
|
local title = S("TA4 Reactor")
|
||||||
|
return "size[8,6]"..
|
||||||
|
default.gui_bg..
|
||||||
|
default.gui_bg_img..
|
||||||
|
default.gui_slots..
|
||||||
|
"box[0,-0.1;7.8,0.5;#c6e8ff]"..
|
||||||
|
"label[3,-0.1;"..minetest.colorize("#000000", title).."]"..
|
||||||
|
"label[4.5,1.2;"..S("Catalyst").."]"..
|
||||||
|
"list[context;main;3.5,1;1,1;]"..
|
||||||
|
"list[current_player;main;0,2.3;8,4;]"..
|
||||||
|
"listring[context;main]"..
|
||||||
|
"listring[current_player;main]"
|
||||||
|
end
|
||||||
|
|
||||||
|
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return stack:get_count()
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("techage:ta4_reactor", {
|
minetest.register_node("techage:ta4_reactor", {
|
||||||
description = S("TA4 Reactor"),
|
description = S("TA4 Reactor"),
|
||||||
tiles = {"techage_reactor_side.png"},
|
tiles = {"techage_reactor_side.png"},
|
||||||
@ -121,6 +158,13 @@ minetest.register_node("techage:ta4_reactor", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-1/2, -23/32, -1/2, 1/2, 32/32, 1/2},
|
fixed = {-1/2, -23/32, -1/2, 1/2, 32/32, 1/2},
|
||||||
},
|
},
|
||||||
|
after_place_node = function(pos)
|
||||||
|
local inv = M(pos):get_inventory()
|
||||||
|
inv:set_size('main', 1)
|
||||||
|
M(pos):set_string("formspec", formspec())
|
||||||
|
end,
|
||||||
|
allow_metadata_inventory_put = allow_metadata_inventory_put,
|
||||||
|
allow_metadata_inventory_take = allow_metadata_inventory_take,
|
||||||
|
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -149,3 +193,20 @@ minetest.register_craft({
|
|||||||
{'default:steel_ingot', 'basic_materials:motor', 'default:steel_ingot'},
|
{'default:steel_ingot', 'basic_materials:motor', 'default:steel_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_lbm({
|
||||||
|
label = "Upgrade reactor",
|
||||||
|
name = "techage:update_reactor",
|
||||||
|
|
||||||
|
nodenames = {
|
||||||
|
"techage:ta4_reactor",
|
||||||
|
},
|
||||||
|
|
||||||
|
run_at_every_load = true,
|
||||||
|
|
||||||
|
action = function(pos, node)
|
||||||
|
local inv = M(pos):get_inventory()
|
||||||
|
inv:set_size('main', 1)
|
||||||
|
M(pos):set_string("formspec", formspec())
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
@ -253,7 +253,7 @@ techage.manual_DE.aText = {
|
|||||||
"\n",
|
"\n",
|
||||||
"Basalt entsteht nur\\, wenn Lava und Wasser zusammenkommen.\n"..
|
"Basalt entsteht nur\\, wenn Lava und Wasser zusammenkommen.\n"..
|
||||||
"Dazu sollte man am besten eine Anlage aufbauen\\, bei der eine Lava- und eine Wasserquelle zusammenfließen.\n"..
|
"Dazu sollte man am besten eine Anlage aufbauen\\, bei der eine Lava- und eine Wasserquelle zusammenfließen.\n"..
|
||||||
"Dort wo sich beide Flüssigkeiten treffen\\, entsteht Lava.\n"..
|
"Dort wo sich beide Flüssigkeiten treffen\\, entsteht Basalt.\n"..
|
||||||
"Einen automatisierten Basalt Generator kann man mit dem Sign Bot aufbauen.\n"..
|
"Einen automatisierten Basalt Generator kann man mit dem Sign Bot aufbauen.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
@ -1233,6 +1233,12 @@ techage.manual_DE.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"Hinweis 2: Tanks oder Silos mit verschiedenen Inhalten dürfen nicht zu einem Leitungssystem verbunden werden. Mehrere Tanks oder Silos mit gleichem Inhalt dürfen dagegen parallel an einer Leitung hängen.\n"..
|
"Hinweis 2: Tanks oder Silos mit verschiedenen Inhalten dürfen nicht zu einem Leitungssystem verbunden werden. Mehrere Tanks oder Silos mit gleichem Inhalt dürfen dagegen parallel an einer Leitung hängen.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
|
"Beim Cracken werden lange Kette von Kohlenwasserstoffen unter Verwendung eines Katalysator in kurze Ketten gebrochen.\n"..
|
||||||
|
"Als Katalysator dient Gibbsitpulver (wird nicht verbraucht). Damit kann Bitumen in Schweröl\\, Schweröl in Naphtha und Naphtha in Benzin umgewandelt werden.\n"..
|
||||||
|
"\n"..
|
||||||
|
"Bei der Hydrierung werden einem Molekül Paare von Wasserstoffatomen hinzugefügt\\, um kurzkettige Kohlenwasserstoffe in lange umzuwandeln. Hier wird Eisenpulver als Katalysator benötigt (wird nicht verbraucht). Damit kann Benzin in Naphtha\\, \n"..
|
||||||
|
"Naphtha in Schweröl und Schweröl in Bitumen umgewandelt werden.\n"..
|
||||||
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"Teil des Chemischen Reaktors.\n"..
|
"Teil des Chemischen Reaktors.\n"..
|
||||||
@ -1249,7 +1255,8 @@ techage.manual_DE.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"Teil des Chemischen Reaktors.\n"..
|
"Teil des Chemischen Reaktors. Der Reaktor verfügt über ein Inventar für die Katalysator \n"..
|
||||||
|
"Gegenstände (für Cracking- und Hydrierungs-Rezepte).\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -253,7 +253,7 @@ techage.manual_EN.aText = {
|
|||||||
"\n",
|
"\n",
|
||||||
"Basalt is only created when lava and water come together.\n"..
|
"Basalt is only created when lava and water come together.\n"..
|
||||||
"The best thing to do is to set up a system where a lava and a water source flow together.\n"..
|
"The best thing to do is to set up a system where a lava and a water source flow together.\n"..
|
||||||
"Lava is formed where both liquids meet.\n"..
|
"Basalt is formed where both liquids meet.\n"..
|
||||||
"You can build an automated basalt generator with the Sign Bot.\n"..
|
"You can build an automated basalt generator with the Sign Bot.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
@ -1224,6 +1224,13 @@ techage.manual_EN.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"Note 2: Tanks or silos with different contents must not be connected to a pipe system. In contrast\\, several tanks or silos with the same content may hang in parallel on one line.\n"..
|
"Note 2: Tanks or silos with different contents must not be connected to a pipe system. In contrast\\, several tanks or silos with the same content may hang in parallel on one line.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
|
"Cracking breaks long chains of hydrocarbons into short chains using a catalyst.\n"..
|
||||||
|
"Gibbsite powder serves as a catalyst (is not consumed). It can be used to convert bitumen into fueloil\\, fueloil into naphtha and naphtha into gasoline.\n"..
|
||||||
|
"\n"..
|
||||||
|
"In hydrogenation\\, pairs of hydrogen atoms are added to a molecule to convert short-chain hydrocarbons into long ones. \n"..
|
||||||
|
"Here iron powder is required as a catalyst (is not consumed). It can be used to convert gasoline into naphtha\\,\n"..
|
||||||
|
"naphtha into fueloil\\, and fueloil into bitumen.\n"..
|
||||||
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"Part of the chemical reactor.\n"..
|
"Part of the chemical reactor.\n"..
|
||||||
@ -1234,13 +1241,13 @@ techage.manual_EN.aText = {
|
|||||||
"As with other machines:\n"..
|
"As with other machines:\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
" - if the doser is in standby mode\\, one or more ingredients are missing\n"..
|
" - if the doser is in standby mode\\, one or more ingredients are missing\n"..
|
||||||
" - if thedoser is in the blocked state\\, the outlet tank or silo is full\\, defective or incorrectly connected\n"..
|
" - if the doser is in the blocked state\\, the outlet tank or silo is full\\, defective or incorrectly connected\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"The doser does not need any electricity. A recipe is processed every 10 s.\n"..
|
"The doser does not need any electricity. A recipe is processed every 10 s.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"Part of the chemical reactor.\n"..
|
"Part of the chemical reactor. The reactor has a inventory for the catalyst items (for cracking and hydrogenation recipes).\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -189,6 +189,8 @@ techage.register_node({"techage:ta3_booster", "techage:ta3_booster_on"}, {
|
|||||||
if topic == "power" then
|
if topic == "power" then
|
||||||
return techage.get_node_lvm(pos).name == "techage:ta3_booster_on" or
|
return techage.get_node_lvm(pos).name == "techage:ta3_booster_on" or
|
||||||
power.power_available(pos, Cable)
|
power.power_available(pos, Cable)
|
||||||
|
elseif topic == "running" then
|
||||||
|
return techage.get_node_lvm(pos).name == "techage:ta3_booster_on"
|
||||||
elseif topic == "start" and not nvm.running then
|
elseif topic == "start" and not nvm.running then
|
||||||
if power.power_available(pos, Cable) then
|
if power.power_available(pos, Cable) then
|
||||||
nvm.running = true
|
nvm.running = true
|
||||||
|
@ -228,7 +228,7 @@ techage.register_node({"techage:furnace_firebox", "techage:furnace_firebox_on"},
|
|||||||
if topic == "fuel" then
|
if topic == "fuel" then
|
||||||
return has_fuel(pos, nvm) and booster_cmnd(pos, "power")
|
return has_fuel(pos, nvm) and booster_cmnd(pos, "power")
|
||||||
elseif topic == "running" then
|
elseif topic == "running" then
|
||||||
return nvm.running and booster_cmnd(pos, "power")
|
return nvm.running and booster_cmnd(pos, "running")
|
||||||
elseif topic == "start" then
|
elseif topic == "start" then
|
||||||
start_firebox(pos, nvm)
|
start_firebox(pos, nvm)
|
||||||
booster_cmnd(pos, "start")
|
booster_cmnd(pos, "start")
|
||||||
|
@ -85,9 +85,17 @@ local function firebox_cmnd(pos, cmnd)
|
|||||||
"techage:furnace_heater", "techage:furnace_heater_on"})
|
"techage:furnace_heater", "techage:furnace_heater_on"})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function firebox_has_fuel(nvm, pos)
|
||||||
|
if nvm.techage_state == techage.RUNNING then
|
||||||
|
return firebox_cmnd(pos, "running")
|
||||||
|
else
|
||||||
|
return firebox_cmnd(pos, "fuel")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function cooking(pos, crd, nvm, elapsed)
|
local function cooking(pos, crd, nvm, elapsed)
|
||||||
if nvm.techage_state == techage.RUNNING or check_if_worth_to_wakeup(pos, nvm) then
|
if nvm.techage_state == techage.RUNNING or check_if_worth_to_wakeup(pos, nvm) then
|
||||||
if firebox_cmnd(pos, "fuel") then
|
if firebox_has_fuel(nvm, pos) then
|
||||||
local state, err = smelting(pos, nvm, elapsed)
|
local state, err = smelting(pos, nvm, elapsed)
|
||||||
if state == techage.RUNNING then
|
if state == techage.RUNNING then
|
||||||
crd.State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
crd.State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
|
@ -16,11 +16,6 @@
|
|||||||
local M = minetest.get_meta
|
local M = minetest.get_meta
|
||||||
local S = techage.S
|
local S = techage.S
|
||||||
|
|
||||||
local firebox = techage.firebox
|
|
||||||
local fuel = techage.fuel
|
|
||||||
local Pipe = techage.LiquidPipe
|
|
||||||
local liquid = techage.liquid
|
|
||||||
|
|
||||||
local CYCLE_TIME = 2
|
local CYCLE_TIME = 2
|
||||||
local PWR_NEEDED = 14
|
local PWR_NEEDED = 14
|
||||||
|
|
||||||
@ -166,6 +161,3 @@ techage.register_node({"techage:furnace_heater", "techage:furnace_heater_on"}, {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
Pipe:add_secondary_node_names({"techage:furnace_heater", "techage:furnace_heater_on"})
|
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ end
|
|||||||
-- '#' is used as placeholder for rule numbers and has to be escaped
|
-- '#' is used as placeholder for rule numbers and has to be escaped
|
||||||
function techage.icta_escape(s)
|
function techage.icta_escape(s)
|
||||||
s = tostring(s)
|
s = tostring(s)
|
||||||
|
s = s:gsub('"', '\\"') -- to prevent code injection!!!
|
||||||
return s:gsub("#", '"..string.char(35).."')
|
return s:gsub("#", '"..string.char(35).."')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -179,7 +180,7 @@ techage.icta_register_condition("state", {
|
|||||||
type = "textlist",
|
type = "textlist",
|
||||||
name = "value",
|
name = "value",
|
||||||
label = "",
|
label = "",
|
||||||
choices = "stopped,running,standby,blocked,nopower,fault,unloaded,invalid",
|
choices = "stopped,running,standby,blocked,nopower,fault,unloaded,invalid,on,off",
|
||||||
default = "stopped",
|
default = "stopped",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -553,7 +554,7 @@ techage.icta_register_action("chat", {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
code = function(data, environ)
|
code = function(data, environ)
|
||||||
return 'minetest.chat_send_player("'..environ.owner..'", "[TA4 ICTA Controller] '..data.text..' ")'
|
return 'minetest.chat_send_player("'..environ.owner..'", "[TA4 ICTA Controller] '..techage.icta_escape(data.text)..' ")'
|
||||||
end,
|
end,
|
||||||
button = function(data, environ)
|
button = function(data, environ)
|
||||||
return 'chat("'..data.text:sub(1,12)..'")'
|
return 'chat("'..data.text:sub(1,12)..'")'
|
||||||
@ -644,7 +645,7 @@ techage.icta_register_condition("playerdetector", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
code = function(data, environ)
|
code = function(data, environ)
|
||||||
return 'techage.icta_player_detect("'..environ.number..'", "'..data.number..'", "'..data.name..'")', "~= nil"
|
return 'techage.icta_player_detect("'..environ.number..'", "'..data.number..'", "'..techage.icta_escape(data.name)..'")', "~= nil"
|
||||||
end,
|
end,
|
||||||
button = function(data, environ)
|
button = function(data, environ)
|
||||||
return "detector("..techage.fmt_number(data.number)..","..data.name:sub(1,8)..")"
|
return "detector("..techage.fmt_number(data.number)..","..data.name:sub(1,8)..")"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
techage = {}
|
techage = {}
|
||||||
|
|
||||||
-- Version for compatibility checks, see readme.md/history
|
-- Version for compatibility checks, see readme.md/history
|
||||||
techage.version = 0.14
|
techage.version = 0.18
|
||||||
|
|
||||||
if minetest.global_exists("tubelib") then
|
if minetest.global_exists("tubelib") then
|
||||||
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
||||||
@ -300,6 +300,7 @@ dofile(MP.."/items/hydrogen.lua")
|
|||||||
dofile(MP.."/items/electronic.lua")
|
dofile(MP.."/items/electronic.lua")
|
||||||
dofile(MP.."/items/redstone.lua")
|
dofile(MP.."/items/redstone.lua")
|
||||||
dofile(MP.."/items/cement.lua")
|
dofile(MP.."/items/cement.lua")
|
||||||
|
dofile(MP.."/items/cracking.lua")
|
||||||
|
|
||||||
if techage.basalt_stone_enabled then
|
if techage.basalt_stone_enabled then
|
||||||
dofile(MP.."/items/basalt.lua")
|
dofile(MP.."/items/basalt.lua")
|
||||||
|
@ -207,7 +207,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
label = "[techage] Lighter update",
|
label = "[techage] Lighter update",
|
||||||
name = "techage:update",
|
name = "techage:lighter_update",
|
||||||
nodenames = {"techage:lighter_burn"},
|
nodenames = {"techage:lighter_burn"},
|
||||||
run_at_every_load = true,
|
run_at_every_load = true,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
|
73
techage/items/cracking.lua
Normal file
73
techage/items/cracking.lua
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2020 Joachim Stolberg
|
||||||
|
|
||||||
|
GPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
Cracking breaks long chains of hydrocarbons into short chains using a catalyst.
|
||||||
|
Gibbsite powder serves as a catalyst (is not consumed).
|
||||||
|
It can be used to convert bitumen into fueloil, fueloil into naphtha and naphtha into gasoline.
|
||||||
|
|
||||||
|
In hydrogenation, pairs of hydrogen atoms are added to a molecule to convert short-chain
|
||||||
|
hydrocarbons into long ones.
|
||||||
|
Here iron powder is required as a catalyst (is not consumed).
|
||||||
|
It can be used to convert gasoline into naphtha, naphtha into fueloil, and fueloil into bitumen.
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- Cracking
|
||||||
|
techage.recipes.add("ta4_doser", {
|
||||||
|
output = "techage:fueloil 1",
|
||||||
|
input = {
|
||||||
|
"techage:bitumen 1",
|
||||||
|
},
|
||||||
|
catalyst = "techage:gibbsite_powder",
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.recipes.add("ta4_doser", {
|
||||||
|
output = "techage:naphtha 1",
|
||||||
|
input = {
|
||||||
|
"techage:fueloil 1",
|
||||||
|
},
|
||||||
|
catalyst = "techage:gibbsite_powder",
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.recipes.add("ta4_doser", {
|
||||||
|
output = "techage:gasoline 1",
|
||||||
|
input = {
|
||||||
|
"techage:naphtha 1",
|
||||||
|
},
|
||||||
|
catalyst = "techage:gibbsite_powder",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Hydrogenate
|
||||||
|
techage.recipes.add("ta4_doser", {
|
||||||
|
output = "techage:bitumen 2",
|
||||||
|
input = {
|
||||||
|
"techage:fueloil 1",
|
||||||
|
"techage:hydrogen 1",
|
||||||
|
},
|
||||||
|
catalyst = "techage:iron_powder",
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.recipes.add("ta4_doser", {
|
||||||
|
output = "techage:fueloil 2",
|
||||||
|
input = {
|
||||||
|
"techage:naphtha 1",
|
||||||
|
"techage:hydrogen 1",
|
||||||
|
},
|
||||||
|
catalyst = "techage:iron_powder",
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.recipes.add("ta4_doser", {
|
||||||
|
output = "techage:naphtha 2",
|
||||||
|
input = {
|
||||||
|
"techage:gasoline 1",
|
||||||
|
"techage:hydrogen 1",
|
||||||
|
},
|
||||||
|
catalyst = "techage:iron_powder",
|
||||||
|
})
|
@ -26,6 +26,12 @@ minetest.register_craftitem("techage:needle_powder", {
|
|||||||
groups = {powder = 1},
|
groups = {powder = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("techage:iron_powder", {
|
||||||
|
description = S("Iron Powder"),
|
||||||
|
inventory_image = "techage_powder_inv.png^[colorize:#c7643d:160",
|
||||||
|
groups = {powder = 1},
|
||||||
|
})
|
||||||
|
|
||||||
techage.add_grinder_recipe({input="default:acacia_bush_leaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:acacia_bush_leaves", output="techage:leave_powder"})
|
||||||
techage.add_grinder_recipe({input="default:acacia_leaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:acacia_leaves", output="techage:leave_powder"})
|
||||||
techage.add_grinder_recipe({input="default:aspen_leaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:aspen_leaves", output="techage:leave_powder"})
|
||||||
@ -33,6 +39,6 @@ techage.add_grinder_recipe({input="default:blueberry_bush_leaves", output="techa
|
|||||||
techage.add_grinder_recipe({input="default:bush_leaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:bush_leaves", output="techage:leave_powder"})
|
||||||
techage.add_grinder_recipe({input="default:jungleleaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:jungleleaves", output="techage:leave_powder"})
|
||||||
techage.add_grinder_recipe({input="default:leaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:leaves", output="techage:leave_powder"})
|
||||||
|
|
||||||
techage.add_grinder_recipe({input="default:pine_needles", output="techage:needle_powder"})
|
techage.add_grinder_recipe({input="default:pine_needles", output="techage:needle_powder"})
|
||||||
|
techage.add_grinder_recipe({input="default:iron_lump", output="techage:iron_powder"})
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ minetest.register_node("techage:red_stone", {
|
|||||||
description = S("Red Stone"),
|
description = S("Red Stone"),
|
||||||
tiles = {"default_stone.png^[colorize:#ff4538:110"},
|
tiles = {"default_stone.png^[colorize:#ff4538:110"},
|
||||||
groups = {cracky = 3, stone = 1},
|
groups = {cracky = 3, stone = 1},
|
||||||
drop = 'techage:basalt_cobble',
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ local function node_timer(pos, elapsed)
|
|||||||
power.consumer_alive(pos, Cable, CYCLE_TIME)
|
power.consumer_alive(pos, Cable, CYCLE_TIME)
|
||||||
local nvm = techage.get_nvm(pos)
|
local nvm = techage.get_nvm(pos)
|
||||||
local mem = techage.get_mem(pos)
|
local mem = techage.get_mem(pos)
|
||||||
mem.grow_pos = mem.grow_pos or {} -- keep the pos blank for same time
|
mem.grow_pos = mem.grow_pos or {} -- keep the pos blank for some time
|
||||||
nvm.tick = nvm.tick or math.random(RANDOM_VAL, RANDOM_VAL*2)
|
nvm.tick = nvm.tick or math.random(RANDOM_VAL, RANDOM_VAL*2)
|
||||||
nvm.tick = nvm.tick - 1
|
nvm.tick = nvm.tick - 1
|
||||||
if nvm.tick == 0 then
|
if nvm.tick == 0 then
|
||||||
@ -153,6 +153,8 @@ minetest.after(1, function()
|
|||||||
if ndef.on_timer then -- probably a plant that still needs to grow
|
if ndef.on_timer then -- probably a plant that still needs to grow
|
||||||
techage.register_plant(name)
|
techage.register_plant(name)
|
||||||
end
|
end
|
||||||
|
elseif mod == "flowers" then
|
||||||
|
techage.register_flower(name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -26,14 +26,18 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
|||||||
if minetest.is_protected(pos, player:get_player_name()) then
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
local nvm = techage.get_nvm(pos)
|
-- check if it is powder
|
||||||
nvm.item_name = nil
|
local ndef = minetest.registered_craftitems[stack:get_name()] or {}
|
||||||
local inv = minetest.get_meta(pos):get_inventory()
|
if ndef.groups and ndef.groups.powder == 1 then
|
||||||
if inv:is_empty(listname) then
|
local nvm = techage.get_nvm(pos)
|
||||||
return stack:get_count()
|
nvm.item_name = nil
|
||||||
end
|
local inv = minetest.get_meta(pos):get_inventory()
|
||||||
if inv:contains_item(listname, ItemStack(stack:get_name())) then
|
if inv:is_empty(listname) then
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
|
end
|
||||||
|
if inv:contains_item(listname, ItemStack(stack:get_name())) then
|
||||||
|
return stack:get_count()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
@ -229,10 +233,21 @@ techage.register_node({"techage:ta3_silo", "techage:ta4_silo"}, {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_push_item = function(pos, in_dir, stack)
|
on_push_item = function(pos, in_dir, stack)
|
||||||
local inv = M(pos):get_inventory()
|
-- check if it is powder
|
||||||
if inv:room_for_item("main", stack) then
|
local name = stack:get_name()
|
||||||
inv:add_item("main", stack)
|
local ndef = minetest.registered_craftitems[name] or {}
|
||||||
return true
|
if ndef.groups and ndef.groups.powder == 1 then
|
||||||
|
local inv = M(pos):get_inventory()
|
||||||
|
|
||||||
|
if inv:is_empty("main") then
|
||||||
|
inv:add_item("main", stack)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if inv:contains_item("main", name) and inv:room_for_item("main", stack) then
|
||||||
|
inv:add_item("main", stack)
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end,
|
end,
|
||||||
|
@ -32,6 +32,9 @@ Bauxite Stone=Bauxit
|
|||||||
Biome=Biom
|
Biome=Biom
|
||||||
Block configured items for open ports=Blockiere konfigurierte Gegenstände für offene Ausgänge
|
Block configured items for open ports=Blockiere konfigurierte Gegenstände für offene Ausgänge
|
||||||
Build derrick=Errichte Ölturm
|
Build derrick=Errichte Ölturm
|
||||||
|
Catalyst=Katalysator
|
||||||
|
Cement Block=Zement Block
|
||||||
|
Cement Powder=Zement Pulver
|
||||||
Compressed Gravel=Komprimiertes Kies
|
Compressed Gravel=Komprimiertes Kies
|
||||||
Configure up to 8 items @nto be pushed by the injector=Konfiguriere bis zu 8 Gegenstände \n die vom Injektor weitergegeben werden sollen
|
Configure up to 8 items @nto be pushed by the injector=Konfiguriere bis zu 8 Gegenstände \n die vom Injektor weitergegeben werden sollen
|
||||||
Consum. 1=Konsum. 1
|
Consum. 1=Konsum. 1
|
||||||
@ -89,6 +92,7 @@ Insert door/gate block number(s)=Gebe Tür-/Tornummer(n) ein
|
|||||||
Intake=Stromaufnahme
|
Intake=Stromaufnahme
|
||||||
Inventory,Configuration=Inventar,Konfiguration
|
Inventory,Configuration=Inventar,Konfiguration
|
||||||
Inverter=Wechselrichter
|
Inverter=Wechselrichter
|
||||||
|
Iron Powder=Eisen Pulver
|
||||||
Leave Powder=Laub Pulver
|
Leave Powder=Laub Pulver
|
||||||
Liquid Filler=Einfülltrichter
|
Liquid Filler=Einfülltrichter
|
||||||
Liquid Sampler=Flüssigkeitensammler
|
Liquid Sampler=Flüssigkeitensammler
|
||||||
@ -161,7 +165,7 @@ Rinsing=Waschen
|
|||||||
River Water Barrel=Flusswasserfass
|
River Water Barrel=Flusswasserfass
|
||||||
Save=Speichern
|
Save=Speichern
|
||||||
Select type=Wähle Typ
|
Select type=Wähle Typ
|
||||||
Send an event if state is equal or larget than=Senden ein Event wenn Status größer oder gleich als
|
Send an event if state is equal or larger than=Senden ein Event wenn Status größer oder gleich als
|
||||||
Send signal if nodes have been:=Sende ein Signal falls Blöcke:
|
Send signal if nodes have been:=Sende ein Signal falls Blöcke:
|
||||||
Show all forceload blocks in a 64x64x64 range=Zeige alle Forceload Blöcke im Umkreis von 64x64x64 Blöcken
|
Show all forceload blocks in a 64x64x64 range=Zeige alle Forceload Blöcke im Umkreis von 64x64x64 Blöcken
|
||||||
Sieved Basalt Gravel=Basaltkies gesiebt
|
Sieved Basalt Gravel=Basaltkies gesiebt
|
||||||
@ -203,6 +207,7 @@ TA Power Switch Box=TA Stromschalterbox
|
|||||||
TA Power Switch Small=TA Stromschalter klein
|
TA Power Switch Small=TA Stromschalter klein
|
||||||
TA Street Lamp=TA Straßenlampe
|
TA Street Lamp=TA Straßenlampe
|
||||||
TA Tank Cart=TA Tankwagen
|
TA Tank Cart=TA Tankwagen
|
||||||
|
TA Valve=TA Ventil
|
||||||
TA1 Bronze Hammer (smash stone to gravel)=TA1 Bronzehammer (zerschlage Stein zu Kies)
|
TA1 Bronze Hammer (smash stone to gravel)=TA1 Bronzehammer (zerschlage Stein zu Kies)
|
||||||
TA1 Burning=TA1 Brennen
|
TA1 Burning=TA1 Brennen
|
||||||
TA1 Charcoal=TA1 Holzkohle
|
TA1 Charcoal=TA1 Holzkohle
|
||||||
@ -291,6 +296,8 @@ TA3 Timer=TA3 Timer
|
|||||||
TA3 Tiny Power Generator=TA3 Kleiner Stromgenerator
|
TA3 Tiny Power Generator=TA3 Kleiner Stromgenerator
|
||||||
TA3 Turbine=TA3 Turbine
|
TA3 Turbine=TA3 Turbine
|
||||||
TA3 Vacuum Tube=TA3 Vakuumröhre
|
TA3 Vacuum Tube=TA3 Vakuumröhre
|
||||||
|
TA3 Valve closed=TA3 Ventil zu
|
||||||
|
TA3 Valve open=TA3 Ventil offen
|
||||||
TA4 8x2000 Chest=TA4 8x2000 Kiste
|
TA4 8x2000 Chest=TA4 8x2000 Kiste
|
||||||
TA4 Button/Switch=TA4 Schalter/Taster
|
TA4 Button/Switch=TA4 Schalter/Taster
|
||||||
TA4 Carbon Fiber=TA4 Kohlefaser
|
TA4 Carbon Fiber=TA4 Kohlefaser
|
||||||
@ -348,7 +355,7 @@ TA4 Wind Turbine=TA4 Windkraftanlage
|
|||||||
TA4 Wind Turbine Nacelle=TA4 Windkraftanlagengondel
|
TA4 Wind Turbine Nacelle=TA4 Windkraftanlagengondel
|
||||||
TA4 Wind Turbine Signal Lamp=TA4 Windkraftanlagenlampe
|
TA4 Wind Turbine Signal Lamp=TA4 Windkraftanlagenlampe
|
||||||
TechAge Black Hole=TechAge Schwarzes Loch
|
TechAge Black Hole=TechAge Schwarzes Loch
|
||||||
TechAge Black Hole (let items disappear)=TechAge Schwarzes Loch (Gegenstände verschwinden)
|
TechAge Black Hole (let items and liquids disappear)=TechAge Schwarzes Loch (Gegenstände und Flüssigkeiten verschwinden)
|
||||||
TechAge Door Block=TechAge Türblock
|
TechAge Door Block=TechAge Türblock
|
||||||
TechAge Gate Block=TechAge Torblock
|
TechAge Gate Block=TechAge Torblock
|
||||||
TechAge Gravel=TechAge Kies
|
TechAge Gravel=TechAge Kies
|
||||||
@ -404,6 +411,7 @@ added=hinzugefügt wird
|
|||||||
added or removed=hinzugefügt oder entfernt wird
|
added or removed=hinzugefügt oder entfernt wird
|
||||||
area is protected=Bereich ist geschützt
|
area is protected=Bereich ist geschützt
|
||||||
blocking mode=Blockiert
|
blocking mode=Blockiert
|
||||||
|
catalyst missing=Katalysator fehlt
|
||||||
commands like: help=Kommandos wie: help
|
commands like: help=Kommandos wie: help
|
||||||
connected with=verbunden mit
|
connected with=verbunden mit
|
||||||
depth=Tiefe
|
depth=Tiefe
|
||||||
@ -436,5 +444,6 @@ right to left=von rechts nach links
|
|||||||
stopped=gestoppt
|
stopped=gestoppt
|
||||||
storage empty?=Speicher leer?
|
storage empty?=Speicher leer?
|
||||||
water temperature=Wassertemperatur
|
water temperature=Wassertemperatur
|
||||||
|
wrong catalyst=falscher Katalysator
|
||||||
wrong storage diameter=Falscher Wärmespeicher-Durchmesser
|
wrong storage diameter=Falscher Wärmespeicher-Durchmesser
|
||||||
##### not used anymore #####
|
##### not used anymore #####
|
||||||
|
@ -30,6 +30,9 @@ Bauxite Stone=
|
|||||||
Biome=
|
Biome=
|
||||||
Block configured items for open ports=
|
Block configured items for open ports=
|
||||||
Build derrick=
|
Build derrick=
|
||||||
|
Catalyst=
|
||||||
|
Cement Block=
|
||||||
|
Cement Powder=
|
||||||
Compressed Gravel=
|
Compressed Gravel=
|
||||||
Configure up to 8 items @nto be pushed by the injector=
|
Configure up to 8 items @nto be pushed by the injector=
|
||||||
Consum. 1=
|
Consum. 1=
|
||||||
@ -87,6 +90,7 @@ Insert door/gate block number(s)=
|
|||||||
Intake=
|
Intake=
|
||||||
Inventory,Configuration=
|
Inventory,Configuration=
|
||||||
Inverter=
|
Inverter=
|
||||||
|
Iron Powder=
|
||||||
Leave Powder=
|
Leave Powder=
|
||||||
Liquid Filler=
|
Liquid Filler=
|
||||||
Liquid Sampler=
|
Liquid Sampler=
|
||||||
@ -159,7 +163,7 @@ Rinsing=
|
|||||||
River Water Barrel=
|
River Water Barrel=
|
||||||
Save=
|
Save=
|
||||||
Select type=
|
Select type=
|
||||||
Send an event if state is equal or larget than=
|
Send an event if state is equal or larger than=
|
||||||
Send signal if nodes have been:=
|
Send signal if nodes have been:=
|
||||||
Show all forceload blocks in a 64x64x64 range=
|
Show all forceload blocks in a 64x64x64 range=
|
||||||
Sieved Basalt Gravel=
|
Sieved Basalt Gravel=
|
||||||
@ -201,6 +205,7 @@ TA Power Switch Box=
|
|||||||
TA Power Switch Small=
|
TA Power Switch Small=
|
||||||
TA Street Lamp=
|
TA Street Lamp=
|
||||||
TA Tank Cart=
|
TA Tank Cart=
|
||||||
|
TA Valve=
|
||||||
TA1 Bronze Hammer (smash stone to gravel)=
|
TA1 Bronze Hammer (smash stone to gravel)=
|
||||||
TA1 Burning=
|
TA1 Burning=
|
||||||
TA1 Charcoal=
|
TA1 Charcoal=
|
||||||
@ -289,6 +294,8 @@ TA3 Timer=
|
|||||||
TA3 Tiny Power Generator=
|
TA3 Tiny Power Generator=
|
||||||
TA3 Turbine=
|
TA3 Turbine=
|
||||||
TA3 Vacuum Tube=
|
TA3 Vacuum Tube=
|
||||||
|
TA3 Valve closed=
|
||||||
|
TA3 Valve open=
|
||||||
TA4 8x2000 Chest=
|
TA4 8x2000 Chest=
|
||||||
TA4 Button/Switch=
|
TA4 Button/Switch=
|
||||||
TA4 Carbon Fiber=
|
TA4 Carbon Fiber=
|
||||||
@ -346,7 +353,7 @@ TA4 Wind Turbine=
|
|||||||
TA4 Wind Turbine Nacelle=
|
TA4 Wind Turbine Nacelle=
|
||||||
TA4 Wind Turbine Signal Lamp=
|
TA4 Wind Turbine Signal Lamp=
|
||||||
TechAge Black Hole=
|
TechAge Black Hole=
|
||||||
TechAge Black Hole (let items disappear)=
|
TechAge Black Hole (let items and liquids disappear)=
|
||||||
TechAge Door Block=
|
TechAge Door Block=
|
||||||
TechAge Gate Block=
|
TechAge Gate Block=
|
||||||
TechAge Gravel=
|
TechAge Gravel=
|
||||||
@ -402,6 +409,7 @@ added=
|
|||||||
added or removed=
|
added or removed=
|
||||||
area is protected=
|
area is protected=
|
||||||
blocking mode=
|
blocking mode=
|
||||||
|
catalyst missing=
|
||||||
commands like: help=
|
commands like: help=
|
||||||
connected with=
|
connected with=
|
||||||
depth=
|
depth=
|
||||||
@ -434,4 +442,5 @@ right to left=
|
|||||||
stopped=
|
stopped=
|
||||||
storage empty?=
|
storage empty?=
|
||||||
water temperature=
|
water temperature=
|
||||||
|
wrong catalyst=
|
||||||
wrong storage diameter=
|
wrong storage diameter=
|
@ -38,7 +38,7 @@ local function formspec(nvm, meta)
|
|||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
"field[0.3,0.6;9,1;poll_numbers;"..S("Node numbers to read the states from")..":;"..poll_numbers.."]" ..
|
"field[0.3,0.6;9,1;poll_numbers;"..S("Node numbers to read the states from")..":;"..poll_numbers.."]" ..
|
||||||
"field[0.3,2;9,1;event_number;"..S("Node number to send the events to")..":;"..event_number.."]" ..
|
"field[0.3,2;9,1;event_number;"..S("Node number to send the events to")..":;"..event_number.."]" ..
|
||||||
"label[1.3,2.8;"..S("Send an event if state is equal or larget than")..":]"..
|
"label[1.3,2.8;"..S("Send an event if state is equal or larger than")..":]"..
|
||||||
"dropdown[1.2,3.4;7,4;severity;1 standby,2 blocked,3 nopower,4 fault;"..dropdown_pos.."]"..
|
"dropdown[1.2,3.4;7,4;severity;1 standby,2 blocked,3 nopower,4 fault;"..dropdown_pos.."]"..
|
||||||
"button_exit[3,5;2,1;exit;Save]"
|
"button_exit[3,5;2,1;exit;Save]"
|
||||||
end
|
end
|
||||||
|
@ -76,6 +76,7 @@ local function formspec2(meta)
|
|||||||
default.gui_bg..
|
default.gui_bg..
|
||||||
default.gui_bg_img..
|
default.gui_bg_img..
|
||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
|
"style_type[table,field;font=mono]"..
|
||||||
"button[0,0;3.3,1;bttn1;"..bttn_text1.."]button[3.3,0;3.3,1;bttn2;"..bttn_text2.."]button[6.6,0;3.3,1;bttn3;"..bttn_text3.."]"..
|
"button[0,0;3.3,1;bttn1;"..bttn_text1.."]button[3.3,0;3.3,1;bttn2;"..bttn_text2.."]button[6.6,0;3.3,1;bttn3;"..bttn_text3.."]"..
|
||||||
"button[0,0.8;3.3,1;bttn4;"..bttn_text4.."]button[3.3,0.8;3.3,1;bttn5;"..bttn_text5.."]button[6.6,0.8;3.3,1;bttn6;"..bttn_text6.."]"..
|
"button[0,0.8;3.3,1;bttn4;"..bttn_text4.."]button[3.3,0.8;3.3,1;bttn5;"..bttn_text5.."]button[6.6,0.8;3.3,1;bttn6;"..bttn_text6.."]"..
|
||||||
"button[0,1.6;3.3,1;bttn7;"..bttn_text7.."]button[3.3,1.6;3.3,1;bttn8;"..bttn_text8.."]button[6.6,1.6;3.3,1;bttn9;"..bttn_text9.."]"..
|
"button[0,1.6;3.3,1;bttn7;"..bttn_text7.."]button[3.3,1.6;3.3,1;bttn8;"..bttn_text8.."]button[6.6,1.6;3.3,1;bttn9;"..bttn_text9.."]"..
|
||||||
|
@ -172,6 +172,7 @@ local function formspec1(meta)
|
|||||||
default.gui_bg..
|
default.gui_bg..
|
||||||
default.gui_bg_img..
|
default.gui_bg_img..
|
||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
|
"style_type[textarea;font=mono]"..
|
||||||
"tabheader[0,0;tab;init,func,loop,outp,notes,help;1;;true]"..
|
"tabheader[0,0;tab;init,func,loop,outp,notes,help;1;;true]"..
|
||||||
"textarea[0.3,0.2;10,8.3;init;function init();"..init.."]"..
|
"textarea[0.3,0.2;10,8.3;init;function init();"..init.."]"..
|
||||||
"label[0,7.3;end]"..
|
"label[0,7.3;end]"..
|
||||||
@ -189,6 +190,7 @@ local function formspec2(meta)
|
|||||||
default.gui_bg..
|
default.gui_bg..
|
||||||
default.gui_bg_img..
|
default.gui_bg_img..
|
||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
|
"style_type[textarea;font=mono]"..
|
||||||
"tabheader[0,0;tab;init,func,loop,outp,notes,help;2;;true]"..
|
"tabheader[0,0;tab;init,func,loop,outp,notes,help;2;;true]"..
|
||||||
"textarea[0.3,0.2;10,8.3;func;functions:;"..func.."]"..
|
"textarea[0.3,0.2;10,8.3;func;functions:;"..func.."]"..
|
||||||
"button_exit[4.4,7.5;1.8,1;cancel;Cancel]"..
|
"button_exit[4.4,7.5;1.8,1;cancel;Cancel]"..
|
||||||
@ -205,6 +207,7 @@ local function formspec3(meta)
|
|||||||
default.gui_bg..
|
default.gui_bg..
|
||||||
default.gui_bg_img..
|
default.gui_bg_img..
|
||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
|
"style_type[textarea;font=mono]"..
|
||||||
"tabheader[0,0;tab;init,func,loop,outp,notes,help;3;;true]"..
|
"tabheader[0,0;tab;init,func,loop,outp,notes,help;3;;true]"..
|
||||||
"textarea[0.3,0.2;10,8.3;loop;function loop(ticks, elapsed);"..loop.."]"..
|
"textarea[0.3,0.2;10,8.3;loop;function loop(ticks, elapsed);"..loop.."]"..
|
||||||
"label[0,7.3;end]"..
|
"label[0,7.3;end]"..
|
||||||
@ -237,6 +240,7 @@ local function formspec5(meta)
|
|||||||
default.gui_bg..
|
default.gui_bg..
|
||||||
default.gui_bg_img..
|
default.gui_bg_img..
|
||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
|
"style_type[textarea;font=mono]"..
|
||||||
"tabheader[0,0;tab;init,func,loop,outp,notes,help;5;;true]"..
|
"tabheader[0,0;tab;init,func,loop,outp,notes,help;5;;true]"..
|
||||||
"textarea[0.3,0.2;10,8.3;notes;Notepad:;"..notes.."]"..
|
"textarea[0.3,0.2;10,8.3;notes;Notepad:;"..notes.."]"..
|
||||||
"button_exit[6.3,7.5;1.8,1;cancel;Cancel]"..
|
"button_exit[6.3,7.5;1.8,1;cancel;Cancel]"..
|
||||||
@ -249,6 +253,7 @@ local function formspec6(items, pos, text)
|
|||||||
default.gui_bg..
|
default.gui_bg..
|
||||||
default.gui_bg_img..
|
default.gui_bg_img..
|
||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
|
"style_type[textarea;font=mono]"..
|
||||||
"tabheader[0,0;tab;init,func,loop,outp,notes,help;6;;true]"..
|
"tabheader[0,0;tab;init,func,loop,outp,notes,help;6;;true]"..
|
||||||
"label[0,-0.2;Functions:]"..
|
"label[0,-0.2;Functions:]"..
|
||||||
"dropdown[0.3,0.2;10,8.3;functions;"..items..";"..pos.."]"..
|
"dropdown[0.3,0.2;10,8.3;functions;"..items..";"..pos.."]"..
|
||||||
|
@ -50,6 +50,7 @@ local function formspec2(meta)
|
|||||||
default.gui_bg..
|
default.gui_bg..
|
||||||
default.gui_bg_img..
|
default.gui_bg_img..
|
||||||
default.gui_slots..
|
default.gui_slots..
|
||||||
|
"style_type[table,field;font=mono]"..
|
||||||
"table[0.1,0.1;8.6,6.6;output;"..output..";200]"..
|
"table[0.1,0.1;8.6,6.6;output;"..output..";200]"..
|
||||||
"field[0.5,7.6;6,1;cmnd;Enter command;]" ..
|
"field[0.5,7.6;6,1;cmnd;Enter command;]" ..
|
||||||
"field_close_on_enter[cmnd;false]"..
|
"field_close_on_enter[cmnd;false]"..
|
||||||
|
@ -89,7 +89,7 @@ Es wird zur Herstellung von Aluminium benötigt, was vor allem in TA4 Verwendung
|
|||||||
|
|
||||||
Basalt entsteht nur, wenn Lava und Wasser zusammenkommen.
|
Basalt entsteht nur, wenn Lava und Wasser zusammenkommen.
|
||||||
Dazu sollte man am besten eine Anlage aufbauen, bei der eine Lava- und eine Wasserquelle zusammenfließen.
|
Dazu sollte man am besten eine Anlage aufbauen, bei der eine Lava- und eine Wasserquelle zusammenfließen.
|
||||||
Dort wo sich beide Flüssigkeiten treffen, entsteht Lava.
|
Dort wo sich beide Flüssigkeiten treffen, entsteht Basalt.
|
||||||
Einen automatisierten Basalt Generator kann man mit dem Sign Bot aufbauen.
|
Einen automatisierten Basalt Generator kann man mit dem Sign Bot aufbauen.
|
||||||
|
|
||||||
[basalt|image]
|
[basalt|image]
|
||||||
|
@ -91,7 +91,7 @@ It is required for the production of aluminum, which is mainly used in TA4.
|
|||||||
|
|
||||||
Basalt is only created when lava and water come together.
|
Basalt is only created when lava and water come together.
|
||||||
The best thing to do is to set up a system where a lava and a water source flow together.
|
The best thing to do is to set up a system where a lava and a water source flow together.
|
||||||
Lava is formed where both liquids meet.
|
Basalt is formed where both liquids meet.
|
||||||
You can build an automated basalt generator with the Sign Bot.
|
You can build an automated basalt generator with the Sign Bot.
|
||||||
|
|
||||||
[basalt|image]
|
[basalt|image]
|
||||||
|
@ -237,6 +237,11 @@ Hinweis 1: Flüssigkeiten werden nur in Tanks gelagert, Stoffe in Pulverform nur
|
|||||||
|
|
||||||
Hinweis 2: Tanks oder Silos mit verschiedenen Inhalten dürfen nicht zu einem Leitungssystem verbunden werden. Mehrere Tanks oder Silos mit gleichem Inhalt dürfen dagegen parallel an einer Leitung hängen.
|
Hinweis 2: Tanks oder Silos mit verschiedenen Inhalten dürfen nicht zu einem Leitungssystem verbunden werden. Mehrere Tanks oder Silos mit gleichem Inhalt dürfen dagegen parallel an einer Leitung hängen.
|
||||||
|
|
||||||
|
Beim Cracken werden lange Kette von Kohlenwasserstoffen unter Verwendung eines Katalysator in kurze Ketten gebrochen.
|
||||||
|
Als Katalysator dient Gibbsitpulver (wird nicht verbraucht). Damit kann Bitumen in Schweröl, Schweröl in Naphtha und Naphtha in Benzin umgewandelt werden.
|
||||||
|
|
||||||
|
Bei der Hydrierung werden einem Molekül Paare von Wasserstoffatomen hinzugefügt, um kurzkettige Kohlenwasserstoffe in lange umzuwandeln. Hier wird Eisenpulver als Katalysator benötigt (wird nicht verbraucht). Damit kann Benzin in Naphtha,
|
||||||
|
Naphtha in Schweröl und Schweröl in Bitumen umgewandelt werden.
|
||||||
|
|
||||||
[ta4_reactor|plan]
|
[ta4_reactor|plan]
|
||||||
|
|
||||||
@ -258,7 +263,8 @@ Der Dosierer benötigt keinen Strom. Alle 10 s wird ein Rezept abgearbeitet.
|
|||||||
|
|
||||||
### TA4 Reaktor / reactor
|
### TA4 Reaktor / reactor
|
||||||
|
|
||||||
Teil des Chemischen Reaktors.
|
Teil des Chemischen Reaktors. Der Reaktor verfügt über ein Inventar für die Katalysator
|
||||||
|
Gegenstände (für Cracking- und Hydrierungs-Rezepte).
|
||||||
|
|
||||||
[ta4_reactor|image]
|
[ta4_reactor|image]
|
||||||
|
|
||||||
|
@ -238,6 +238,13 @@ Note 1: Liquids are only stored in tanks, substances in powder form only in silo
|
|||||||
|
|
||||||
Note 2: Tanks or silos with different contents must not be connected to a pipe system. In contrast, several tanks or silos with the same content may hang in parallel on one line.
|
Note 2: Tanks or silos with different contents must not be connected to a pipe system. In contrast, several tanks or silos with the same content may hang in parallel on one line.
|
||||||
|
|
||||||
|
Cracking breaks long chains of hydrocarbons into short chains using a catalyst.
|
||||||
|
Gibbsite powder serves as a catalyst (is not consumed). It can be used to convert bitumen into fueloil, fueloil into naphtha and naphtha into gasoline.
|
||||||
|
|
||||||
|
In hydrogenation, pairs of hydrogen atoms are added to a molecule to convert short-chain hydrocarbons into long ones.
|
||||||
|
Here iron powder is required as a catalyst (is not consumed). It can be used to convert gasoline into naphtha,
|
||||||
|
naphtha into fueloil, and fueloil into bitumen.
|
||||||
|
|
||||||
|
|
||||||
[ta4_reactor|plan]
|
[ta4_reactor|plan]
|
||||||
|
|
||||||
@ -251,7 +258,7 @@ The recipe can be set and the reactor started via the doser.
|
|||||||
|
|
||||||
As with other machines:
|
As with other machines:
|
||||||
- if the doser is in standby mode, one or more ingredients are missing
|
- if the doser is in standby mode, one or more ingredients are missing
|
||||||
- if thedoser is in the blocked state, the outlet tank or silo is full, defective or incorrectly connected
|
- if the doser is in the blocked state, the outlet tank or silo is full, defective or incorrectly connected
|
||||||
|
|
||||||
The doser does not need any electricity. A recipe is processed every 10 s.
|
The doser does not need any electricity. A recipe is processed every 10 s.
|
||||||
|
|
||||||
@ -259,7 +266,7 @@ The doser does not need any electricity. A recipe is processed every 10 s.
|
|||||||
|
|
||||||
### TA4 Reactor
|
### TA4 Reactor
|
||||||
|
|
||||||
Part of the chemical reactor.
|
Part of the chemical reactor. The reactor has a inventory for the catalyst items (for cracking and hydrogenation recipes).
|
||||||
|
|
||||||
[ta4_reactor|image]
|
[ta4_reactor|image]
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name = techage
|
name = techage
|
||||||
depends = default,doors,tubelib2,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua
|
depends = default,doors,flowers,tubelib2,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua
|
||||||
optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecon
|
optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecon
|
||||||
description = Techage, go through 4 tech ages in search of wealth and power!
|
description = Techage, go through 4 tech ages in search of wealth and power!
|
||||||
|
@ -139,7 +139,7 @@ end
|
|||||||
-- Consumer related functions
|
-- Consumer related functions
|
||||||
--
|
--
|
||||||
|
|
||||||
-- check if there is a living network
|
-- function checks for a power grid, not for enough power
|
||||||
function techage.power.power_available(pos, Cable)
|
function techage.power.power_available(pos, Cable)
|
||||||
local nvm = techage.get_nvm(pos)
|
local nvm = techage.get_nvm(pos)
|
||||||
local tlib_type = Cable.tube_type
|
local tlib_type = Cable.tube_type
|
||||||
|
@ -268,6 +268,28 @@ minetest.register_node("towercrane:base", {
|
|||||||
meta:set_string("dir", P2S(dir))
|
meta:set_string("dir", P2S(dir))
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
on_rotate = function(pos, node, player, mode, new_facedir)
|
||||||
|
-- check whether crane is built up
|
||||||
|
local pos_above = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
|
local node_above = minetest.get_node(pos_above)
|
||||||
|
|
||||||
|
if node_above.name == "towercrane:mast_ctrl_on"
|
||||||
|
or node_above.name == "towercrane:mast_ctrl_off" then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- only allow rotation around y-axis
|
||||||
|
new_facedir = new_facedir % 4
|
||||||
|
|
||||||
|
local dir = minetest.facedir_to_dir(new_facedir)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("dir", P2S(dir))
|
||||||
|
|
||||||
|
node.param2 = new_facedir
|
||||||
|
minetest.swap_node(pos, node)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
|
||||||
-- evaluate user input (height, width),
|
-- evaluate user input (height, width),
|
||||||
-- destroy old crane and build a new one with
|
-- destroy old crane and build a new one with
|
||||||
-- the given size
|
-- the given size
|
||||||
|
@ -188,7 +188,9 @@ function unified_inventory.go_home(player)
|
|||||||
local pos = unified_inventory.home_pos[player:get_player_name()]
|
local pos = unified_inventory.home_pos[player:get_player_name()]
|
||||||
if pos then
|
if pos then
|
||||||
player:set_pos(pos)
|
player:set_pos(pos)
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- register_craft
|
-- register_craft
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
default
|
|
||||||
creative?
|
|
||||||
sfinv?
|
|
||||||
datastorage?
|
|
||||||
farming?
|
|
@ -1 +0,0 @@
|
|||||||
Unified Inventory replaces the default survival and creative inventory. It adds a nicer interface and a number of features, such as a crafting guide.
|
|
@ -290,10 +290,14 @@ function unified_inventory.apply_filter(player, filter, search_dir)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
local lang = minetest.get_player_information(player_name).lang_code
|
||||||
ffilter = function(name, def)
|
ffilter = function(name, def)
|
||||||
local lname = string.lower(name)
|
local lname = string.lower(name)
|
||||||
local ldesc = string.lower(def.description)
|
local ldesc = string.lower(def.description)
|
||||||
|
local llocaldesc = minetest.get_translated_string
|
||||||
|
and string.lower(minetest.get_translated_string(lang, def.description))
|
||||||
return string.find(lname, lfilter, 1, true) or string.find(ldesc, lfilter, 1, true)
|
return string.find(lname, lfilter, 1, true) or string.find(ldesc, lfilter, 1, true)
|
||||||
|
or llocaldesc and string.find(llocaldesc, lfilter, 1, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
unified_inventory.filtered_items_list[player_name]={}
|
unified_inventory.filtered_items_list[player_name]={}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
name = unified_inventory
|
name = unified_inventory
|
||||||
depends = default
|
depends = default
|
||||||
optional_depends = creative, sfinv, datastorage, farming
|
optional_depends = creative, sfinv, datastorage, farming
|
||||||
description = Unified Inventory replaces the default survival and creative inventory. It adds a nicer interface and a number of features, such as a crafting guide.
|
description = """
|
||||||
|
Unified Inventory replaces the default survival and creative inventory.
|
||||||
|
It adds a nicer interface and a number of features, such as a crafting guide.
|
||||||
|
"""
|
||||||
|
@ -76,9 +76,9 @@ unified_inventory.register_button("home_gui_go", {
|
|||||||
action = function(player)
|
action = function(player)
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
if minetest.check_player_privs(player_name, {home=true}) then
|
if minetest.check_player_privs(player_name, {home=true}) then
|
||||||
minetest.sound_play("teleport",
|
if unified_inventory.go_home(player) then
|
||||||
{to_player=player:get_player_name(), gain = 1.0})
|
minetest.sound_play("teleport", {to_player = player_name})
|
||||||
unified_inventory.go_home(player)
|
end
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name,
|
||||||
S("You don't have the \"home\" privilege!"))
|
S("You don't have the \"home\" privilege!"))
|
||||||
|
Loading…
Reference in New Issue
Block a user