diff --git a/basic_machines/gravelsieve.lua b/basic_machines/gravelsieve.lua index e74f0a1..be2ddcb 100644 --- a/basic_machines/gravelsieve.lua +++ b/basic_machines/gravelsieve.lua @@ -254,3 +254,27 @@ techage.register_entry_page("ta3m", "gravelsieve", "It needs 4 units electrical power."), "techage:ta3_gravelsieve_pas") +if minetest.global_exists("unified_inventory") then + unified_inventory.register_craft_type("ta2_gravelsieve", { + description = S("TA2 Gravel Sieve"), + icon = 'techage_sieve_sieve_ta1.png', + width = 1, + height = 1, + }) + unified_inventory.register_craft_type("ta3_gravelsieve", { + description = S("TA3 Gravel Sieve"), + icon = 'techage_filling_ta3.png^techage_appl_sieve.png^techage_frame_ta3.png', + width = 1, + height = 1, + }) + unified_inventory.register_craft({ + output = "techage:sieved_basalt_gravel", + items = {"techage:basalt_gravel"}, + type = "ta2_gravelsieve", + }) + unified_inventory.register_craft({ + output = "techage:sieved_basalt_gravel", + items = {"techage:basalt_gravel"}, + type = "ta3_gravelsieve", + }) +end diff --git a/furnace/cooking.lua b/furnace/cooking.lua index 486b5a9..58589f3 100644 --- a/furnace/cooking.lua +++ b/furnace/cooking.lua @@ -119,7 +119,11 @@ function techage.furnace.smelting(pos, mem, elapsed) elapsed = elapsed - recipe.time end mem.leftover = elapsed - mem.item_percent = math.min(math.floor((mem.leftover * 100.0) / recipe.time), 100) + if recipe.time >= 10 then + mem.item_percent = math.min(math.floor((mem.leftover * 100.0) / recipe.time), 100) + else + mem.item_percent = 100 + end return state end return techage.STANDBY diff --git a/init.lua b/init.lua index a03ca64..24e5d85 100644 --- a/init.lua +++ b/init.lua @@ -149,7 +149,7 @@ else end -- Logic - --dofile(MP.."/logic/terminal.lua") + dofile(MP.."/logic/terminal.lua") -- Test dofile(MP.."/recipe_checker.lua") diff --git a/logic/terminal.lua b/logic/terminal.lua index f7ea4da..7cb7a2a 100644 --- a/logic/terminal.lua +++ b/logic/terminal.lua @@ -20,21 +20,25 @@ local HELP_TA3 = S("#### TA3 Terminal ####@n".. "and output text messages from your@n".. "machines to the Terminal.@n".. "@n".. -"Commands can have up to 80 characters.@n".. +"Command syntax:@n".. +" cmd @n".. +"@n".. +"example: cmd 181 on@n".. +" is the number of the node to which the command is sent@n".. +"'on' is the command to turn machines/nodes on@n".. +"Further commands can be retrieved by clicking on@n".. +"machines/nodes with the Techage Info Tool.@n".. +"@n".. "Local commands:@n".. "- clear = clear screen@n".. "- help = this message@n".. "- pub = switch to public use@n".. "- priv = switch to private use@n".. -"To program a button with a command:@n".. -"- set @n".. -"Global commands:@n".. -"- cmd [] = send a command@n".. -"- turn on/off = send a simple turn on/off command@n") +"To program a user button with a command:@n".. +" set @n".. +"e.g. 'set 1 ON cmd 123 on'@n") -local CMNDS_TA3 = S("Command syntax:@n".. -"- cmd [] = send a command@n".. -"- turn on/off = send a simple turn on/off command") +local CMNDS_TA3 = S("Syntax error, try help") local function formspec1() return "size[6,4]".. diff --git a/tools/repairkit.lua b/tools/repairkit.lua index 1b4f7e4..452ff19 100644 --- a/tools/repairkit.lua +++ b/tools/repairkit.lua @@ -15,34 +15,12 @@ local M = minetest.get_meta local S = techage.S ---local function destroy_node(itemstack, placer, pointed_thing) --- if pointed_thing.type == "node" then --- local pos = pointed_thing.under --- if not minetest.is_protected(pos, placer:get_player_name()) then --- local mem = tubelib2.get_mem(pos) --- mem.techage_aging = 999999 --- end --- end ---end - ---local function repair_node(itemstack, user, pointed_thing) --- local pos = pointed_thing.under --- if pos then --- if techage.repair_node(pos) then --- minetest.chat_send_player(user:get_player_name(), "[TechAge] Node repaired") --- itemstack:add_wear(13108) --- return itemstack --- end --- end --- return ---end - local function read_state(itemstack, user, pointed_thing) local pos = pointed_thing.under if pos and user then local data = minetest.get_biome_data(pos) if data then - minetest.chat_send_player(user:get_player_name(), "Temp: "..math.floor(data.heat).." ") + minetest.chat_send_player(user:get_player_name(), S("Position temperature")..": "..math.floor(data.heat).." ") end local number = techage.get_node_number(pos) local ndef = minetest.registered_nodes[minetest.get_node(pos).name] @@ -101,7 +79,7 @@ minetest.register_tool("techage:repairkit", { minetest.register_tool("techage:end_wrench", { - description = S("TechAge End Wrench (use = read status, place = cmd: on/off)"), + description = S("TechAge Info Tool (use = read status info)"), inventory_image = "techage_end_wrench.png", wield_image = "techage_end_wrench.png", groups = {cracky=1, book=1}, @@ -111,14 +89,14 @@ minetest.register_tool("techage:end_wrench", { stack_max = 1, }) -minetest.register_craft({ - output = "techage:repairkit", - recipe = { - {"", "basic_materials:gear_steel", ""}, - {"", "techage:end_wrench", ""}, - {"", "basic_materials:oil_extract", ""}, - }, -}) +--minetest.register_craft({ +-- output = "techage:repairkit", +-- recipe = { +-- {"", "basic_materials:gear_steel", ""}, +-- {"", "techage:end_wrench", ""}, +-- {"", "basic_materials:oil_extract", ""}, +-- }, +--}) minetest.register_craft({ output = "techage:end_wrench", @@ -130,9 +108,8 @@ minetest.register_craft({ }) techage.register_entry_page("ta", "end_wrench", - S("TechAge End Wrench"), - S("The End Wrench is a tool to read any kind od status information from a node with command inderface.@n".. - "- use (left mouse button) = read status@n".. - "- place (right mouse button) = send command: on/off"), + S("TechAge Info Tool"), + S("The TechAge Info Tool is a tool to read any kind of status information from nodes providing a command interface.@n".. + "Click on the node to read the status"), "techage:end_wrench")