diff --git a/chemistry/ta4_liquid_filter.lua b/chemistry/ta4_liquid_filter.lua new file mode 100644 index 0000000..8d4f543 --- /dev/null +++ b/chemistry/ta4_liquid_filter.lua @@ -0,0 +1,220 @@ +--[[ + + TechAge + ======= + + Copyright (C) 2019-2020 Joachim Stolberg + Copyright (C) 2020 Thomas S. + + GPL v3 + See LICENSE.txt for more information + + TA4 Liquid Filter + +]]-- + +-- For now, the Red Mud -> Lye/Desert Cobble recipe is hardcoded. +-- If necessary, this can be adjusted later. + +local M = minetest.get_meta +local S = techage.S +local Pipe = techage.LiquidPipe +local liquid = techage.liquid + +-- Checks if the filter structure is ok and returns the amount of gravel +local function checkStructure(pos) + local pos1_outer = {x=pos.x-2,y=pos.y-7,z=pos.z-2} + local pos2_outer = {x=pos.x+2,y=pos.y,z=pos.z+2} + local pos1_inner = {x=pos.x-1,y=pos.y-1,z=pos.z-1} + local pos2_inner = {x=pos.x+1,y=pos.y-7,z=pos.z+1} + local pos1_top = {x=pos.x-1,y=pos.y,z=pos.z-1} + local pos2_top = {x=pos.x+1,y=pos.y,z=pos.z+1} + local pos1_bottom = {x=pos.x-2,y=pos.y-8,z=pos.z-2} + local pos2_bottom = {x=pos.x+2,y=pos.y-8,z=pos.z+2} + + + local gravel = minetest.find_nodes_in_area(pos1_inner, pos2_inner, {"default:gravel"}) + + local _, inner = minetest.find_nodes_in_area(pos1_inner, pos2_inner, { + "default:desert_cobble" + }) + if #gravel + (inner["default:desert_cobble"] or 0) ~= 63 then -- 7x3x3=63 + return false, gravel + end + + local _, outer = minetest.find_nodes_in_area(pos1_outer, pos2_outer, { + "basic_materials:concrete_block", + "default:obsidian_glass" + }) + + -- + 4x7=28 (corners) + -- + 5x5-3x3=16 (top ring) + -- ------------------------------ + -- = 44 (total concrete) + if outer["basic_materials:concrete_block"] ~= 44 then + return false, gravel + end + if outer["default:obsidian_glass"] ~= 84 then -- 4x7x3=84 + return false, gravel + end + + local _,top = minetest.find_nodes_in_area(pos1_top, pos2_top, {"air"}) + if top["air"] ~= 8 then + return false, gravel + end + + local _,bottom = minetest.find_nodes_in_area(pos1_bottom, pos2_bottom, { + "basic_materials:concrete_block", + "techage:ta3_pipe_wall_entry" + }) + if bottom["basic_materials:concrete_block"] ~= 22 or bottom["techage:ta3_pipe_wall_entry"] ~= 2 then + return false, gravel + end + + if minetest.get_node({x=pos.x,y=pos.y-8,z=pos.z}).name ~= "techage:ta4_liquid_filter_sink" then + return false, gravel + end + + return true, gravel +end + +minetest.register_node("techage:ta4_liquid_filter_filler", { + description = S("TA4 Liquid Filter Filler"), + tiles = { + -- up, down, right, left, back, front + "basic_materials_concrete_block.png^techage_gaspipe_hole.png", + "basic_materials_concrete_block.png^techage_liquid_filter_filler_bottom.png", + "basic_materials_concrete_block.png^techage_liquid_filter_filler.png", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-6/8, -0.5, -6/8, 6/8, -0.25, 6/8}, + {-7/16, -0.25, -7/16, 7/16, 0, 7/16}, + {-1/8, 0, -1/8, 1/8, 13/32, 1/8}, + {-2/8, 13/32, -2/8, 2/8, 0.5, 2/8}, + }, + }, + after_place_node = function(pos) + Pipe:after_place_node(pos) + end, + tubelib2_on_update2 = function(pos, dir, tlib2, node) + liquid.update_network(pos) + end, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + Pipe:after_dig_node(pos) + end, + + paramtype = "light", + paramtype2 = "facedir", + on_rotate = screwdriver.disallow, + groups = {cracky=2}, + is_ground_content = false, + sounds = default.node_sound_metal_defaults(), + + + liquid = { + capa = 1, + peek = function(...) return nil end, + put = function(pos, indir, name, amount) + local structure_ok, gravel = checkStructure(pos) + if name ~= "techage:redmud" then + return amount + end + if not structure_ok then + return amount + end + if #gravel < 33 then + return amount + end + if math.random() < 0.5 then + local leftover = liquid.put({x=pos.x,y=pos.y-8,z=pos.z}, 2, "techage:lye", 1) + if leftover > 0 then + return amount + end + else + minetest.swap_node(gravel[math.random(#gravel)], {name = "default:desert_cobble"}) + end + return amount - 1 + end, + take = function(...) return 0 end, + untake = function(pos, outdir, name, amount, player_name) + return amount + end, + }, + + networks = { + pipe2 = { + sides = {U = 1}, -- Pipe connection sides + ntype = "tank", + }, + }, +}) + +minetest.register_node("techage:ta4_liquid_filter_sink", { + description = S("TA4 Liquid Filter Sink"), + tiles = { + -- up, down, right, left, back, front + "basic_materials_concrete_block.png^techage_appl_arrow.png", + "basic_materials_concrete_block.png", + "basic_materials_concrete_block.png^techage_appl_hole_pipe.png", + "basic_materials_concrete_block.png", + "basic_materials_concrete_block.png", + "basic_materials_concrete_block.png", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 3/16, 0.5}, + {-0.5, 3/16, -0.5, 0.5, 5/16, -0.25}, + {0.25, 3/16, -0.5, 0.5, 5/16, 0.5}, + {-0.5, 3/16, 0.25, 0.5, 5/16, 0.5}, + {-0.5, 3/16, -0.5, -0.25, 5/16, 0.5} + }, + }, + after_place_node = function(pos) + Pipe:after_place_node(pos) + end, + tubelib2_on_update2 = function(pos, dir, tlib2, node) + liquid.update_network(pos) + end, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + Pipe:after_dig_node(pos) + end, + + paramtype = "light", + paramtype2 = "facedir", + on_rotate = screwdriver.disallow, + groups = {cracky=2}, + is_ground_content = false, + sounds = default.node_sound_metal_defaults(), + + networks = { + pipe2 = { + sides = {R = 1}, -- Pipe connection sides + ntype = "pump", + }, + }, +}) + +Pipe:add_secondary_node_names({"techage:ta4_liquid_filter_filler", "techage:ta4_liquid_filter_sink"}) + +minetest.register_craft({ + output = 'techage:ta4_liquid_filter_filler', + recipe = { + {'', 'techage:ta3_pipeS', ''}, + {'basic_materials:concrete_block', 'basic_materials:concrete_block', 'basic_materials:concrete_block'}, + {'', 'default:steel_ingot', ''}, + } +}) + +minetest.register_craft({ + output = 'techage:ta4_liquid_filter_sink 2', + recipe = { + {'basic_materials:concrete_block', '', 'basic_materials:concrete_block'}, + {'basic_materials:concrete_block', 'techage:ta3_pipeS', 'techage:ta3_pipeS'}, + {'basic_materials:concrete_block', 'basic_materials:concrete_block', 'basic_materials:concrete_block'}, + } +}) \ No newline at end of file diff --git a/doc/items.lua b/doc/items.lua index ef5ac6b..034fd1c 100644 --- a/doc/items.lua +++ b/doc/items.lua @@ -172,5 +172,6 @@ techage.Items = { ta4_quarry = "techage:ta4_quarry_pas", ta4_electronicfab = "techage:ta4_electronic_fab_pas", ta4_injector = "techage:ta4_injector_pas", + ta4_liquid_filter = "techage_ta4_filter.png", --ta4_ "", } diff --git a/doc/manual_DE.lua b/doc/manual_DE.lua index 6039266..1761303 100644 --- a/doc/manual_DE.lua +++ b/doc/manual_DE.lua @@ -170,6 +170,10 @@ techage.manual_DE.aTitel = { "3,TA4 LED Pflanzenlampe / TA4 LED Grow Light", "3,TA4 LED Straßenlampe / TA4 LED Street Lamp", "3,TA4 LED Industrielampe / TA4 LED Industrial Lamp", + "2,TA4 Flüssigkeitsfilter", + "3,Fundament-Ebene", + "3,Schotter-Ebene", + "3,Einfüll-Ebene", "2,Weitere TA4 Blöcke", "3,TA4 Tank / TA4 Tank", "3,TA4 Pumpe / TA4 Pump", @@ -1402,6 +1406,31 @@ techage.manual_DE.aText = { "\n".. "\n".. "\n", + "Im Flüssigkeitsfilter wird Rotschlamm gefiltert.\n".. + "Dabei entsteht entweder Lauge\\, welche unten in einem Tank gesammelt werden kann oder Wüstenkopfsteinpflaster\\, welches sich im Filter absetzt.\n".. + "Wenn der Filter zu sehr verstopft ist\\, muss er geleert und neu befüllt werden.\n".. + "Der Filter besteht aus einer Fundament-Ebene\\, auf der 7 identische Filterschichten platziert werden. \n".. + "Ganz oben befindet sich die Einfüllebene.\n".. + "\n".. + "\n".. + "\n", + "Der Aufbau dieser Ebene kann dem Plan entnommen werden.\n".. + "\n".. + "Im Tank wird die Lauge gesammelt.\n".. + "\n".. + "\n".. + "\n", + "Diese Ebene muss so wie im Plan gezeigt mit Schotter befüllt werden.\n".. + "Insgesamt müssen sieben Lagen Schotter übereinander liegen.\n".. + "Dabei wird mit der Zeit der Filter verunreinigt\\, sodass das Füllmaterial erneuert werden muss.\n".. + "\n".. + "\n".. + "\n", + "Diese Ebene dient zum Befüllen des Filters mit Rotschlamm.\n".. + "In den Einfüllstutzen muss Rotschlamm mittels einer Pumpe geleitet werden.\n".. + "\n".. + "\n".. + "\n", "", "Siehe TA3 Tank.\n".. "\n".. @@ -1678,6 +1707,10 @@ techage.manual_DE.aItemName = { "ta4_growlight", "ta4_streetlamp", "ta4_industriallamp", + "ta4_liquid_filter", + "", + "", + "", "", "ta4_tank", "ta4_pump", @@ -1866,6 +1899,10 @@ techage.manual_DE.aPlanTable = { "", "", "", + "ta4_liquid_filter_base", + "ta4_liquid_filter_gravel", + "ta4_liquid_filter_top", + "", "", "", "", diff --git a/doc/manual_EN.lua b/doc/manual_EN.lua index 3473f67..4b24d6c 100644 --- a/doc/manual_EN.lua +++ b/doc/manual_EN.lua @@ -170,6 +170,10 @@ techage.manual_EN.aTitel = { "3,TA4 LED Grow Light", "3,TA4 Street Lamp", "3,TA4 LED Industrial Lamp", + "2,TA4 Liquid Filter", + "3,Base Layer", + "3,Gravel Layer", + "3,Filling Layer", "2,More TA4 Blocks", "3,TA4 Tank", "3,TA4 Pump", @@ -1393,6 +1397,31 @@ techage.manual_EN.aText = { "\n".. "\n".. "\n", + "The liquid filter filters red mud.\n".. + "A part of the red mud becomes lye\\, which can be collected at the bottom in a tank.\n".. + "The other part becomes desert cobblestone and clutters the filter material.\n".. + "If the filter is too clogged\\, it has to be cleaned and re-filled.\n".. + "The filter consists of a base layer\\, 7 identical filter layers and a filling layer at the top.\n".. + "\n".. + "\n".. + "\n", + "You can see the structure of this layer in the plan.\n".. + "\n".. + "The lye is collected in the tank.\n".. + "\n".. + "\n".. + "\n", + "This layer has to be filled with gravel as shown in the plan.\n".. + "In total\\, there must be seven layers of gravel.\n".. + "The filter will become cluttered over time\\, so that it has to be cleaned and re-filled.\n".. + "\n".. + "\n".. + "\n", + "This layer is used to fill the filter with red mud.\n".. + "The red mud must be pumped into the filler pipe.\n".. + "\n".. + "\n".. + "\n", "", "See TA3 tank.\n".. "\n".. @@ -1669,6 +1698,10 @@ techage.manual_EN.aItemName = { "ta4_growlight", "ta4_streetlamp", "ta4_industriallamp", + "ta4_liquid_filter", + "", + "", + "", "", "ta4_tank", "ta4_pump", @@ -1857,6 +1890,10 @@ techage.manual_EN.aPlanTable = { "", "", "", + "ta4_liquid_filter_base", + "ta4_liquid_filter_gravel", + "ta4_liquid_filter_top", + "", "", "", "", diff --git a/doc/plans.lua b/doc/plans.lua index 73b0289..4af9460 100644 --- a/doc/plans.lua +++ b/doc/plans.lua @@ -23,6 +23,7 @@ local IMG_4 = {"", "techage_ta4.png"} local IMG41 = {"", "techage_ta4_tes.png"} local IMG42 = {"", "techage_ta4_solar.png"} local IMG43 = {"", "techage_reactor_inv.png"} +local IMG44 = {"", "techage_ta4_filter.png"} -- -- TA1: Coal Pile @@ -172,7 +173,7 @@ techage.ConstructionPlans["ta3_furnace"] = { -- TA3 Tank Pump Pusher -- local Pump = {"techage_filling_ta3.png^techage_appl_pump.png^techage_frame_ta3.png", "techage:t3_pump"} -local Tank = {"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_tank.png", "techage:ta3_tank"} +local TANK3 = {"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_tank.png", "techage:ta3_tank"} local Fillr = {"techage_filling_ta3.png^techage_appl_liquid_hopper.png^techage_frame_ta3.png", "techage:filler"} local PIPEH = {"techage_gaspipe.png", "techage:ta4_pipeS"} local PIPEV = {"techage_gaspipe.png^[transformR90", "techage:ta4_pipeS"} @@ -184,7 +185,7 @@ local PN270 = {"techage_gaspipe_knee.png^[transformR270", "techage:ta4_pipeS"} techage.ConstructionPlans["ta3_tank"] = { {false, false, false, false, false, false, false, false, false, false}, {false, Tubes, PushR, Tubes, Fillr, Tubes, PushR, Tubes, false, false}, - {false, false, false, false, Tank, PIPEH, PIPEH, Pump, PIPEH, Tank}, + {false, false, false, false, TANK3, PIPEH, PIPEH, Pump, PIPEH, Tank}, {false, false, false, false, false, false, false, false, false, false}, } @@ -205,7 +206,7 @@ local BUFFR = {"default_junglewood.png^minecart_buffer.png", "minecart:buffer"} techage.ConstructionPlans["ta3_loading"] = { {false, false, PIPEH, Pump, PIPEH, PN270, false, false, false, false, false}, {false, false, false, false, false, PIPEV, false, false, false, false, false}, - {false, MCART, false, false, false, PN090, Tank, false, false, false, false}, + {false, MCART, false, false, false, PN090, TANK3, false, false, false, false}, {false, HOPPR, CHEST, Tubes, PushR, Tubes, Fillr, PushR, Tubes, MCART, false}, {false, false, false, false, false, false, false, false, false, false, false}, {false, false, false, false, false, false, false, false, false, false, false}, @@ -226,16 +227,16 @@ local DBASE = {"techage_concrete.png", "techage:ta3_distiller_base"} local REBIO = {"techage_filling_ta3.png^techage_appl_reboiler.png^techage_frame_ta3.png", "techage:ta3_reboiler"} techage.ConstructionPlans["ta3_distiller"] = { - {false, false, false, false, false, false, false, PN000, PIPEH, Tank, false}, + {false, false, false, false, false, false, false, PN000, PIPEH, TANK3, false}, {false, IMG31, false, false, false, false, false, DIST4, false, false, false}, - {false, false, false, false, false, false, false, DIST3, PIPEH, Tank, false}, + {false, false, false, false, false, false, false, DIST3, PIPEH, TANK3, false}, {false, false, false, false, false, false, false, DIST2, false, false, false}, - {false, false, false, false, false, false, false, DIST3, PIPEH, Tank, false}, + {false, false, false, false, false, false, false, DIST3, PIPEH, TANK3, false}, {false, false, false, false, false, false, false, DIST2, false, false, false}, - {false, false, false, false, false, false, false, DIST3, PIPEH, Tank, false}, + {false, false, false, false, false, false, false, DIST3, PIPEH, TANK3, false}, {false, false, false, false, false, false, false, DIST2, false, false, false}, - {false, Tank, PIPEH, Pump, PIPEH, REBIO, PIPEH, DIST1, false, false, false}, - {false, false, false, false, false, false, false, DBASE, PIPEH, Tank, false}, + {false, TANK3, PIPEH, Pump, PIPEH, REBIO, PIPEH, DIST1, false, false, false}, + {false, false, false, false, false, false, false, DBASE, PIPEH, TANK3, false}, } -- @@ -255,7 +256,7 @@ techage.ConstructionPlans["ta4_reactor"] = { {false, false, false, false, PIPEV, false, false, FILLR, false, false, false}, {false, false, false, false, PIPEV, false, false, REACT, false, false, false}, {false, false, false, false, PIPEV, false, false, STAND, PIPEH, PIPEH, SILO}, - {false, Tank, PIPEH, PIPEH, DOSER, PN270, false, RBASE, PIPEH, PIPEH, Tank}, + {false, TANK3, PIPEH, PIPEH, DOSER, PN270, false, RBASE, PIPEH, PIPEH, Tank}, {false, SILO, PIPEH, PIPEH, PIPEH, PN180, false, false, false, false, false}, } @@ -322,4 +323,44 @@ techage.ConstructionPlans["ta4_solarplant"] = { } +-- +-- Liquid Filter +-- +local LFSNK = {"basic_materials_concrete_block.png^techage_appl_arrow.png", "techage:ta4_liquid_filter_sink"} +local PWETR = {"basic_materials_concrete_block.png^techage_gaspipe.png", "techage:ta3_pipe_wall_entry"} +local TANK4 = {"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_tank.png", "techage:ta4_tank"} +local LFFIL = {"basic_materials_concrete_block.png^techage_gaspipe_hole.png", "techage:ta4_liquid_filter_filler"} + +techage.ConstructionPlans["ta4_liquid_filter_base"] = { + {false, false, false, false, false, false, false, false, IMG44, false}, + {false, false, false, false, false, false, false, false, false, false}, + {false, false, false, false, false, false, false, false, false, false}, + {false, CONCR, CONCR, CONCR, CONCR, CONCR}, + {false, CONCR, CONCR, CONCR, CONCR, CONCR}, + {false, CONCR, CONCR, LFSNK, PWETR, PWETR, PIPEH, PIPEH, TANK4}, + {false, CONCR, CONCR, CONCR, CONCR, CONCR}, + {false, CONCR, CONCR, CONCR, CONCR, CONCR}, +} + +techage.ConstructionPlans["ta4_liquid_filter_gravel"] = { + {false, false, false, false, false, false, false, false, IMG44, false}, + {false, false, false, false, false, false, false, false, false, false}, + {false, false, false, false, false, false, false, false, false, false}, + {false, CONCR, OGLAS, OGLAS, OGLAS, CONCR}, + {false, OGLAS, GRAVL, GRAVL, GRAVL, OGLAS}, + {false, OGLAS, GRAVL, GRAVL, GRAVL, OGLAS}, + {false, OGLAS, GRAVL, GRAVL, GRAVL, OGLAS}, + {false, CONCR, OGLAS, OGLAS, OGLAS, CONCR}, +} + +techage.ConstructionPlans["ta4_liquid_filter_top"] = { + {false, false, false, false, false, false, false, false, IMG44, false}, + {false, false, false, false, false, false, false, false, false, false}, + {false, false, false, false, false, false, false, false, false, false}, + {false, CONCR, CONCR, CONCR, CONCR, CONCR}, + {false, CONCR, false, false, false, CONCR}, + {false, CONCR, false, LFFIL, false, CONCR}, + {false, CONCR, false, false, false, CONCR}, + {false, CONCR, CONCR, CONCR, CONCR, CONCR}, +} \ No newline at end of file diff --git a/icta_controller/battery.lua b/icta_controller/battery.lua index 9f1a4f7..7d3f262 100644 --- a/icta_controller/battery.lua +++ b/icta_controller/battery.lua @@ -94,7 +94,7 @@ minetest.register_node("techage:ta4_battery", { paramtype = "light", sunlight_propagates = true, paramtype2 = "facedir", - groups = {choppy=1, cracky=1, crumbly=1, not_in_creative_inventory=nici}, + groups = {choppy=1, cracky=1, crumbly=1}, is_ground_content = false, sounds = default.node_sound_stone_defaults(), }) diff --git a/init.lua b/init.lua index 6c94bd5..d6b1b85 100644 --- a/init.lua +++ b/init.lua @@ -271,6 +271,7 @@ dofile(MP.."/energy_storage/nodes.lua") dofile(MP.."/chemistry/ta4_reactor.lua") dofile(MP.."/chemistry/ta4_stand.lua") dofile(MP.."/chemistry/ta4_doser.lua") +dofile(MP.."/chemistry/ta4_liquid_filter.lua") -- Hydrogen dofile(MP.."/hydrogen/fuelcellstack.lua") diff --git a/liquids/pump.lua b/liquids/pump.lua index a01c36e..45fc50b 100644 --- a/liquids/pump.lua +++ b/liquids/pump.lua @@ -69,10 +69,12 @@ local function pumping(pos, nvm, state, capa) local taken, name = liquid.take(pos, Flip[outdir], nil, capa, starter) if taken > 0 then local leftover = liquid.put(pos, outdir, name, taken, starter) - if leftover and leftover == taken then + if leftover then liquid.untake(pos, Flip[outdir], name, leftover) - state:blocked(pos, nvm) - return + if leftover == taken then + state:blocked(pos, nvm) + return + end end state:keep_running(pos, nvm, COUNTDOWN_TICKS) return diff --git a/locale/techage.de.tr b/locale/techage.de.tr index 21ae9dc..6d139ab 100644 --- a/locale/techage.de.tr +++ b/locale/techage.de.tr @@ -329,6 +329,8 @@ TA4 LED Street Lamp=TA4 LED Straßenlampe TA4 LED Street Lamp Arm=TA4 LED Lampenarm TA4 LED Street Lamp Pole=TA4 LED Lampenmast TA4 LEDs=TA4 LEDs +TA4 Liquid Filter Filler=TA4 Flüssigkeitsfilter Einfüllstutzen +TA4 Liquid Filter Sink=TA4 Flüssigkeitsfilter Abfluss TA4 Low Power Box=TA4 Niederspannungsverteilerbox TA4 Low Power Cable=TA4 Niederspannungskabel TA4 Pillar=TA4 Säule diff --git a/locale/template.txt b/locale/template.txt index 2d9530a..31ccf96 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -327,6 +327,8 @@ TA4 LED Street Lamp= TA4 LED Street Lamp Arm= TA4 LED Street Lamp Pole= TA4 LEDs= +TA4 Liquid Filter Filler= +TA4 Liquid Filter Sink= TA4 Low Power Box= TA4 Low Power Cable= TA4 Pillar= diff --git a/manuals/manual_ta4_DE.md b/manuals/manual_ta4_DE.md index 178c703..2afd3da 100644 --- a/manuals/manual_ta4_DE.md +++ b/manuals/manual_ta4_DE.md @@ -474,6 +474,42 @@ Die Lampe benötigt 1 ku Strom. +## TA4 Flüssigkeitsfilter + +Im Flüssigkeitsfilter wird Rotschlamm gefiltert. +Dabei entsteht entweder Lauge, welche unten in einem Tank gesammelt werden kann oder Wüstenkopfsteinpflaster, welches sich im Filter absetzt. +Wenn der Filter zu sehr verstopft ist, muss er geleert und neu befüllt werden. +Der Filter besteht aus einer Fundament-Ebene, auf der 7 identische Filterschichten platziert werden. +Ganz oben befindet sich die Einfüllebene. + +[ta4_liquid_filter|image] + +### Fundament-Ebene + +Der Aufbau dieser Ebene kann dem Plan entnommen werden. + +Im Tank wird die Lauge gesammelt. + +[ta4_liquid_filter_base|plan] + +### Schotter-Ebene + +Diese Ebene muss so wie im Plan gezeigt mit Schotter befüllt werden. +Insgesamt müssen sieben Lagen Schotter übereinander liegen. +Dabei wird mit der Zeit der Filter verunreinigt, sodass das Füllmaterial erneuert werden muss. + +[ta4_liquid_filter_gravel|plan] + +### Einfüll-Ebene + +Diese Ebene dient zum Befüllen des Filters mit Rotschlamm. +In den Einfüllstutzen muss Rotschlamm mittels einer Pumpe geleitet werden. + +[ta4_liquid_filter_top|plan] + + + + ## Weitere TA4 Blöcke ### TA4 Tank / TA4 Tank diff --git a/manuals/manual_ta4_EN.md b/manuals/manual_ta4_EN.md index 665ca46..8ae2363 100644 --- a/manuals/manual_ta4_EN.md +++ b/manuals/manual_ta4_EN.md @@ -475,6 +475,42 @@ The lamp requires 1 ku of electricity. +## TA4 Liquid Filter + +The liquid filter filters red mud. +A part of the red mud becomes lye, which can be collected at the bottom in a tank. +The other part becomes desert cobblestone and clutters the filter material. +If the filter is too clogged, it has to be cleaned and re-filled. +The filter consists of a base layer, 7 identical filter layers and a filling layer at the top. + +[ta4_liquid_filter|image] + +### Base Layer + +You can see the structure of this layer in the plan. + +The lye is collected in the tank. + +[ta4_liquid_filter_base|plan] + +### Gravel Layer + +This layer has to be filled with gravel as shown in the plan. +In total, there must be seven layers of gravel. +The filter will become cluttered over time, so that it has to be cleaned and re-filled. + +[ta4_liquid_filter_gravel|plan] + +### Filling Layer + +This layer is used to fill the filter with red mud. +The red mud must be pumped into the filler pipe. + +[ta4_liquid_filter_top|plan] + + + + ## More TA4 Blocks ### TA4 Tank diff --git a/manuals/markdown2formspec.py b/manuals/markdown2formspec.py index aee6ebb..72df37b 100644 --- a/manuals/markdown2formspec.py +++ b/manuals/markdown2formspec.py @@ -190,7 +190,7 @@ class MyRenderer(mistune.Renderer): return "\\n" def inline_html(self, text): - print text + print(text) # ~ # ~ double_emphasis(text) # ~ image(src, title, alt_text) @@ -207,7 +207,7 @@ def parse_md_file(src_name, mod, manual): inline.enable_wiki_link() md = mistune.Markdown(renderer=renderer, inline=inline) md.renderer.src_name = src_name - md.render(file(src_name).read()) + md.render(open(src_name, 'r').read()) md.renderer.add_last_paragraph() def gen_lua_file(dest_name): @@ -217,7 +217,7 @@ def gen_lua_file(dest_name): lOut.append(lua_text_table("%s.%s.aText" % (mod, manual), lText)) lOut.append(lua_table("%s.%s.aItemName" % (mod, manual), lItemName)) lOut.append(lua_table("%s.%s.aPlanTable" % (mod, manual), lPlanTable)) - file(dest_name, "w").write("".join(lOut)) + open(dest_name, "w").write("".join(lOut)) def gen_toc_md_file(dest_name, titel, level_range=[1,6]): print("Write MD file '%s'" % dest_name) @@ -228,7 +228,7 @@ def gen_toc_md_file(dest_name, titel, level_range=[1,6]): list_item = " " * (item["level"] - level_range[0]) + "-" link = "%s#%s" % (item["link"], header_escsape(item["header"])) lOut.append("%s [%s](%s)" % (list_item, item["header"], link)) - file(dest_name, "w").write("\n".join(lOut)) + open(dest_name, "w").write("\n".join(lOut)) def gen_file_local_toc(dest_name, level_range=[1,6]): lOut = [] @@ -237,7 +237,7 @@ def gen_file_local_toc(dest_name, level_range=[1,6]): list_item = " " * (item["level"] - level_range[0]) + "-" link = "#%s" % (item["header"].replace(" ", "-").replace("\\", "")) lOut.append("%s [%s](%s)" % (list_item, item["header"].replace("\\", ""), link)) - file(dest_name, "w").write("\n".join(lOut)) + open(dest_name, "w").write("\n".join(lOut)) ########################### German ######################### mod = "techage" diff --git a/manuals/toc_DE.md b/manuals/toc_DE.md index 8ca24f5..8e26dda 100644 --- a/manuals/toc_DE.md +++ b/manuals/toc_DE.md @@ -44,10 +44,10 @@ - [TA2 Flüssigkeitensammler / Liquid Sampler](./manual_ta2_DE.md#ta2-flüssigkeitensammler--liquid-sampler) - [TA2 Gesicherte Kiste / Protected Chest](./manual_ta2_DE.md#ta2-gesicherte-kiste--protected-chest) - [Techage Forceload Block](./manual_ta2_DE.md#techage-forceload-block) -- [TA3: Ölzeitalter](./manual_ta3_DE.md#ta3:-Ölzeitalter) - - [Kohlekraftwerk / Ölkraftwerk](./manual_ta3_DE.md#kohlekraftwerk--Ölkraftwerk) +- [TA3: Ölzeitalter](./manual_ta3_DE.md#ta3:-ölzeitalter) + - [Kohlekraftwerk / Ölkraftwerk](./manual_ta3_DE.md#kohlekraftwerk--ölkraftwerk) - [TA3 Kraftwerks-Feuerbox / Power Station Firebox](./manual_ta3_DE.md#ta3-kraftwerks-feuerbox--power-station-firebox) - - [TA3 Kraftwerks-Ölbrenner / TA3 Power Station Oil Burner](./manual_ta3_DE.md#ta3-kraftwerks-Ölbrenner--ta3-power-station-oil-burner) + - [TA3 Kraftwerks-Ölbrenner / TA3 Power Station Oil Burner](./manual_ta3_DE.md#ta3-kraftwerks-ölbrenner--ta3-power-station-oil-burner) - [TA3 Boiler unten/oben](./manual_ta3_DE.md#ta3-boiler-untenoben) - [TA3 Turbine](./manual_ta3_DE.md#ta3-turbine) - [TA3 Generator](./manual_ta3_DE.md#ta3-generator) @@ -66,7 +66,7 @@ - [TA3 Akku Block / Akku Box](./manual_ta3_DE.md#ta3-akku-block---akku-box) - [TA3 Strom Terminal / Power Terminal](./manual_ta3_DE.md#ta3-strom-terminal--power-terminal) - [TA3 Industrieofen](./manual_ta3_DE.md#ta3-industrieofen) - - [TA3 Ofen-Ölbrenner / Furnace Oil Burner](./manual_ta3_DE.md#ta3-ofen-Ölbrenner--furnace-oil-burner) + - [TA3 Ofen-Ölbrenner / Furnace Oil Burner](./manual_ta3_DE.md#ta3-ofen-ölbrenner--furnace-oil-burner) - [TA3 Ofenoberteil / Furnace Top](./manual_ta3_DE.md#ta3-ofenoberteil--furnace-top) - [TA3 Gebläse / Booster](./manual_ta3_DE.md#ta3-gebläse--booster) - [Flüssigkeiten](./manual_ta3_DE.md#flüssigkeiten) @@ -76,18 +76,18 @@ - [TA4 Röhre / Pipe](./manual_ta3_DE.md#ta4-röhre--pipe) - [TA3 Rohr/Wanddurchbruch / TA3 Pipe Wall Entry Blöcke](./manual_ta3_DE.md#ta3-rohrwanddurchbruch--ta3-pipe-wall-entry-blöcke) - [TA Ventil / TA Valve](./manual_ta3_DE.md#ta-ventil--ta-valve) - - [Öl-Förderung](./manual_ta3_DE.md#Öl-förderung) - - [TA3 Ölexplorer / Oil Explorer](./manual_ta3_DE.md#ta3-Ölexplorer--oil-explorer) - - [TA3 Ölbohrkiste / Oil Drill Box](./manual_ta3_DE.md#ta3-Ölbohrkiste--oil-drill-box) - - [TA3 Ölpumpe / Oil Pumpjack](./manual_ta3_DE.md#ta3-Ölpumpe--oil-pumpjack) + - [Öl-Förderung](./manual_ta3_DE.md#öl-förderung) + - [TA3 Ölexplorer / Oil Explorer](./manual_ta3_DE.md#ta3-ölexplorer--oil-explorer) + - [TA3 Ölbohrkiste / Oil Drill Box](./manual_ta3_DE.md#ta3-ölbohrkiste--oil-drill-box) + - [TA3 Ölpumpe / Oil Pumpjack](./manual_ta3_DE.md#ta3-ölpumpe--oil-pumpjack) - [TA3 Bohrgestänge / Drill Pipe](./manual_ta3_DE.md#ta3-bohrgestänge--drill-pipe) - - [Öltank / Oil Tank](./manual_ta3_DE.md#Öltank--oil-tank) - - [Öl-Transport](./manual_ta3_DE.md#Öl-transport) - - [Öl-Transport mit dem Tankwagen](./manual_ta3_DE.md#Öl-transport-mit-dem-tankwagen) - - [Öl-Transport mit Fässern über Minecarts](./manual_ta3_DE.md#Öl-transport-mit-fässern-über-minecarts) + - [Öltank / Oil Tank](./manual_ta3_DE.md#öltank--oil-tank) + - [Öl-Transport](./manual_ta3_DE.md#öl-transport) + - [Öl-Transport mit dem Tankwagen](./manual_ta3_DE.md#öl-transport-mit-dem-tankwagen) + - [Öl-Transport mit Fässern über Minecarts](./manual_ta3_DE.md#öl-transport-mit-fässern-über-minecarts) - [Tankwagen / Tank Cart](./manual_ta3_DE.md#tankwagen--tank-cart) - [Kistenwagen / Chest Cart](./manual_ta3_DE.md#kistenwagen--chest-cart) - - [Öl-Verarbeitung](./manual_ta3_DE.md#Öl-verarbeitung) + - [Öl-Verarbeitung](./manual_ta3_DE.md#öl-verarbeitung) - [Destillationsturm / distiller tower](./manual_ta3_DE.md#destillationsturm--distiller-tower) - [Aufkocher / reboiler)](./manual_ta3_DE.md#aufkocher--reboiler)) - [Logik-/Schalt-Blöcke](./manual_ta3_DE.md#logik-schalt-blöcke) @@ -169,6 +169,10 @@ - [TA4 LED Pflanzenlampe / TA4 LED Grow Light](./manual_ta4_DE.md#ta4-led-pflanzenlampe--ta4-led-grow-light) - [TA4 LED Straßenlampe / TA4 LED Street Lamp](./manual_ta4_DE.md#ta4-led-straßenlampe--ta4-led-street-lamp) - [TA4 LED Industrielampe / TA4 LED Industrial Lamp](./manual_ta4_DE.md#ta4-led-industrielampe--ta4-led-industrial-lamp) + - [TA4 Flüssigkeitsfilter](./manual_ta4_DE.md#ta4-flüssigkeitsfilter) + - [Fundament-Ebene](./manual_ta4_DE.md#fundament-ebene) + - [Schotter-Ebene](./manual_ta4_DE.md#schotter-ebene) + - [Einfüll-Ebene](./manual_ta4_DE.md#einfüll-ebene) - [Weitere TA4 Blöcke](./manual_ta4_DE.md#weitere-ta4-blöcke) - [TA4 Tank / TA4 Tank](./manual_ta4_DE.md#ta4-tank--ta4-tank) - [TA4 Pumpe / TA4 Pump](./manual_ta4_DE.md#ta4-pumpe--ta4-pump) diff --git a/manuals/toc_EN.md b/manuals/toc_EN.md index 1c997e3..f5d2dda 100644 --- a/manuals/toc_EN.md +++ b/manuals/toc_EN.md @@ -169,6 +169,10 @@ - [TA4 LED Grow Light](./manual_ta4_EN.md#ta4-led-grow-light) - [TA4 Street Lamp](./manual_ta4_EN.md#ta4-street-lamp) - [TA4 LED Industrial Lamp](./manual_ta4_EN.md#ta4-led-industrial-lamp) + - [TA4 Liquid Filter](./manual_ta4_EN.md#ta4-liquid-filter) + - [Base Layer](./manual_ta4_EN.md#base-layer) + - [Gravel Layer](./manual_ta4_EN.md#gravel-layer) + - [Filling Layer](./manual_ta4_EN.md#filling-layer) - [More TA4 Blocks](./manual_ta4_EN.md#more-ta4-blocks) - [TA4 Tank](./manual_ta4_EN.md#ta4-tank) - [TA4 Pump](./manual_ta4_EN.md#ta4-pump) diff --git a/textures/techage_gaspipe_hole.png b/textures/techage_gaspipe_hole.png new file mode 100644 index 0000000..d5f3ef5 Binary files /dev/null and b/textures/techage_gaspipe_hole.png differ diff --git a/textures/techage_liquid_filter_filler.png b/textures/techage_liquid_filter_filler.png new file mode 100644 index 0000000..1b8fbbe Binary files /dev/null and b/textures/techage_liquid_filter_filler.png differ diff --git a/textures/techage_liquid_filter_filler_bottom.png b/textures/techage_liquid_filter_filler_bottom.png new file mode 100644 index 0000000..0444647 Binary files /dev/null and b/textures/techage_liquid_filter_filler_bottom.png differ diff --git a/textures/techage_ta4_filter.png b/textures/techage_ta4_filter.png new file mode 100644 index 0000000..6099628 Binary files /dev/null and b/textures/techage_ta4_filter.png differ