From 406b5ad6a5c926c9a923607f273697130f081c92 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sun, 10 Nov 2019 21:08:37 +0100 Subject: [PATCH] bugfixes, recipes changed, electronic fab menu changed --- basic_machines/electronic_fab.lua | 119 +++++++++------------ basis/recipe_lib.lua | 120 ++++++++++++++++++++++ chemistry/ta4_doser.lua | 89 ++++------------ chemistry/ta4_reactor.lua | 116 +++++++++++++++------ doc/manual_DE.lua | 2 + furnace/recipes.lua | 7 ++ init.lua | 3 +- iron_age/coalburner.lua | 1 + iron_age/recipes.lua | 14 +++ locale/techage.de.tr | 4 +- locale/techage.de.tr.old | 26 ++++- locale/template.txt | 3 +- manuals/manual_ta3_DE.md | 2 + oil/distiller.lua | 2 +- oil/generator.lua | 4 +- textures/techage_reactor_stand_back.png | Bin 428 -> 464 bytes textures/techage_reactor_stand_bottom.png | Bin 772 -> 745 bytes textures/techage_reactor_stand_front.png | Bin 392 -> 857 bytes textures/techage_reactor_stand_side.png | Bin 329 -> 351 bytes tools/trowel.lua | 2 +- wind_turbine/rotor.lua | 7 +- 21 files changed, 340 insertions(+), 181 deletions(-) create mode 100644 basis/recipe_lib.lua diff --git a/basic_machines/electronic_fab.lua b/basic_machines/electronic_fab.lua index 99ea99c..0c08737 100644 --- a/basic_machines/electronic_fab.lua +++ b/basic_machines/electronic_fab.lua @@ -22,74 +22,38 @@ local STANDBY_TICKS = 10 local COUNTDOWN_TICKS = 6 local CYCLE_TIME = 6 +local recipes = techage.recipes -local ValidInput = { - {}, -- 1 - { -- 2 - ["default:glass"] = true, - ["basic_materials:copper_wire"] = true, - ["basic_materials:plastic_sheet"] = true, - ["techage:usmium_nuggets"] = true, - }, - { -- 3 - ["default:mese_crystal"] = true, - ["default:copper_ingot"] = true, - ["default:gold_ingot"] = true, - ["techage:ta4_silicon_wafer"] = true, - }, - {}, -- 4 -} - -local Input = { - {}, -- 1 - {"default:glass", "basic_materials:copper_wire", "basic_materials:plastic_sheet", "techage:usmium_nuggets"}, --2 - {"default:mese_crystal", "default:copper_ingot", "default:gold_ingot", "techage:ta4_silicon_wafer"}, -- 3 - {}, -- 4 -} - -local Output = { - "", -- 1 - "techage:vacuum_tube 2", -- 2 - "techage:ta4_wlanchip 8", -- 3 - "", -- 4 +local RecipeType = { [2] = "ta2_electronic_fab", + [3] = "ta3_electronic_fab", + [4] = "ta4_electronic_fab", } local function formspec(self, pos, mem) - local icon - local crd = CRD(pos) - if crd.stage == 2 then - icon = "techage:vacuum_tube" - elseif crd.stage == 3 then - icon = "techage:ta4_wlanchip" - else - icon = "" - end - return "size[8,8]".. + local rtype = RecipeType[CRD(pos).stage] + return "size[8.4,8.4]".. default.gui_bg.. default.gui_bg_img.. default.gui_slots.. - "list[context;src;0,0;3,3;]".. - "image[3.5,0;1,1;"..techage.get_power_image(pos, mem).."]".. - "image[3.5,1;1,1;techage_form_arrow.png]".. - "image_button[3.5,2;1,1;".. self:get_state_button_image(mem) ..";state_button;]".. - "list[context;dst;5,0;3,3;]".. - "item_image[5,0;1,1;"..icon.."]".. - "list[current_player;main;0,4;8,4;]".. + "list[context;src;0,0;2,4;]".. + recipes.formspec(2.2, 0, rtype, mem).. + "list[context;dst;6.4,0;2,4;]".. + "image_button[3.7,3.3;1,1;".. self:get_state_button_image(mem) ..";state_button;]".. + "tooltip[3.7,3.3;1,1;"..self:get_state_tooltip(mem).."]".. + "list[current_player;main;0.2,4.5;8,4;]".. "listring[context;dst]".. "listring[current_player;main]".. "listring[context;src]".. "listring[current_player;main]".. - default.get_hotbar_bg(0, 4) + default.get_hotbar_bg(0.2, 4.5) 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 - --local meta = minetest.get_meta(pos) - --local inv = meta:get_inventory() local crd = CRD(pos) - if listname == "src" and ValidInput[crd.stage][stack:get_name()] then + if listname == "src" then crd.State:start_if_standby(pos) return stack:get_count() end @@ -111,17 +75,22 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player end local function making(pos, crd, mem, inv) - if inv:room_for_item("dst", ItemStack(Output[crd.stage])) then - for _,name in ipairs(Input[crd.stage]) do - if not inv:contains_item("src", ItemStack(name)) then + local rtype = RecipeType[crd.stage] + local recipe = recipes.get(mem, rtype) + local output = ItemStack(recipe.output.name.." "..recipe.output.num) + if inv:room_for_item("dst", output) then + for _,item in ipairs(recipe.input) do + local input = ItemStack(item.name.." "..item.num) + if not inv:contains_item("src", input) then crd.State:idle(pos, mem) return end end - for _,name in ipairs(Input[crd.stage]) do - inv:remove_item("src", ItemStack(name)) + for _,item in ipairs(recipe.input) do + local input = ItemStack(item.name.." "..item.num) + inv:remove_item("src", input) end - inv:add_item("dst", ItemStack(Output[crd.stage])) + inv:add_item("dst", output) crd.State:keep_running(pos, mem, COUNTDOWN_TICKS) return end @@ -142,8 +111,16 @@ local function on_receive_fields(pos, formname, fields, player) if minetest.is_protected(pos, player:get_player_name()) then return end + local mem = tubelib2.get_mem(pos) - CRD(pos).State:state_button_event(pos, mem, fields) + local crd = CRD(pos) + + if not mem.running then + recipes.on_receive_fields(pos, formname, fields, player) + end + + crd.State:state_button_event(pos, mem, fields) + M(pos):set_string("formspec", formspec(crd.State, pos, mem)) end local function can_dig(pos, player) @@ -238,8 +215,8 @@ local node_name_ta2, node_name_ta3, node_name_ta4 = tubing = tubing, after_place_node = function(pos, placer) local inv = M(pos):get_inventory() - inv:set_size("src", 3*3) - inv:set_size("dst", 3*3) + inv:set_size("src", 8) + inv:set_size("dst", 8) end, can_dig = can_dig, node_timer = keep_running, @@ -300,16 +277,20 @@ if minetest.global_exists("unified_inventory") then width = 2, height = 2, }) - unified_inventory.register_craft({ - output = "techage:vacuum_tube 2", - items = {"default:glass", "basic_materials:copper_wire", "basic_materials:plastic_sheet", "techage:usmium_nuggets"}, - type = "ta2_electronic_fab", - }) - unified_inventory.register_craft({ - output = "techage:ta4_wlanchip 8", - items = {"default:mese_crystal", "default:copper_ingot", "default:gold_ingot", "techage:ta4_silicon_wafer"}, - type = "ta3_electronic_fab", - }) end +recipes.add("ta2_electronic_fab", { + output = "techage:vacuum_tube 2", + input = {"default:glass 1", "basic_materials:copper_wire 1", "basic_materials:plastic_sheet 1", "techage:usmium_nuggets 1"} +}) + +recipes.add("ta3_electronic_fab", { + output = "techage:vacuum_tube 2", + input = {"default:glass 1", "basic_materials:copper_wire 1", "basic_materials:plastic_sheet 1", "techage:usmium_nuggets 1"} +}) + +recipes.add("ta3_electronic_fab", { + output = "techage:ta4_wlanchip 8", + input = {"default:mese_crystal 1", "default:copper_ingot 1", "default:gold_ingot 1", "techage:ta4_silicon_wafer 1"} +}) diff --git a/basis/recipe_lib.lua b/basis/recipe_lib.lua new file mode 100644 index 0000000..7435dad --- /dev/null +++ b/basis/recipe_lib.lua @@ -0,0 +1,120 @@ +--[[ + + TechAge + ======= + + Copyright (C) 2019 Joachim Stolberg + + GPL v3 + See LICENSE.txt for more information + + Recipe lib for formspecs + +]]-- + +local S = techage.S +local M = minetest.get_meta + +local Recipes = {} -- {rtype = {ouput = {....},...}} +local RecipeList = {} -- {rtype = {,...}} + +local range = techage.range + +techage.recipes = {} + +-- Formspec +local function input_string(recipe) + local tbl = {} + for idx, item in ipairs(recipe.input) do + local x = ((idx-1) % 2) + local y = math.floor((idx-1) / 2) + tbl[idx] = techage.item_image(x, y, item.name.." "..item.num) + end + return table.concat(tbl, "") +end + +function techage.recipes.get(mem, rtype) + local recipes = Recipes[rtype] or {} + local recipe_list = RecipeList[rtype] or {} + return recipes[recipe_list[mem.recipe_idx or 1]] +end + +-- Add 4 input/output/waste recipe +-- { +-- output = " ", -- units = 1..n +-- waste = " ", -- units = 1..n +-- input = { -- up to 4 items +-- " ", +-- " ", +-- }, +-- } +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 = {}} + for idx = 1,4 do + local inp = recipe.input[idx] or "" + name, num = unpack(string.split(inp, " ")) + item.input[idx] = {name = name or "", num = tonumber(num) or 0} + end + if recipe.waste then + name, num = unpack(string.split(recipe.waste, " ")) + else + name, num = "", "0" + end + 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 + + if minetest.global_exists("unified_inventory") then + unified_inventory.register_craft({ + output = recipe.output, + items = recipe.input, + type = rtype, + }) + end +end + +function techage.recipes.formspec(x, y, rtype, mem) + local recipes = Recipes[rtype] or {} + local recipe_list = RecipeList[rtype] or {} + mem.recipe_idx = range(mem.recipe_idx or 1, 1, #recipe_list) + local idx = mem.recipe_idx + local recipe = recipes[recipe_list[idx]] + local output = recipe.output.name.." "..recipe.output.num + local waste = recipe.waste.name.." "..recipe.waste.num + 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]".. + 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.."]".. + "container_end[]" +end + +function techage.recipes.on_receive_fields(pos, formname, fields, player) + if minetest.is_protected(pos, player:get_player_name()) then + return + end + local mem = tubelib2.get_mem(pos) + + mem.recipe_idx = mem.recipe_idx or 1 + if not mem.running then + if fields.next == ">>" then + mem.recipe_idx = mem.recipe_idx + 1 + elseif fields.priv == "<<" then + mem.recipe_idx = mem.recipe_idx - 1 + end + end +end diff --git a/chemistry/ta4_doser.lua b/chemistry/ta4_doser.lua index 90a753b..9e6a285 100644 --- a/chemistry/ta4_doser.lua +++ b/chemistry/ta4_doser.lua @@ -17,9 +17,8 @@ local M = minetest.get_meta local N = function(pos) return minetest.get_node(pos).name end local Pipe = techage.BiogasPipe local liquid = techage.liquid +local recipes = techage.recipes -local Recipes = {} -- {ouput = {....},...} -local RecipeList = {} -- {,...} local Liquids = {} -- {hash(pos) = {name = outdir},...} local STANDBY_TICKS = 0 @@ -27,40 +26,15 @@ local COUNTDOWN_TICKS = 6 local CYCLE_TIME = 2 local POWER_NEED = 10 -local range = techage.range - --- Formspec -local function input_string(recipe) - local tbl = {} - for idx, item in ipairs(recipe.input) do - local x = ((idx-1) % 2) + 1 - local y = math.floor((idx-1) / 2) - tbl[idx] = techage.item_image(x, y, item.name.." "..item.num) - end - return table.concat(tbl, "") -end - local function formspec(self, pos, mem) - mem.recipe_idx = range(mem.recipe_idx or 1, 1, #RecipeList) - local idx = mem.recipe_idx - local recipe = Recipes[RecipeList[idx]] - local output = recipe.output.name.." "..recipe.output.num - local waste = recipe.waste.name.." "..recipe.waste.num - return "size[8,7.2]".. + return "size[8,7]".. default.gui_bg.. default.gui_bg_img.. default.gui_slots.. - input_string(recipe).. - "image[3,0.5;1,1;techage_form_arrow.png]".. - techage.item_image(4, 0, output).. - techage.item_image(4, 1, waste).. - "image_button[6.5,0.5;1,1;".. self:get_state_button_image(mem) ..";state_button;]".. - "tooltip[6.5,0.5;1,1;"..self:get_state_tooltip(mem).."]".. - "button[1,2.2;1,1;priv;<<]".. - "button[2,2.2;1,1;next;>>]".. - "label[3,2.5;"..S("Recipe")..": "..idx.."/"..#RecipeList.."]".. - - "list[current_player;main;0,3.5;8,4;]" .. + recipes.formspec(0, 0, "ta4_doser", mem).. + "image_button[6,1;1,1;".. self:get_state_button_image(mem) ..";state_button;]".. + "tooltip[6,1;1,1;"..self:get_state_tooltip(mem).."]".. + "list[current_player;main;0,3.3;8,4;]" .. default.get_hotbar_bg(0, 3.5) end @@ -140,7 +114,7 @@ local function dosing(pos, mem, elapsed) end -- available liquids local liquids = get_liquids(pos) - local recipe = Recipes[RecipeList[mem.recipe_idx or 1]] + local recipe = recipes.get(mem, "ta4_doser") if not liquids or not recipe then return end -- inputs for _,item in pairs(recipe.input) do @@ -184,19 +158,13 @@ local function on_receive_fields(pos, formname, fields, player) if minetest.is_protected(pos, player:get_player_name()) then return end - local mem = tubelib2.get_mem(pos) - mem.recipe_idx = mem.recipe_idx or 1 + local mem = tubelib2.get_mem(pos) if not mem.running then - if fields.next == ">>" then - mem.recipe_idx = range(mem.recipe_idx + 1, 1, #RecipeList) - M(pos):set_string("formspec", formspec(State, pos, mem)) - elseif fields.priv == "<<" then - mem.recipe_idx = range(mem.recipe_idx - 1, 1, #RecipeList) - M(pos):set_string("formspec", formspec(State, pos, mem)) - end + recipes.on_receive_fields(pos, formname, fields, player) end State:state_button_event(pos, mem, fields) + M(pos):set_string("formspec", formspec(State, pos, mem)) end @@ -270,37 +238,16 @@ techage.power.register_node({"techage:ta4_doser", "techage:ta4_doser_on"}, { end, }) --- Doser Recipe --- { --- output = " ", -- units = 1..n --- waste = " ", --- input = { -- up to 4 --- " ", --- " ", --- }, --- } --- -function techage.add_doser_recipe(recipe) - local name, num - local item = {input = {}} - for idx = 1,4 do - local inp = recipe.input[idx] or "" - name, num = unpack(string.split(inp, " ")) - item.input[idx] = {name = name or "", num = tonumber(num) or 0} - end - if recipe.waste then - name, num = unpack(string.split(recipe.waste, " ")) - else - name, num = "", "0" - end - 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[name] = item - RecipeList[#RecipeList+1] = name +if minetest.global_exists("unified_inventory") then + unified_inventory.register_craft_type("ta4_doser", { + description = S("TA4 Doser"), + icon = 'techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_pump.png^techage_appl_hole_pipe.png', + width = 2, + height = 2, + }) end -techage.add_doser_recipe({ +recipes.add("ta4_doser", { output = "techage:ta4_epoxy 3", input = { "techage:oil_source 2", diff --git a/chemistry/ta4_reactor.lua b/chemistry/ta4_reactor.lua index 4c15f2c..4dc1675 100644 --- a/chemistry/ta4_reactor.lua +++ b/chemistry/ta4_reactor.lua @@ -13,9 +13,11 @@ ]]-- local S = techage.S -local Pipe = techage.BiogasPipe local Cable = techage.ElectricCable local power = techage.power +local Pipe = techage.LiquidPipe +local networks = techage.networks +local liquid = techage.liquid -- pos of the reactor stand local function on_power(pos, mem) @@ -52,12 +54,12 @@ minetest.register_node("techage:ta4_reactor_stand", { description = S("TA4 Reactor"), tiles = { -- up, down, right, left, back, front - "techage_reactor_stand_top.png", - "techage_reactor_stand_bottom.png^[transformFY", + "techage_reactor_stand_top.png^[transformR90", + "techage_reactor_stand_bottom.png^[transformFY^[transformR270", + "techage_reactor_stand_front.png", + "techage_reactor_stand_back.png", "techage_reactor_stand_side.png^[transformFX", "techage_reactor_stand_side.png", - "techage_reactor_stand_back.png", - "techage_reactor_stand_front.png", }, drawtype = "nodebox", node_box = { @@ -70,11 +72,15 @@ minetest.register_node("techage:ta4_reactor_stand", { { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, - {-1/8, -1/8, -4/8, 1/8, 1/8, 4/8}, - {-1/8, 0/8, -1/8, 1/8, 4/8, 1/8}, - {-3/8, -1/8, -4/8, 3/8, 1/8, -3/8}, - {-3/8, -1/8, 3/8, 3/8, 1/8, 4/8}, - }, + {-1/8, -4/8, -1/8, 1/8, 4/8, 1/8}, + + {-4/8, -1/8, -1/8, 4/8, 1/8, 1/8}, +-- {-3/8, -1/8, -4/8, 3/8, 1/8, -3/8}, + {-4/8, -1/8, -3/8, -3/8, 1/8, 3/8}, + +-- {-3/8, -1/8, 3/8, 3/8, 1/8, 4/8}, + { 3/8, -1/8, -3/8, 4/8, 1/8, 3/8}, +}, }, selection_box = { type = "fixed", @@ -86,17 +92,18 @@ minetest.register_node("techage:ta4_reactor_stand", { groups = {cracky=2}, is_ground_content = false, sounds = default.node_sound_metal_defaults(), -}) --- for mechanical pipe connections -techage.power.register_node({"techage:ta4_reactor_stand"}, { - conn_sides = {"F"}, - power_network = Pipe, + networks = { + pipe = { + sides = {R=1}, -- Pipe connection sides + ntype = "pump", + }, + }, }) -- for electrical connections techage.power.register_node({"techage:ta4_reactor_stand"}, { - conn_sides = {"B"}, + conn_sides = {"L"}, power_network = Cable, }) @@ -121,19 +128,6 @@ minetest.register_node("techage:ta4_reactor_fillerpipe", { type = "fixed", fixed = {-2/8, 0/8, -2/8, 2/8, 4/8, 2/8}, }, - paramtype = "light", - sunlight_propagates = true, - paramtype2 = "facedir", - on_rotate = screwdriver.disallow, - groups = {cracky=2}, - is_ground_content = false, - sounds = default.node_sound_metal_defaults(), -}) - --- for mechanical pipe connections -techage.power.register_node({"techage:ta4_reactor_fillerpipe"}, { - conn_sides = {"U"}, - power_network = Pipe, after_place_node = function(pos) local pos1 = {x = pos.x, y = pos.y-1, z = pos.z} print(minetest.get_node(pos1).name) @@ -141,8 +135,30 @@ techage.power.register_node({"techage:ta4_reactor_fillerpipe"}, { local node = minetest.get_node(pos) minetest.remove_node(pos) minetest.set_node(pos1, node) + Pipe:after_place_node(pos1) end 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", + sunlight_propagates = true, + paramtype2 = "facedir", + on_rotate = screwdriver.disallow, + groups = {cracky=2}, + is_ground_content = false, + sounds = default.node_sound_metal_defaults(), + + networks = { + pipe = { + sides = {U=1}, -- Pipe connection sides + ntype = "tank", + }, + }, }) -- controlled by the doser @@ -170,3 +186,45 @@ techage.register_node({"techage:ta4_reactor_fillerpipe"}, { end end, }) + +minetest.register_node("techage:ta4_reactor_base", { + description = S("TA4 Reactor Base"), + tiles = { + -- up, down, right, left, back, front + "techage_concrete.png^techage_appl_arrowXL.png^techage_appl_hole_pipe.png^[transformR270", + "techage_concrete.png", + "techage_concrete.png^techage_appl_hole_pipe.png", + "techage_concrete.png", + "techage_concrete.png", + "techage_concrete.png", + }, + + after_place_node = function(pos, placer) + 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, + + paramtype2 = "facedir", + on_rotate = screwdriver.disallow, + groups = {cracky=2}, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + + networks = { + pipe = { + sides = {R=1}, -- Pipe connection sides + ntype = "pump", + }, + }, +}) + +Pipe:add_secondary_node_names({ + "techage:ta4_reactor_base", + "techage:ta4_reactor_fillerpipe", + "techage:ta4_reactor_stand", +}) diff --git a/doc/manual_DE.lua b/doc/manual_DE.lua index 8e4b575..705b1c2 100644 --- a/doc/manual_DE.lua +++ b/doc/manual_DE.lua @@ -638,6 +638,8 @@ techage.manual_DE.aText = { "Es müssen alle Öffnungen am Turm mit Tanks verbunden werden.\n".. "Der Aufkocher (reboiler) muss mit dem Block \"Destillationsturm 1\" verbunden werden.\n".. "\n".. + "Der Aufkocher benötigt Strom (nicht im Plan zu sehen)!\n".. + "\n".. "\n".. "\n", "Der Aufkocher erhitzt das Erdöl auf ca. 400°C. Dabei verdampft es weitgehend und wird in den Destillationsturm zur Abkühlung geleitet.\n".. diff --git a/furnace/recipes.lua b/furnace/recipes.lua index 8a42707..76ec06f 100644 --- a/furnace/recipes.lua +++ b/furnace/recipes.lua @@ -19,6 +19,13 @@ techage.furnace.register_recipe({ time = 2, }) +techage.furnace.register_recipe({ + output = "default:obsidian", + recipe = {"default:cobble"}, + time = 8, +}) + + if techage.modified_recipes_enabled then techage.furnace.register_recipe({ output = "default:bronze_ingot 4", diff --git a/init.lua b/init.lua index c460195..0276536 100644 --- a/init.lua +++ b/init.lua @@ -49,6 +49,7 @@ else dofile(MP.."/basis/mark2.lua") dofile(MP.."/basis/assemble.lua") dofile(MP.."/basis/networks.lua") + dofile(MP.."/basis/recipe_lib.lua") -- Main doc dofile(MP.."/doc/manual_DE.lua") @@ -194,7 +195,7 @@ else -- Test dofile(MP.."/recipe_checker.lua") - dofile(MP.."/.test/sink.lua") + --dofile(MP.."/.test/sink.lua") dofile(MP.."/.test/source.lua") --dofile(MP.."/.test/akku.lua") --dofile(MP.."/.test/switch.lua") diff --git a/iron_age/coalburner.lua b/iron_age/coalburner.lua index 84af0f0..f7fbd45 100644 --- a/iron_age/coalburner.lua +++ b/iron_age/coalburner.lua @@ -165,6 +165,7 @@ minetest.register_node("techage:ash", { description = S("Ash"), tiles = {"techage_ash.png"}, drawtype = "nodebox", + paramtype = "light", node_box = { type = "fixed", fixed = { diff --git a/iron_age/recipes.lua b/iron_age/recipes.lua index 2087e93..d4a1296 100644 --- a/iron_age/recipes.lua +++ b/iron_age/recipes.lua @@ -47,6 +47,20 @@ if techage.modified_recipes_enabled then minetest.clear_craft({output = "fire:flint_and_steel"}) minetest.clear_craft({output = "bucket:bucket_empty"}) + -- add again + minetest.register_craft({ + output = 'default:steel_ingot 9', + recipe = { + {'default:steelblock'}, + } + }) + minetest.register_craft({ + output = 'default:bronze_ingot 9', + recipe = { + {'default:bronzeblock'}, + } + }) + techage.ironage_register_recipe({ output = "default:bronze_ingot 4", recipe = {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot", "default:tin_ingot"}, diff --git a/locale/techage.de.tr b/locale/techage.de.tr index 2aaf84e..7cd6d74 100644 --- a/locale/techage.de.tr +++ b/locale/techage.de.tr @@ -56,6 +56,7 @@ Meridium Axe=Meridium Axt Meridium Pickaxe=Meridium Pickel Meridium Shovel=Meridium Schaufel Meridium Sword=Meridium Schwert +More water expected (2 m deep)!= Network Data=Netzwerkdaten No plan available=Kein Plan verfügar No wind at this altitude!=Kein Wind auf dieser Höhe @@ -213,6 +214,7 @@ TA4 Pipe Inlet=TA4 Rohrzulauf TA4 Protected Chest=TA4 Gesicherte Kiste TA4 Pump=TA4 Pumpe TA4 Reactor=Reaktor +TA4 Reactor Base= TA4 Reactor Filler Pipe=TA4 Reaktor Einfüllstutzen TA4 Rotor Blade=TA4 Rotorblatt TA4 Silicon Wafer=TA4 Silizium-Wafer @@ -249,7 +251,6 @@ Usmium Nuggets=Usmium Nuggets WLAN Chip=WLAN Chip Water=Wasser Water Barrel=Wasserfass -Wrong place for wind turbines!=Falscher Ort für Windkraftanlagen [TA4 Wind Turbine]=[TA4 Windkraftanlage] [TA] Area is protected!=[TA] Bereich ist geschützt [TA] Derrick is being built!=[TA] Bohrturm wird errichtet @@ -279,3 +280,4 @@ reactor has no power=Reaktor hat keinen Strom removed=entfernt stopped=gestoppt ##### not used anymore ##### +Wrong place for wind turbines!=Falscher Ort für Windkraftanlagen \ No newline at end of file diff --git a/locale/techage.de.tr.old b/locale/techage.de.tr.old index 6cf7fbe..2aaf84e 100644 --- a/locale/techage.de.tr.old +++ b/locale/techage.de.tr.old @@ -100,7 +100,6 @@ TA Industrial Lamp 2=TA Industrielampe 2 TA Industrial Lamp 3=TA Industrielampe 3 TA Junction Pipe=TA Leitungskupplung TA Lamp=TA Lampe -TA Oil=TA Öl TA Pipe=TA Leitung (Flüssigkeiten) TA Power Line=TA Stromleitung TA Power Pole=TA Strommast @@ -136,27 +135,48 @@ TA2 Protected Chest=TA2 Gesicherte Kiste TA2 Steam Pipe=TA2 Dampfleitung TA3 Akku=TA3 Akku TA3 Akku Box=TA3 Akku Block +TA3 Bitumen=TA3 Bitumen +TA3 Bitumen Barrel=TA3 Bitumenfass +TA3 Bitumen Canister=TA3 Bitumenkanister TA3 Boiler Base=TA3 Boiler unten TA3 Boiler Top=TA3 Boiler oben TA3 Booster=TA3 Gebläse TA3 Button/Switch=TA3 Taster/Schalter +TA3 Canister=TA3 Kanister TA3 Cart Detector=TA3 Wagen Detektor TA3 Coal Power Station Firebox=TA3 Kohlekraftwerks-Feuerbox TA3 Coal/oil=TA3 Kohle/Öl TA3 Cooler=TA3 Kühler TA3 Derrick=TA3 Bohrturm TA3 Detector=TA3 Detektor +TA3 Distillation Tower 1=TA3 Destillationsturm 1 +TA3 Distillation Tower 2=TA3 Destillationsturm 2 +TA3 Distillation Tower 3=TA3 Destillationsturm 3 +TA3 Distillation Tower 4=TA3 Destillationsturm 4 +TA3 Distillation Tower Base=TA3 Destillationsturm Basis TA3 Drill Bit=TA3 Bohrgestänge TA3 Ele Fab=TA3 E-Fabrik +TA3 Fuel Oil=TA3 Schweröl +TA3 Fuel Oil Barrel=TA3 Schwerölfass +TA3 Fuel Oil Canister=TA3 Schwerölkanister TA3 Funnel=TA3 Trichter TA3 Furnace Oil Burner=TA3 Ofen-Ölbrenner +TA3 Gas=TA3 Gas +TA3 Gasoline=TA3 Benzin +TA3 Gasoline Barrel=TA3 Benzinfass +TA3 Gasoline Canister=TA3 Benzinkanister TA3 Generator=TA3 Generator TA3 Gravel Sieve=TA3 Kiessieb TA3 Logic Block=TA3 Logikblock TA3 Melting=TA3 Schmelzen +TA3 Naphtha=TA3 Naphtha +TA3 Naphtha Barrel=TA3 Naphtha-Fass +TA3 Naphtha Canister=TA3 Naphtha-Kanister TA3 Node Detector=TA3 Block Detektor TA3 Oil Barrel=TA3 Ölfass +TA3 Oil Canister=TA3 Erdölkanister TA3 Oil Explorer=TA3 Ölexplorer +TA3 Oil Reboiler=TA3 Aufkocher TA3 Oil Storage=TA3 Öl Speicher TA3 Player Detector=TA3 Spieler Detektor TA3 Power Station Firebox=TA3 Kraftwerks-Feuerbox @@ -174,7 +194,6 @@ TA3 Turbine=TA3 Turbine TA3 Vacuum Tube=TA3 Vakuumröhre TA4 Carbon Fiber=TA4 Kohlefaser TA4 Derrick=TA4 Bohrturm -TA4 Distillation Tower=TA4 Destillationsturm TA4 Doser=TA4 Dosierer TA4 Electrolyzer=TA4 Elektrolyseur TA4 Energy Storage=TA4 Energiespeicher @@ -187,7 +206,6 @@ TA4 Heat Exchanger 1=TA4 Wärmetauscher 1 TA4 Heat Exchanger 2=TA4 Wärmetauscher 2 TA4 Heat Exchanger 3=TA4 Wärmetauscher 3 TA4 Hydrogen=TA4 Wasserstoff -TA4 Junction Pipe=TA4 Verbindungsrohr TA4 Low Power Box==TA4 Niederspannungsverteilerbox TA4 Low Power Cable=TA4 Niederspannungskabel TA4 Pillar=TA4 Säule @@ -260,4 +278,4 @@ reactor defect=Reaktor defekt reactor has no power=Reaktor hat keinen Strom removed=entfernt stopped=gestoppt -##### not used anymore ##### \ No newline at end of file +##### not used anymore ##### diff --git a/locale/template.txt b/locale/template.txt index 185666c..6fad7ef 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -54,6 +54,7 @@ Meridium Axe= Meridium Pickaxe= Meridium Shovel= Meridium Sword= +More water expected (2 m deep)!= Network Data= No plan available= No wind at this altitude!= @@ -211,6 +212,7 @@ TA4 Pipe Inlet= TA4 Protected Chest= TA4 Pump= TA4 Reactor= +TA4 Reactor Base= TA4 Reactor Filler Pipe= TA4 Rotor Blade= TA4 Silicon Wafer= @@ -247,7 +249,6 @@ Usmium Nuggets= WLAN Chip= Water= Water Barrel= -Wrong place for wind turbines!= [TA4 Wind Turbine]= [TA] Area is protected!= [TA] Derrick is being built!= diff --git a/manuals/manual_ta3_DE.md b/manuals/manual_ta3_DE.md index b6218f1..42e0bf9 100644 --- a/manuals/manual_ta3_DE.md +++ b/manuals/manual_ta3_DE.md @@ -350,6 +350,8 @@ An den Öffnungen von unten nach oben werden Schweröl, Naphtha und Benzin abgel Es müssen alle Öffnungen am Turm mit Tanks verbunden werden. Der Aufkocher (reboiler) muss mit dem Block "Destillationsturm 1" verbunden werden. +Der Aufkocher benötigt Strom (nicht im Plan zu sehen)! + [ta3_distiller|plan] diff --git a/oil/distiller.lua b/oil/distiller.lua index ab18f99..2ea679a 100644 --- a/oil/distiller.lua +++ b/oil/distiller.lua @@ -82,7 +82,7 @@ minetest.register_node("techage:ta3_distiller_base", { on_rotate = screwdriver.disallow, groups = {cracky=2}, is_ground_content = false, - sounds = default.node_sound_metal_defaults(), + sounds = default.node_sound_stone_defaults(), networks = { pipe = { diff --git a/oil/generator.lua b/oil/generator.lua index 0c5cd09..90b8232 100644 --- a/oil/generator.lua +++ b/oil/generator.lua @@ -237,8 +237,8 @@ minetest.register_node("techage:tiny_generator_on", { on_rotate = screwdriver.disallow, is_ground_content = false, - allow_metadata_inventory_put = allow_metadata_inventory_put, - allow_metadata_inventory_take = allow_metadata_inventory_take, + allow_metadata_inventory_put = fuel.allow_metadata_inventory_put, + allow_metadata_inventory_take = fuel.allow_metadata_inventory_take, on_metadata_inventory_put = on_metadata_inventory_put, on_receive_fields = on_receive_fields, on_rightclick = on_rightclick, diff --git a/textures/techage_reactor_stand_back.png b/textures/techage_reactor_stand_back.png index 0fbefdc4e812cf38bd16a5a39b3c4f64491d8dd6..297ada608d4fb42fd084b5d5dfe94704b39eca3f 100644 GIT binary patch delta 346 zcmV-g0j2(|1JDDIe}6DgOjJcoX>s<|R3v@618J}VR*?fqc;~}J4r7|$xIOO9Q7Uz! z)YHeHpO#LR$IX8%D{(7cQ&f)t0004WQchC$?p$@_@5Qg^( zH4E5QEJ3b{Hf#4;02!F2Ec5H-8lcrzp|Nr)y z36)`)uABH>lvz;{*iQ-INd&;UW9$f^Wd{NdB`Sbr=-4F5(&S?gV^WHXDf0oS#Vd^d0q}e2UTl&|I$pi^b*8{YVjG!oo^YG8N!+E$r^AO{CsD8+Kp8my-fK8H? s^&a-WDPze)#E<&9N6U8O*o8@^ABDGLlj6NXv;Y7A07*qoM6N<$f-n50cmMzZ delta 310 zcmV-60m=T*1FQp(e}5`aOjJcoX>lZdx&vvj0#=a&NqFaUt4Rb~e{bqoP zl^LWbEQ;56OD_=0dlZQsP*&XBT)7Kg!z%K7mIq_&Z0}B9dk}bSyjrn4Un`A3&@TxTmdrq)E2lA~#G);eB zMK0ENw5*(ni`FVGCbx?zB8Mju&G1cPWZlNb;N1nNiC7APD?U zno6FjBi!4iowO{=aR``vR@&vgwg-PI#j?RF2ZRWW$#N?6vcbJaK-H~|;w;OXZ)|y5 zeMi7DcxdA3K;^_@8SanZTFDeYeC!c>KFA1bjOEem?<79Cd^4^JI{UXG{JNm3fZjfE zsB)DI=5X(AsO!mK!~W|tb(KvK4X@q|Z^egrF7p<~v0fGM-cp|HX1h+*26unL-{~Jb z3r~e_hgtKh9UVCdbweMx<|O4OBq7y`pJFNzxyXf`xRz;#JhcFw;$;dNyt##%~tryWMavQ{av7B`FqiCzh-Q(fnAJ&U0 UgNS{xiU0rr07*qoM6N<$g3O9EQvd(} delta 662 zcmV;H0%`r}1%w8WQV9wY6(cBpRr)!RTP%NQNklcvPD2^i~ zPj{Yca(MVsD0yXB;eW`bsPvkxu?2rR#o~o^25=sjf^wPb#S4#yK$f>Aip#R_KQtQJNr16XZqHucI_UdHg#q3zYR+ z;{Lp7&LId~RK*@uu?GNTsc)6SeJQpnAaQVZ+T8aLr3q}$I2*hk?}nl!bKigCLNUaE z88LmXY2~AqFqc#J0~p0X*d6RaD7%cx?IH$5+1j}@y8yLztTE{@VA9mADDH3gxp z5{`94Z7G(ykb=+_fZ94BRziQOlzKq~VO})-C1jP5J4dJkgLX_`zo#e0@D)4vyy5La~kEe<=otU>81`GuR*icUvh&2Thm*r)?@RdY@h1jW0`6NMD00000NkvXXu0jG}f_=R|{Qv*} diff --git a/textures/techage_reactor_stand_front.png b/textures/techage_reactor_stand_front.png index aa2c8eaa5a9d40e7f3d8632275b4072fc2f5088f..81e9b76f14a909d9fdb555699632c72db2d6e539 100644 GIT binary patch delta 806 zcmV+>1KIqD1K9?U7()mK0001UdV2H#000JJOGiWi{{a60|De66lK=n!32;bRa{vGf z6951U69E94oEQKA00(qQO+^Re3knkiBI^Zw1%ZrVT){&u|> zg9!;JNl~PzMB-K{M=n*QR+XwgP9LB-wU<6cpQDkg9CFLOw^WUKKs5ZMG=&hG_4Huu z*sz#ghq)l{YG%Iq=4S`iIz6MG{RsfzXt#{3k8c?=qkYryGQrkR)DvJJLQk*R-JE8(Vd9S5BPaCv=; zXhS5~d*;9Ar>td&wMFQwqe ze`T0tmqr+~?ImNq4_`8!?R{#mxcNRWv^UEPEK>sVjeL8A`Bx2LKrmy5qOoIsL)fBFnXFJg{MTH)E!&( zB@j{CQec}lf4X^8Rl6?z+JguH=<8<|4f8vN!r%8N)Og;A z_krQagIf}?tpL5wAf>MyO2;qAs0}y04=CHv8tK9GxnP3;4zIbgCC^+!I42-S)J z5kUxsyTL7p2u{h?Z_DHyFiFE!nPZb;Y^~^oQC?p?{-LSVcK`qnQ!gKYJWJ_rSls~t z{2Ts>&+aBcJ^*>TAc{KrO@hjm0_`FkPE+4W26ETHy5%yf2>Zin3_`aClEDho6cimh kc37$JpxJ5|*Fe(We+gy$Vo7)Ob!1@J*w6hZkrl{iEDmyaVpw-h=H`f z1cuCsO&Jq}?y!gi@USw8D==J4&^>r;vhUr~r@fncdwsE^ g-1bDN7;I%=m>pvOyK{M^H_#Idp00i_>zopr0HGaomH+?% diff --git a/textures/techage_reactor_stand_side.png b/textures/techage_reactor_stand_side.png index 447a4ba16280a39ea404c9ff5c5db0b804234007..a32f12a2dc1ab3d24088ae2e18fb212e88ed38e3 100644 GIT binary patch delta 221 zcmV<303!d%0^b6VihtXsab^GlMIk{k5Dnx(1q6i%2qa<(D57amR1`uNKv#jV*25SHw18B& zAORC>0+?DtfgnvOO$mt7z*@?I0*ZnVU; X{oF_?^(r6=00000NkvXXu0mjfBH>J= delta 199 zcmV;&0672O0?7i9ihm@1x&vvj=)*Y1Hevt*M-f3W5Dnx(1q4M12qa<(IHGBBbQD1sKv#jV)0+?DtfgsH#%>{_kz*@?I0*- 1 then if player_name then + techage.mark_region(player_name, pos1, pos2, "") minetest.chat_send_player(player_name, S("[TA4 Wind Turbine]").. " "..S("The wind turbines are too close together!")) end @@ -71,8 +72,9 @@ local function add_rotor(pos, mem, player_name) local num = #minetest.find_nodes_in_area(pos1, pos2, {"default:water_source", "default:water_flowing", "ignore"}) if num < (41*41*2-MAX_NUM_FOREIGN_NODES) then if player_name then + techage.mark_region(player_name, pos1, pos2, "") minetest.chat_send_player(player_name, S("[TA4 Wind Turbine]").. - " "..S("Wrong place for wind turbines!")) + " "..S("More water expected (2 m deep)!")) end M(pos):set_string("infotext", S("TA4 Wind Turbine").." "..S("Error")) mem.error = true @@ -81,6 +83,9 @@ local function add_rotor(pos, mem, player_name) if pos.y < 12 or pos.y > 20 then if player_name then + pos1 = {x=pos.x-13, y=12, z=pos.z-13} + pos2 = {x=pos.x+13, y=20, z=pos.z+13} + techage.mark_region(player_name, pos1, pos2, "") minetest.chat_send_player(player_name, S("[TA4 Wind Turbine]").. " "..S("No wind at this altitude!")) end