missing recipes added

TA3 Terminal activated
minor improvements
master
Joachim Stolberg 2019-08-22 20:22:52 +02:00
parent 4d30ba4bef
commit 88691ab4df
5 changed files with 56 additions and 47 deletions

View File

@ -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

View File

@ -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

View File

@ -149,7 +149,7 @@ else
end
-- Logic
--dofile(MP.."/logic/terminal.lua")
dofile(MP.."/logic/terminal.lua")
-- Test
dofile(MP.."/recipe_checker.lua")

View File

@ -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 <num> <cmnd>@n"..
"@n"..
"example: cmd 181 on@n"..
"<num> 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 <button-num> <button-text> <command>@n"..
"Global commands:@n"..
"- cmd <num> <cmnd> [<payload>] = send a command@n"..
"- turn <num> on/off = send a simple turn on/off command@n")
"To program a user button with a command:@n"..
" set <button-num> <button-text> <command>@n"..
"e.g. 'set 1 ON cmd 123 on'@n")
local CMNDS_TA3 = S("Command syntax:@n"..
"- cmd <num> <cmnd> [<payload>] = send a command@n"..
"- turn <num> on/off = send a simple turn on/off command")
local CMNDS_TA3 = S("Syntax error, try help")
local function formspec1()
return "size[6,4]"..

View File

@ -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")