Fix ceramic recipe and TA5 generator bugs

This commit is contained in:
Joachim Stolberg 2022-01-23 15:51:20 +01:00
parent 5195bf23f4
commit ce970279bf
6 changed files with 38 additions and 5 deletions

View File

@ -26,7 +26,7 @@ In contrast to TechPack, the resources are more limited and it is much more diff
### License
Copyright (C) 2019-2021 Joachim Stolberg
Copyright (C) 2019-2022 Joachim Stolberg
Code: Licensed under the GNU AGPL version 3 or later. See LICENSE.txt
Textures: CC BY-SA 3.0
@ -80,6 +80,9 @@ Available worlds will be converted to 'lsqlite3', but there is no way back, so:
### History
**2022-01-22 V1.07**
- TA5 fusion reactor added
**2022-01-03 V1.06**
- TA5 teleport blocks added
- Many improvements

View File

@ -91,7 +91,7 @@ sched.register(tSched, CALL_RATE1, 3, function(pos, outdir)
sched.register(tSched, CALL_RATE2, 4, function(pos, outdir)
local resp = control.request(pos, Cable, outdir, "con", "inc_power")
local cnt = count_trues(resp)
print("inc_power", cnt)
--print("inc_power", cnt)
if cnt < 52 then
return S("Cooling failed")
end

View File

@ -17,6 +17,7 @@ local S = techage.S
local Cable = techage.ElectricCable
local power = networks.power
local control = networks.control
local CYCLE_TIME = 2
local PWR_PERF = 800
@ -172,6 +173,27 @@ techage.register_node({"techage:ta5_generator", "techage:ta5_generator_on"}, {
end,
})
control.register_nodes({"techage:ta5_generator", "techage:ta5_generator_on"}, {
on_receive = function(pos, tlib2, topic, payload)
end,
on_request = function(pos, tlib2, topic)
if topic == "info" then
local nvm = techage.get_nvm(pos)
local meta = M(pos)
return {
type = S("TA5 Generator"),
number = "-",
running = (nvm.alive_cnt or 0) > 0,
available = PWR_PERF,
provided = nvm.provided or 0,
termpoint = meta:get_string("termpoint"),
}
end
return false
end,
}
)
minetest.register_craft({
output = "techage:ta5_generator",
recipe = {

View File

@ -111,7 +111,7 @@ sched.register(tSched, CALL_RATE1, 3, function(pos)
sched.register(tSched, CALL_RATE2, 4, function(pos)
local resp = heatexchanger3_cmnd(pos, "dec_power")
local cnt = count_trues(resp)
print("dec_power", cnt)
--print("dec_power", cnt)
if cnt < 52 then
return 0
end
@ -217,7 +217,7 @@ end
local function node_timer(pos, elapsed)
local nvm = techage.get_nvm(pos)
nvm.temperature = nvm.temperature or 0
print("node_timer", nvm.temperature)
--print("node_timer", nvm.temperature)
if consume_power(pos, nvm) then
if steam_management(pos, nvm) then
State:keep_running(pos, nvm, COUNTDOWN_TICKS)

View File

@ -13,7 +13,7 @@
techage = {}
-- Version for compatibility checks, see readme.md/history
techage.version = 1.06
techage.version = 1.07
if minetest.global_exists("tubelib") then
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")

View File

@ -64,6 +64,14 @@ minetest.register_craftitem("techage:ta5_ceramic_turbine", {
inventory_image = "techage_ceramic_turbine.png",
})
techage.furnace.register_recipe({
output = "techage:ta4_round_ceramic 2",
recipe = {
"techage:ta4_ceramic_material", "techage:ta4_ceramic_material",
"techage:ta4_ceramic_material", "techage:ta4_ceramic_material",
},
time = 16,
})
techage.furnace.register_recipe({
output = "techage:ta5_ceramic_turbine",