From 6f3146f7bfa4e8ce103f4acdab8661fa8035f331 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Tue, 21 Jul 2020 17:45:15 +0200 Subject: [PATCH] built on 21/07/2020 17:45:15 --- basic_materials/.luacheckrc | 30 ++++++++++ basic_materials/init.lua | 1 + basic_materials/metals.lua | 16 +++--- basic_materials/plastics.lua | 1 + signs_bot/cmd_flowers.lua | 8 +++ signs_bot/interpreter.lua | 4 +- signs_bot/locale/de.mo | Bin 36816 -> 37075 bytes signs_bot/locale/de.po | 39 +++++++------ signs_bot/locale/de.po~ | 42 ++++++++++---- signs_bot/locale/template.pot | 22 ++++--- signs_bot/techage.lua | 17 ++++++ techage/README.md | 20 +++++++ techage/basic_machines/blackhole.lua | 48 ++++++++++++++-- techage/basic_machines/gravelrinser.lua | 2 +- techage/basic_machines/quarry.lua | 4 +- techage/basic_machines/ta4_chest.lua | 6 ++ techage/basis/lib.lua | 15 +++++ techage/basis/liquid_lib.lua | 12 +++- techage/basis/recipe_lib.lua | 22 +++---- techage/chemistry/ta4_doser.lua | 31 ++++++++-- techage/chemistry/ta4_reactor.lua | 63 +++++++++++++++++++- techage/doc/manual_DE.lua | 11 +++- techage/doc/manual_EN.lua | 13 ++++- techage/furnace/booster.lua | 2 + techage/furnace/firebox.lua | 2 +- techage/furnace/furnace_top.lua | 10 +++- techage/furnace/heater.lua | 8 --- techage/icta_controller/commands.lua | 7 ++- techage/init.lua | 3 +- techage/iron_age/charcoalpile.lua | 2 +- techage/items/cracking.lua | 73 ++++++++++++++++++++++++ techage/items/powder.lua | 8 ++- techage/items/redstone.lua | 1 - techage/lamps/growlight.lua | 4 +- techage/liquids/silo.lua | 39 +++++++++---- techage/locale/techage.de.tr | 13 ++++- techage/locale/template.txt | 13 ++++- techage/logic/collector.lua | 2 +- techage/logic/terminal.lua | 1 + techage/lua_controller/controller.lua | 5 ++ techage/lua_controller/terminal.lua | 1 + techage/manuals/manual_DE.md | 2 +- techage/manuals/manual_EN.md | 2 +- techage/manuals/manual_ta4_DE.md | 8 ++- techage/manuals/manual_ta4_EN.md | 11 +++- techage/mod.conf | 2 +- techage/power/node_api.lua | 2 +- towercrane/init.lua | 22 +++++++ unified_inventory/api.lua | 2 + unified_inventory/depends.txt | 5 -- unified_inventory/description.txt | 1 - unified_inventory/internal.lua | 4 ++ unified_inventory/mod.conf | 5 +- unified_inventory/register.lua | 6 +- 54 files changed, 556 insertions(+), 137 deletions(-) create mode 100644 basic_materials/.luacheckrc create mode 100644 techage/items/cracking.lua delete mode 100644 unified_inventory/depends.txt delete mode 100644 unified_inventory/description.txt diff --git a/basic_materials/.luacheckrc b/basic_materials/.luacheckrc new file mode 100644 index 0000000..55879b0 --- /dev/null +++ b/basic_materials/.luacheckrc @@ -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", +} diff --git a/basic_materials/init.lua b/basic_materials/init.lua index 32873a1..348c059 100644 --- a/basic_materials/init.lua +++ b/basic_materials/init.lua @@ -7,6 +7,7 @@ local modpath = minetest.get_modpath("basic_materials") basic_materials = {} +basic_materials.mod = { author = "Vanessa Dannenberg" } dofile(modpath.."/metals.lua") dofile(modpath.."/plastics.lua") diff --git a/basic_materials/metals.lua b/basic_materials/metals.lua index 37685f8..0a3243b 100644 --- a/basic_materials/metals.lua +++ b/basic_materials/metals.lua @@ -5,31 +5,37 @@ local S = minetest.get_translator("basic_materials") minetest.register_craftitem("basic_materials:steel_wire", { description = S("Spool of steel wire"), + groups = { wire = 1 }, inventory_image = "basic_materials_steel_wire.png" }) minetest.register_craftitem("basic_materials:copper_wire", { description = S("Spool of copper wire"), + groups = { wire = 1 }, inventory_image = "basic_materials_copper_wire.png" }) minetest.register_craftitem("basic_materials:silver_wire", { description = S("Spool of silver wire"), + groups = { wire = 1 }, inventory_image = "basic_materials_silver_wire.png" }) minetest.register_craftitem("basic_materials:gold_wire", { description = S("Spool of gold wire"), + groups = { wire = 1 }, inventory_image = "basic_materials_gold_wire.png" }) minetest.register_craftitem("basic_materials:steel_strip", { description = S("Steel Strip"), + groups = { strip = 1 }, inventory_image = "basic_materials_steel_strip.png" }) minetest.register_craftitem("basic_materials:copper_strip", { description = S("Copper Strip"), + groups = { strip = 1 }, 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", { description = S("Chainlinks (brass)"), + groups = { chainlinks = 1 }, inventory_image = "basic_materials_chainlink_brass.png" }) minetest.register_craftitem("basic_materials:chainlink_steel", { description = S("Chainlinks (steel)"), + groups = { chainlinks = 1 }, 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 } } -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", { description = S("Chain (steel, hanging)"), drawtype = "mesh", diff --git a/basic_materials/plastics.lua b/basic_materials/plastics.lua index 3ac0f98..e29af53 100644 --- a/basic_materials/plastics.lua +++ b/basic_materials/plastics.lua @@ -10,6 +10,7 @@ minetest.register_craftitem("basic_materials:plastic_sheet", { minetest.register_craftitem("basic_materials:plastic_strip", { description = S("Plastic strips"), + groups = { strip = 1 }, inventory_image = "basic_materials_plastic_strip.png", }) diff --git a/signs_bot/cmd_flowers.lua b/signs_bot/cmd_flowers.lua index 784fb1f..e8003b6 100644 --- a/signs_bot/cmd_flowers.lua +++ b/signs_bot/cmd_flowers.lua @@ -40,6 +40,14 @@ minetest.after(1, function() 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) local function soil_availabe(pos) diff --git a/signs_bot/interpreter.lua b/signs_bot/interpreter.lua index 5d320a1..233afe6 100644 --- a/signs_bot/interpreter.lua +++ b/signs_bot/interpreter.lua @@ -240,8 +240,8 @@ function api.check_script(script) param2 = tonumber(param2) or param2 param3 = tonumber(param3) or param3 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 - return false, I("Wrong number of parameters"), idx + if tCmdDef[cmnd].num_param < num_param then + return false, I("Too many parameters"), idx end if tCmdDef[cmnd].num_param > 0 and not tCmdDef[cmnd].check(param1, param2, param3) then return false, I("Parameter error"), idx diff --git a/signs_bot/locale/de.mo b/signs_bot/locale/de.mo index 0e9848d1129a8a45ebe6421f87e1de307010ac4e..6d8ce861400d338a92f8f854416be1df3ce2f123 100644 GIT binary patch delta 6741 zcmZwK3tUuH9>DP<3F0WqLqI{|0=^X#6ctnyQc+YC@rj}gGgp{^8H5=S(*~6!%TiOb zOiN3%hh{CBrrX;3$n0URx;<_4k!jh}?B&+FzyI9Je(Lkt^YPF3oOAD-d!Bd3Q&0Gv z+3L5ti#JFqW$ma`FuJf0)?*6p!qIphQ?Yv|rAA;Oj>N}tAYMZGTvU`&k(iBqM9no_ zV7kV<{+wAp9HqRz2Y*aOI3M`Ryx!ba5u_GU&jCpjaRA-c0vZD zx}ra3VFw(8vXq6UWhkGkLm6p3(s#8A+v9GO=Xnp2X(V$3%+P#<-mIM;FmZBi@GVrq^iBh9`UNPWMo8Nqs)Y*JEOxc zDD^qWKUKn?mbeNFaUII0yN($c%SM@vb5NGxAWp>Sp2lV^!?BcKL@VCJJf5#+_cC_% z3pkSt-(oh7?XA>QT!XTCu3!Mh^V9IBP&VB@(<>+=j7(JOZXAfRnfIa$=mg3V ze~t+}U;R!-ramsoxFHd5q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d~XFa(a0OF)E|R1g30)XQ@(&{lw%*a zf1nJJzp@H)`{3z#x1cv+!kXj@O;~m?v$6jj2(=!x!OTN#vHkH!5#8BcK@q6NN!c7b!-XlIIz9INz zm`lVq!k5&)mXUpCzV_AFfBk6bl`dP%w~kv;8%t@s<^O(`Qxn0=-@s_Rh7E}*LWw=< z`(>wZif{f^WOOVJ5IPM?n~BLpKJjS87x53mMO_Vio2W^?Cr&5s z5!VT&X~cKF9RKqIH#qqM98Bo{KbSL4WgExUj(xB%kxDEi_7KB~$A}?>QYG;LQ9`^x zoF;S(YC!@%ixI>lgwj$XkEqYJP>iF0UwWRO^@%ye0^&IFDiOquf5BOV(n*W&yZ#0F zKR9La4spXNKZ)IlSe{>w6NtLx-$eEKA@P&)`juIS3(dr$i|Cyn;oDz3ZsYz=}R&_h{OjKxVPe1bhP(?6h!QBK`4^7RO%L&PMaR0Yxr zVg)gfXhA3~_Wd;GKX};5|C&}5f>qHhFW5bOdNbFIqO!80;)05t7+0-kvpnUqXBAh@ zi8&rwd8qX#p%s;}DV0^-OKN81xr<$8p5lC$+f`OnQ0$)Wnp@~8b`_Po@;&9Ayz(+v zd7-=9Ra}zqDRa3?OFiycu98`<{Gu{js9e))vtMPGescqYQd@Uu>uQ(UwOz-Gx3e$# z items from a chest like node\n" #~ "and put it into the item inventory.\n" diff --git a/signs_bot/locale/de.po~ b/signs_bot/locale/de.po~ index e3b31fa..b3ac266 100644 --- a/signs_bot/locale/de.po~ +++ b/signs_bot/locale/de.po~ @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-30 14:59+0200\n" -"PO-Revision-Date: 2020-05-30 15:01+0200\n" +"POT-Creation-Date: 2020-05-30 15:09+0200\n" +"PO-Revision-Date: 2020-05-30 15:14+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -797,7 +797,6 @@ msgstr "" "als Schritte gezählt." #: commands.lua -#, fuzzy msgid "" "Walk until a sign or obstacle is\n" "reached. Then continue with the next command.\n" @@ -811,7 +810,7 @@ msgstr "" "Kommando aus. \n" "Wurde ein Zeichen erreicht, so arbeite\n" "die Kommandos des Zeichens als\n" -"Unter-Prozess ab." +"Unter-Prozess ab" #: crop_sensor.lua msgid "Crop Sensor: Connected with " @@ -1599,14 +1598,37 @@ msgstr "Signal UND" msgid "Signal is sent, if all input signals are received." msgstr "Signal wird gesendet, wenn all Eingangssignale empfangen wurden." -#~ msgid "Parameter error in line " -#~ msgstr "Parameter Fehler in Zeile " +#: interpreter.lua +msgid "Maximum programm size exceeded" +msgstr "Maximale Programmlänge überschritten" -#~ msgid "Command error in line " -#~ msgstr "Kommandozeilen Fehler in Zeile " +#: interpreter.lua +msgid "Parameter error" +msgstr "Parameter Fehler" -#~ msgid "Checked and approved" -#~ msgstr "Geprüft und genehmigt" +#: interpreter.lua +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 "" #~ "Take items from a chest like node\n" diff --git a/signs_bot/locale/template.pot b/signs_bot/locale/template.pot index e1dab12..df25467 100644 --- a/signs_bot/locale/template.pot +++ b/signs_bot/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -665,7 +665,9 @@ msgid "Crop Sensor" msgstr "" #: 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 "" #: crop_sensor.lua @@ -1168,8 +1170,8 @@ msgstr "" #: node_sensor.lua msgid "" -"The node sensor can send a signal when it detects that nodes appear or " -"disappear," +"The node sensor sends cyclical signals when it detects that nodes have " +"appeared or disappeared," msgstr "" #: node_sensor.lua @@ -1329,6 +1331,10 @@ msgstr "" msgid "Maximum programm size exceeded" msgstr "" +#: interpreter.lua +msgid "Too many parameters" +msgstr "" + #: interpreter.lua msgid "Parameter error" msgstr "" @@ -1345,14 +1351,6 @@ msgstr "" msgid "'end' missing" msgstr "" -#: interpreter.lua -msgid "'return' missing" -msgstr "" - -#: interpreter.lua -msgid "'call' missing" -msgstr "" - #: interpreter.lua msgid "Checked and approved" msgstr "" diff --git a/signs_bot/techage.lua b/signs_bot/techage.lua index 56e1393..44aa6b6 100644 --- a/signs_bot/techage.lua +++ b/signs_bot/techage.lua @@ -158,6 +158,23 @@ if minetest.get_modpath("techage") then 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 function signs_bot.formspec_battery_capa(max_capa, current_capa) diff --git a/techage/README.md b/techage/README.md index 08980dc..a34fc71 100644 --- a/techage/README.md +++ b/techage/README.md @@ -75,6 +75,26 @@ Available worlds will be converted to 'lsqlite3', but there is no way back, so: ### 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** - pipe valve added - growlight bugfix diff --git a/techage/basic_machines/blackhole.lua b/techage/basic_machines/blackhole.lua index 48f000d..0064d11 100644 --- a/techage/basic_machines/blackhole.lua +++ b/techage/basic_machines/blackhole.lua @@ -8,11 +8,32 @@ GPL v3 See LICENSE.txt for more information - All items disappear. + All items and liquids disappear. ]]-- 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", { description = S("TechAge Black Hole"), @@ -20,7 +41,7 @@ minetest.register_node("techage:blackhole", { -- 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_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_filling_ta2.png^techage_frame_ta2.png^techage_appl_blackhole.png", @@ -30,21 +51,35 @@ minetest.register_node("techage:blackhole", { local meta = minetest.get_meta(pos) local node = minetest.get_node(pos) 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, + on_rotate = screwdriver.disallow, paramtype2 = "facedir", groups = {choppy=2, cracky=2, crumbly=2}, is_ground_content = false, sounds = default.node_sound_wood_defaults(), + liquid = { + capa = 999999, + peek = peek_liquid, + put = put_liquid, + take = take_liquid, + }, + networks = networks_def, }) minetest.register_craft({ output = "techage:blackhole", recipe = { {"group:wood", "", "group:wood"}, - {"techage:tubeS", "default:coal_lump", ""}, + {"techage:tubeS", "default:coal_lump", "techage:ta3_pipeS"}, {"group:wood", "techage:iron_ingot", "group:wood"}, }, }) @@ -59,5 +94,6 @@ techage.register_node({"techage:blackhole"}, { return true end end, -}) +}) +Pipe:add_secondary_node_names({"techage:blackhole"}) diff --git a/techage/basic_machines/gravelrinser.lua b/techage/basic_machines/gravelrinser.lua index 4915fa5..f4bd8fb 100644 --- a/techage/basic_machines/gravelrinser.lua +++ b/techage/basic_machines/gravelrinser.lua @@ -332,7 +332,7 @@ end minetest.register_lbm({ label = "[techage] Rinser update", - name = "techage:update", + name = "techage:rinser_update", nodenames = {"techage:ta2_rinser_act", "techage:ta3_rinser_act"}, run_at_every_load = true, action = function(pos, node) diff --git a/techage/basic_machines/quarry.lua b/techage/basic_machines/quarry.lua index 9250f4e..c7e6df1 100644 --- a/techage/basic_machines/quarry.lua +++ b/techage/basic_machines/quarry.lua @@ -167,8 +167,8 @@ end local function add_to_inv(pos, item_name) local inv = M(pos):get_inventory() - if inv:room_for_item("main", {name = item_name}) then - inv:add_item("main", {name = item_name}) + if inv:room_for_item("main", item_name) then + inv:add_item("main", item_name) return true end return false diff --git a/techage/basic_machines/ta4_chest.lua b/techage/basic_machines/ta4_chest.lua index d98e00e..a9a0d86 100644 --- a/techage/basic_machines/ta4_chest.lua +++ b/techage/basic_machines/ta4_chest.lua @@ -381,6 +381,12 @@ local function move_from_inv_to_nvm(pos, idx) local nvm_stack = get_stack(nvm, idx) 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 local count = math.min(inv_stack:get_count(), get_stacksize(pos) - nvm_stack.count) nvm_stack.count = nvm_stack.count + count diff --git a/techage/basis/lib.lua b/techage/basis/lib.lua index a87ab61..1493fa6 100644 --- a/techage/basis/lib.lua +++ b/techage/basis/lib.lua @@ -226,6 +226,21 @@ function techage.item_image(x, y, itemname) label 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) local t = type(o) if not level and t == "userdata" then diff --git a/techage/basis/liquid_lib.lua b/techage/basis/liquid_lib.lua index 0cd37a3..1300857 100644 --- a/techage/basis/liquid_lib.lua +++ b/techage/basis/liquid_lib.lua @@ -176,13 +176,19 @@ local function fill_on_punch(nvm, empty_container, item_count, puncher) 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 of the wielded full container can be emptied into the tank +-- check if the wielded full container can be emptied into the tank local function empty_on_punch(pos, nvm, full_container, item_count) nvm.liquid = nvm.liquid or {} 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) if lqd_def and ndef_lqd then local tank_size = ndef_lqd.capa or 0 diff --git a/techage/basis/recipe_lib.lua b/techage/basis/recipe_lib.lua index 35bbbae..b937988 100644 --- a/techage/basis/recipe_lib.lua +++ b/techage/basis/recipe_lib.lua @@ -16,7 +16,6 @@ local S = techage.S local M = minetest.get_meta local Recipes = {} -- {rtype = {ouput = {....},...}} -local RecipeList = {} -- {rtype = {,...}} local range = techage.in_range @@ -47,8 +46,7 @@ end function techage.recipes.get(nvm, rtype) local recipes = Recipes[rtype] or {} - local recipe_list = RecipeList[rtype] or {} - return recipes[recipe_list[nvm.recipe_idx or 1]] + return recipes[nvm.recipe_idx or 1] end -- Add 4 input/output/waste recipe @@ -64,9 +62,6 @@ function techage.recipes.add(rtype, recipe) if not Recipes[rtype] then Recipes[rtype] = {} end - if not RecipeList[rtype] then - RecipeList[rtype] = {} - end local name, num local item = {input = {}} @@ -83,8 +78,8 @@ function techage.recipes.add(rtype, recipe) item.waste = {name = name or "", num = tonumber(num) or 0} name, num = unpack(string.split(recipe.output, " ")) item.output = {name = name or "", num = tonumber(num) or 0} - Recipes[rtype][name] = item - RecipeList[rtype][#(RecipeList[rtype])+1] = name + item.catalyst = recipe.catalyst + Recipes[rtype][#Recipes[rtype]+1] = item if minetest.global_exists("unified_inventory") then unified_inventory.register_craft({ @@ -97,21 +92,22 @@ end function techage.recipes.formspec(x, y, rtype, nvm) local recipes = Recipes[rtype] or {} - local recipe_list = RecipeList[rtype] or {} - nvm.recipe_idx = range(nvm.recipe_idx or 1, 1, #recipe_list) + nvm.recipe_idx = range(nvm.recipe_idx or 1, 1, #recipes) 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 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.."]".. "background[0,0;4,3;techage_form_grey.png]".. 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, 1, waste).. "button[0,2;1,1;priv;<<]".. "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[]" end diff --git a/techage/chemistry/ta4_doser.lua b/techage/chemistry/ta4_doser.lua index a94eae8..dfbeff7 100644 --- a/techage/chemistry/ta4_doser.lua +++ b/techage/chemistry/ta4_doser.lua @@ -117,6 +117,16 @@ local function can_start(pos, nvm, state) if not res then return S("reactor defect or no power") 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 end @@ -154,6 +164,10 @@ local function dosing(pos, nvm, elapsed) State:idle(pos, nvm) return 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 nvm.check_cnt = (nvm.check_cnt or 0) + 1 if nvm.check_cnt >= 4 then @@ -164,11 +178,20 @@ local function dosing(pos, nvm, elapsed) reactor_cmnd(pos, "stop") return 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 - -- available liquids - local liquids = get_liquids(pos) - local recipe = recipes.get(nvm, "ta4_doser") - if not liquids or not recipe then return end -- inputs local starter = get_starter_name(pos) for _,item in pairs(recipe.input) do diff --git a/techage/chemistry/ta4_reactor.lua b/techage/chemistry/ta4_reactor.lua index 6ca930e..ee8e3b2 100644 --- a/techage/chemistry/ta4_reactor.lua +++ b/techage/chemistry/ta4_reactor.lua @@ -102,12 +102,49 @@ techage.register_node({"techage:ta4_reactor_fillerpipe"}, { return true elseif topic == "waste" then 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 return stand_cmnd(pos, topic, payload or {}) 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", { description = S("TA4 Reactor"), tiles = {"techage_reactor_side.png"}, @@ -121,7 +158,14 @@ minetest.register_node("techage:ta4_reactor", { type = "fixed", 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", paramtype2 = "facedir", on_rotate = screwdriver.disallow, @@ -149,3 +193,20 @@ minetest.register_craft({ {'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, +}) diff --git a/techage/doc/manual_DE.lua b/techage/doc/manual_DE.lua index aeb9a73..016c02f 100644 --- a/techage/doc/manual_DE.lua +++ b/techage/doc/manual_DE.lua @@ -253,7 +253,7 @@ techage.manual_DE.aText = { "\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".. - "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".. "\n".. "\n".. @@ -1233,6 +1233,12 @@ techage.manual_DE.aText = { "\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".. + "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", "Teil des Chemischen Reaktors.\n".. @@ -1249,7 +1255,8 @@ techage.manual_DE.aText = { "\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", diff --git a/techage/doc/manual_EN.lua b/techage/doc/manual_EN.lua index 7786168..81533c6 100644 --- a/techage/doc/manual_EN.lua +++ b/techage/doc/manual_EN.lua @@ -253,7 +253,7 @@ techage.manual_EN.aText = { "\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".. - "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".. "\n".. "\n".. @@ -1224,6 +1224,13 @@ techage.manual_EN.aText = { "\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".. + "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", "Part of the chemical reactor.\n".. @@ -1234,13 +1241,13 @@ techage.manual_EN.aText = { "As with other machines:\n".. "\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".. "The doser does not need any electricity. A recipe is processed every 10 s.\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", diff --git a/techage/furnace/booster.lua b/techage/furnace/booster.lua index 5f283ac..30ba669 100644 --- a/techage/furnace/booster.lua +++ b/techage/furnace/booster.lua @@ -189,6 +189,8 @@ techage.register_node({"techage:ta3_booster", "techage:ta3_booster_on"}, { if topic == "power" then return techage.get_node_lvm(pos).name == "techage:ta3_booster_on" or 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 if power.power_available(pos, Cable) then nvm.running = true diff --git a/techage/furnace/firebox.lua b/techage/furnace/firebox.lua index ef035f9..401270f 100644 --- a/techage/furnace/firebox.lua +++ b/techage/furnace/firebox.lua @@ -228,7 +228,7 @@ techage.register_node({"techage:furnace_firebox", "techage:furnace_firebox_on"}, if topic == "fuel" then return has_fuel(pos, nvm) and booster_cmnd(pos, "power") elseif topic == "running" then - return nvm.running and booster_cmnd(pos, "power") + return nvm.running and booster_cmnd(pos, "running") elseif topic == "start" then start_firebox(pos, nvm) booster_cmnd(pos, "start") diff --git a/techage/furnace/furnace_top.lua b/techage/furnace/furnace_top.lua index 1f6d235..df7a146 100644 --- a/techage/furnace/furnace_top.lua +++ b/techage/furnace/furnace_top.lua @@ -85,9 +85,17 @@ local function firebox_cmnd(pos, cmnd) "techage:furnace_heater", "techage:furnace_heater_on"}) 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) 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) if state == techage.RUNNING then crd.State:keep_running(pos, nvm, COUNTDOWN_TICKS) diff --git a/techage/furnace/heater.lua b/techage/furnace/heater.lua index 3909772..d292db6 100644 --- a/techage/furnace/heater.lua +++ b/techage/furnace/heater.lua @@ -16,11 +16,6 @@ local M = minetest.get_meta 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 PWR_NEEDED = 14 @@ -166,6 +161,3 @@ techage.register_node({"techage:furnace_heater", "techage:furnace_heater_on"}, { end end }) - -Pipe:add_secondary_node_names({"techage:furnace_heater", "techage:furnace_heater_on"}) - diff --git a/techage/icta_controller/commands.lua b/techage/icta_controller/commands.lua index e140e4d..64b1332 100644 --- a/techage/icta_controller/commands.lua +++ b/techage/icta_controller/commands.lua @@ -53,6 +53,7 @@ end -- '#' is used as placeholder for rule numbers and has to be escaped function techage.icta_escape(s) s = tostring(s) + s = s:gsub('"', '\\"') -- to prevent code injection!!! return s:gsub("#", '"..string.char(35).."') end @@ -179,7 +180,7 @@ techage.icta_register_condition("state", { type = "textlist", name = "value", label = "", - choices = "stopped,running,standby,blocked,nopower,fault,unloaded,invalid", + choices = "stopped,running,standby,blocked,nopower,fault,unloaded,invalid,on,off", default = "stopped", }, { @@ -553,7 +554,7 @@ techage.icta_register_action("chat", { }, }, 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, button = function(data, environ) return 'chat("'..data.text:sub(1,12)..'")' @@ -644,7 +645,7 @@ techage.icta_register_condition("playerdetector", { }, 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, button = function(data, environ) return "detector("..techage.fmt_number(data.number)..","..data.name:sub(1,8)..")" diff --git a/techage/init.lua b/techage/init.lua index d603588..a065d67 100644 --- a/techage/init.lua +++ b/techage/init.lua @@ -13,7 +13,7 @@ techage = {} -- Version for compatibility checks, see readme.md/history -techage.version = 0.14 +techage.version = 0.18 if minetest.global_exists("tubelib") then 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/redstone.lua") dofile(MP.."/items/cement.lua") +dofile(MP.."/items/cracking.lua") if techage.basalt_stone_enabled then dofile(MP.."/items/basalt.lua") diff --git a/techage/iron_age/charcoalpile.lua b/techage/iron_age/charcoalpile.lua index 8354107..0ebae12 100644 --- a/techage/iron_age/charcoalpile.lua +++ b/techage/iron_age/charcoalpile.lua @@ -207,7 +207,7 @@ minetest.register_craft({ minetest.register_lbm({ label = "[techage] Lighter update", - name = "techage:update", + name = "techage:lighter_update", nodenames = {"techage:lighter_burn"}, run_at_every_load = true, action = function(pos, node) diff --git a/techage/items/cracking.lua b/techage/items/cracking.lua new file mode 100644 index 0000000..abcb719 --- /dev/null +++ b/techage/items/cracking.lua @@ -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", +}) diff --git a/techage/items/powder.lua b/techage/items/powder.lua index 872ea31..ba3a4c0 100644 --- a/techage/items/powder.lua +++ b/techage/items/powder.lua @@ -26,6 +26,12 @@ minetest.register_craftitem("techage:needle_powder", { 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_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:jungleleaves", 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:iron_lump", output="techage:iron_powder"}) diff --git a/techage/items/redstone.lua b/techage/items/redstone.lua index 733fdd1..9b6f913 100644 --- a/techage/items/redstone.lua +++ b/techage/items/redstone.lua @@ -19,7 +19,6 @@ minetest.register_node("techage:red_stone", { description = S("Red Stone"), tiles = {"default_stone.png^[colorize:#ff4538:110"}, groups = {cracky = 3, stone = 1}, - drop = 'techage:basalt_cobble', sounds = default.node_sound_stone_defaults(), }) diff --git a/techage/lamps/growlight.lua b/techage/lamps/growlight.lua index f0403fe..8d35369 100644 --- a/techage/lamps/growlight.lua +++ b/techage/lamps/growlight.lua @@ -37,7 +37,7 @@ local function node_timer(pos, elapsed) power.consumer_alive(pos, Cable, CYCLE_TIME) local nvm = techage.get_nvm(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 - 1 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 techage.register_plant(name) end + elseif mod == "flowers" then + techage.register_flower(name) end end end diff --git a/techage/liquids/silo.lua b/techage/liquids/silo.lua index b6fb63d..7087050 100644 --- a/techage/liquids/silo.lua +++ b/techage/liquids/silo.lua @@ -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 return 0 end - local nvm = techage.get_nvm(pos) - nvm.item_name = nil - local inv = minetest.get_meta(pos):get_inventory() - if inv:is_empty(listname) then - return stack:get_count() - end - if inv:contains_item(listname, ItemStack(stack:get_name())) then - return stack:get_count() + -- check if it is powder + local ndef = minetest.registered_craftitems[stack:get_name()] or {} + if ndef.groups and ndef.groups.powder == 1 then + local nvm = techage.get_nvm(pos) + nvm.item_name = nil + local inv = minetest.get_meta(pos):get_inventory() + if inv:is_empty(listname) then + return stack:get_count() + end + if inv:contains_item(listname, ItemStack(stack:get_name())) then + return stack:get_count() + end end return 0 end @@ -229,10 +233,21 @@ techage.register_node({"techage:ta3_silo", "techage:ta4_silo"}, { end end, on_push_item = function(pos, in_dir, stack) - local inv = M(pos):get_inventory() - if inv:room_for_item("main", stack) then - inv:add_item("main", stack) - return true + -- check if it is powder + local name = stack:get_name() + local ndef = minetest.registered_craftitems[name] or {} + 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 return false end, diff --git a/techage/locale/techage.de.tr b/techage/locale/techage.de.tr index 61e3e20..8b0753b 100644 --- a/techage/locale/techage.de.tr +++ b/techage/locale/techage.de.tr @@ -32,6 +32,9 @@ Bauxite Stone=Bauxit Biome=Biom Block configured items for open ports=Blockiere konfigurierte Gegenstände für offene Ausgänge Build derrick=Errichte Ölturm +Catalyst=Katalysator +Cement Block=Zement Block +Cement Powder=Zement Pulver 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 Consum. 1=Konsum. 1 @@ -89,6 +92,7 @@ Insert door/gate block number(s)=Gebe Tür-/Tornummer(n) ein Intake=Stromaufnahme Inventory,Configuration=Inventar,Konfiguration Inverter=Wechselrichter +Iron Powder=Eisen Pulver Leave Powder=Laub Pulver Liquid Filler=Einfülltrichter Liquid Sampler=Flüssigkeitensammler @@ -161,7 +165,7 @@ Rinsing=Waschen River Water Barrel=Flusswasserfass Save=Speichern 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: Show all forceload blocks in a 64x64x64 range=Zeige alle Forceload Blöcke im Umkreis von 64x64x64 Blöcken Sieved Basalt Gravel=Basaltkies gesiebt @@ -203,6 +207,7 @@ TA Power Switch Box=TA Stromschalterbox TA Power Switch Small=TA Stromschalter klein TA Street Lamp=TA Straßenlampe TA Tank Cart=TA Tankwagen +TA Valve=TA Ventil TA1 Bronze Hammer (smash stone to gravel)=TA1 Bronzehammer (zerschlage Stein zu Kies) TA1 Burning=TA1 Brennen TA1 Charcoal=TA1 Holzkohle @@ -291,6 +296,8 @@ TA3 Timer=TA3 Timer TA3 Tiny Power Generator=TA3 Kleiner Stromgenerator TA3 Turbine=TA3 Turbine 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 Button/Switch=TA4 Schalter/Taster TA4 Carbon Fiber=TA4 Kohlefaser @@ -348,7 +355,7 @@ TA4 Wind Turbine=TA4 Windkraftanlage TA4 Wind Turbine Nacelle=TA4 Windkraftanlagengondel TA4 Wind Turbine Signal Lamp=TA4 Windkraftanlagenlampe 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 Gate Block=TechAge Torblock TechAge Gravel=TechAge Kies @@ -404,6 +411,7 @@ added=hinzugefügt wird added or removed=hinzugefügt oder entfernt wird area is protected=Bereich ist geschützt blocking mode=Blockiert +catalyst missing=Katalysator fehlt commands like: help=Kommandos wie: help connected with=verbunden mit depth=Tiefe @@ -436,5 +444,6 @@ right to left=von rechts nach links stopped=gestoppt storage empty?=Speicher leer? water temperature=Wassertemperatur +wrong catalyst=falscher Katalysator wrong storage diameter=Falscher Wärmespeicher-Durchmesser ##### not used anymore ##### diff --git a/techage/locale/template.txt b/techage/locale/template.txt index 926d96b..f14a696 100644 --- a/techage/locale/template.txt +++ b/techage/locale/template.txt @@ -30,6 +30,9 @@ Bauxite Stone= Biome= Block configured items for open ports= Build derrick= +Catalyst= +Cement Block= +Cement Powder= Compressed Gravel= Configure up to 8 items @nto be pushed by the injector= Consum. 1= @@ -87,6 +90,7 @@ Insert door/gate block number(s)= Intake= Inventory,Configuration= Inverter= +Iron Powder= Leave Powder= Liquid Filler= Liquid Sampler= @@ -159,7 +163,7 @@ Rinsing= River Water Barrel= Save= 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:= Show all forceload blocks in a 64x64x64 range= Sieved Basalt Gravel= @@ -201,6 +205,7 @@ TA Power Switch Box= TA Power Switch Small= TA Street Lamp= TA Tank Cart= +TA Valve= TA1 Bronze Hammer (smash stone to gravel)= TA1 Burning= TA1 Charcoal= @@ -289,6 +294,8 @@ TA3 Timer= TA3 Tiny Power Generator= TA3 Turbine= TA3 Vacuum Tube= +TA3 Valve closed= +TA3 Valve open= TA4 8x2000 Chest= TA4 Button/Switch= TA4 Carbon Fiber= @@ -346,7 +353,7 @@ TA4 Wind Turbine= TA4 Wind Turbine Nacelle= TA4 Wind Turbine Signal Lamp= TechAge Black Hole= -TechAge Black Hole (let items disappear)= +TechAge Black Hole (let items and liquids disappear)= TechAge Door Block= TechAge Gate Block= TechAge Gravel= @@ -402,6 +409,7 @@ added= added or removed= area is protected= blocking mode= +catalyst missing= commands like: help= connected with= depth= @@ -434,4 +442,5 @@ right to left= stopped= storage empty?= water temperature= +wrong catalyst= wrong storage diameter= \ No newline at end of file diff --git a/techage/logic/collector.lua b/techage/logic/collector.lua index c0fa6ef..a9aa248 100644 --- a/techage/logic/collector.lua +++ b/techage/logic/collector.lua @@ -38,7 +38,7 @@ local function formspec(nvm, meta) 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,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.."]".. "button_exit[3,5;2,1;exit;Save]" end diff --git a/techage/logic/terminal.lua b/techage/logic/terminal.lua index 121d5c9..a786209 100644 --- a/techage/logic/terminal.lua +++ b/techage/logic/terminal.lua @@ -76,6 +76,7 @@ local function formspec2(meta) default.gui_bg.. default.gui_bg_img.. 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.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.."]".. diff --git a/techage/lua_controller/controller.lua b/techage/lua_controller/controller.lua index 72f3acf..c1f9b34 100644 --- a/techage/lua_controller/controller.lua +++ b/techage/lua_controller/controller.lua @@ -172,6 +172,7 @@ local function formspec1(meta) default.gui_bg.. default.gui_bg_img.. default.gui_slots.. + "style_type[textarea;font=mono]".. "tabheader[0,0;tab;init,func,loop,outp,notes,help;1;;true]".. "textarea[0.3,0.2;10,8.3;init;function init();"..init.."]".. "label[0,7.3;end]".. @@ -189,6 +190,7 @@ local function formspec2(meta) default.gui_bg.. default.gui_bg_img.. default.gui_slots.. + "style_type[textarea;font=mono]".. "tabheader[0,0;tab;init,func,loop,outp,notes,help;2;;true]".. "textarea[0.3,0.2;10,8.3;func;functions:;"..func.."]".. "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_img.. default.gui_slots.. + "style_type[textarea;font=mono]".. "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.."]".. "label[0,7.3;end]".. @@ -237,6 +240,7 @@ local function formspec5(meta) default.gui_bg.. default.gui_bg_img.. default.gui_slots.. + "style_type[textarea;font=mono]".. "tabheader[0,0;tab;init,func,loop,outp,notes,help;5;;true]".. "textarea[0.3,0.2;10,8.3;notes;Notepad:;"..notes.."]".. "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_img.. default.gui_slots.. + "style_type[textarea;font=mono]".. "tabheader[0,0;tab;init,func,loop,outp,notes,help;6;;true]".. "label[0,-0.2;Functions:]".. "dropdown[0.3,0.2;10,8.3;functions;"..items..";"..pos.."]".. diff --git a/techage/lua_controller/terminal.lua b/techage/lua_controller/terminal.lua index 5dfb0f5..031edf0 100644 --- a/techage/lua_controller/terminal.lua +++ b/techage/lua_controller/terminal.lua @@ -50,6 +50,7 @@ local function formspec2(meta) default.gui_bg.. default.gui_bg_img.. default.gui_slots.. + "style_type[table,field;font=mono]".. "table[0.1,0.1;8.6,6.6;output;"..output..";200]".. "field[0.5,7.6;6,1;cmnd;Enter command;]" .. "field_close_on_enter[cmnd;false]".. diff --git a/techage/manuals/manual_DE.md b/techage/manuals/manual_DE.md index c6bd734..20ca8dd 100644 --- a/techage/manuals/manual_DE.md +++ b/techage/manuals/manual_DE.md @@ -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. 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. [basalt|image] diff --git a/techage/manuals/manual_EN.md b/techage/manuals/manual_EN.md index c10363e..e369794 100644 --- a/techage/manuals/manual_EN.md +++ b/techage/manuals/manual_EN.md @@ -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. 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. [basalt|image] diff --git a/techage/manuals/manual_ta4_DE.md b/techage/manuals/manual_ta4_DE.md index 39ad7db..4807bbc 100644 --- a/techage/manuals/manual_ta4_DE.md +++ b/techage/manuals/manual_ta4_DE.md @@ -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. +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] @@ -258,7 +263,8 @@ Der Dosierer benötigt keinen Strom. Alle 10 s wird ein Rezept abgearbeitet. ### 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] diff --git a/techage/manuals/manual_ta4_EN.md b/techage/manuals/manual_ta4_EN.md index 8247146..04acecd 100644 --- a/techage/manuals/manual_ta4_EN.md +++ b/techage/manuals/manual_ta4_EN.md @@ -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. +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] @@ -251,7 +258,7 @@ The recipe can be set and the reactor started via the doser. As with other machines: - 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. @@ -259,7 +266,7 @@ The doser does not need any electricity. A recipe is processed every 10 s. ### 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] diff --git a/techage/mod.conf b/techage/mod.conf index 632496e..66b1420 100644 --- a/techage/mod.conf +++ b/techage/mod.conf @@ -1,4 +1,4 @@ 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 description = Techage, go through 4 tech ages in search of wealth and power! diff --git a/techage/power/node_api.lua b/techage/power/node_api.lua index 9d7487e..a5db533 100644 --- a/techage/power/node_api.lua +++ b/techage/power/node_api.lua @@ -139,7 +139,7 @@ end -- 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) local nvm = techage.get_nvm(pos) local tlib_type = Cable.tube_type diff --git a/towercrane/init.lua b/towercrane/init.lua index e37bbcf..375aaae 100644 --- a/towercrane/init.lua +++ b/towercrane/init.lua @@ -268,6 +268,28 @@ minetest.register_node("towercrane:base", { meta:set_string("dir", P2S(dir)) 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), -- destroy old crane and build a new one with -- the given size diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua index d24135b..81dd8f3 100644 --- a/unified_inventory/api.lua +++ b/unified_inventory/api.lua @@ -188,7 +188,9 @@ function unified_inventory.go_home(player) local pos = unified_inventory.home_pos[player:get_player_name()] if pos then player:set_pos(pos) + return true end + return false end -- register_craft diff --git a/unified_inventory/depends.txt b/unified_inventory/depends.txt deleted file mode 100644 index cb3d2b4..0000000 --- a/unified_inventory/depends.txt +++ /dev/null @@ -1,5 +0,0 @@ -default -creative? -sfinv? -datastorage? -farming? diff --git a/unified_inventory/description.txt b/unified_inventory/description.txt deleted file mode 100644 index b541fdf..0000000 --- a/unified_inventory/description.txt +++ /dev/null @@ -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. diff --git a/unified_inventory/internal.lua b/unified_inventory/internal.lua index ee8b4a9..eeab695 100644 --- a/unified_inventory/internal.lua +++ b/unified_inventory/internal.lua @@ -290,10 +290,14 @@ function unified_inventory.apply_filter(player, filter, search_dir) return true end else + local lang = minetest.get_player_information(player_name).lang_code ffilter = function(name, def) local lname = string.lower(name) 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) + or llocaldesc and string.find(llocaldesc, lfilter, 1, true) end end unified_inventory.filtered_items_list[player_name]={} diff --git a/unified_inventory/mod.conf b/unified_inventory/mod.conf index 4fe3375..bca70ca 100644 --- a/unified_inventory/mod.conf +++ b/unified_inventory/mod.conf @@ -1,4 +1,7 @@ name = unified_inventory depends = default 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. +""" diff --git a/unified_inventory/register.lua b/unified_inventory/register.lua index f958a6d..017e4af 100644 --- a/unified_inventory/register.lua +++ b/unified_inventory/register.lua @@ -76,9 +76,9 @@ unified_inventory.register_button("home_gui_go", { action = function(player) local player_name = player:get_player_name() if minetest.check_player_privs(player_name, {home=true}) then - minetest.sound_play("teleport", - {to_player=player:get_player_name(), gain = 1.0}) - unified_inventory.go_home(player) + if unified_inventory.go_home(player) then + minetest.sound_play("teleport", {to_player = player_name}) + end else minetest.chat_send_player(player_name, S("You don't have the \"home\" privilege!"))