Fix ceramic recipe and TA5 generator bugs
This commit is contained in:
parent
5195bf23f4
commit
ce970279bf
@ -26,7 +26,7 @@ In contrast to TechPack, the resources are more limited and it is much more diff
|
|||||||
|
|
||||||
|
|
||||||
### License
|
### 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
|
Code: Licensed under the GNU AGPL version 3 or later. See LICENSE.txt
|
||||||
Textures: CC BY-SA 3.0
|
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
|
### History
|
||||||
|
|
||||||
|
**2022-01-22 V1.07**
|
||||||
|
- TA5 fusion reactor added
|
||||||
|
|
||||||
**2022-01-03 V1.06**
|
**2022-01-03 V1.06**
|
||||||
- TA5 teleport blocks added
|
- TA5 teleport blocks added
|
||||||
- Many improvements
|
- Many improvements
|
||||||
|
@ -91,7 +91,7 @@ sched.register(tSched, CALL_RATE1, 3, function(pos, outdir)
|
|||||||
sched.register(tSched, CALL_RATE2, 4, function(pos, outdir)
|
sched.register(tSched, CALL_RATE2, 4, function(pos, outdir)
|
||||||
local resp = control.request(pos, Cable, outdir, "con", "inc_power")
|
local resp = control.request(pos, Cable, outdir, "con", "inc_power")
|
||||||
local cnt = count_trues(resp)
|
local cnt = count_trues(resp)
|
||||||
print("inc_power", cnt)
|
--print("inc_power", cnt)
|
||||||
if cnt < 52 then
|
if cnt < 52 then
|
||||||
return S("Cooling failed")
|
return S("Cooling failed")
|
||||||
end
|
end
|
||||||
|
@ -17,6 +17,7 @@ local S = techage.S
|
|||||||
|
|
||||||
local Cable = techage.ElectricCable
|
local Cable = techage.ElectricCable
|
||||||
local power = networks.power
|
local power = networks.power
|
||||||
|
local control = networks.control
|
||||||
|
|
||||||
local CYCLE_TIME = 2
|
local CYCLE_TIME = 2
|
||||||
local PWR_PERF = 800
|
local PWR_PERF = 800
|
||||||
@ -172,6 +173,27 @@ techage.register_node({"techage:ta5_generator", "techage:ta5_generator_on"}, {
|
|||||||
end,
|
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({
|
minetest.register_craft({
|
||||||
output = "techage:ta5_generator",
|
output = "techage:ta5_generator",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -111,7 +111,7 @@ sched.register(tSched, CALL_RATE1, 3, function(pos)
|
|||||||
sched.register(tSched, CALL_RATE2, 4, function(pos)
|
sched.register(tSched, CALL_RATE2, 4, function(pos)
|
||||||
local resp = heatexchanger3_cmnd(pos, "dec_power")
|
local resp = heatexchanger3_cmnd(pos, "dec_power")
|
||||||
local cnt = count_trues(resp)
|
local cnt = count_trues(resp)
|
||||||
print("dec_power", cnt)
|
--print("dec_power", cnt)
|
||||||
if cnt < 52 then
|
if cnt < 52 then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
@ -217,7 +217,7 @@ end
|
|||||||
local function node_timer(pos, elapsed)
|
local function node_timer(pos, elapsed)
|
||||||
local nvm = techage.get_nvm(pos)
|
local nvm = techage.get_nvm(pos)
|
||||||
nvm.temperature = nvm.temperature or 0
|
nvm.temperature = nvm.temperature or 0
|
||||||
print("node_timer", nvm.temperature)
|
--print("node_timer", nvm.temperature)
|
||||||
if consume_power(pos, nvm) then
|
if consume_power(pos, nvm) then
|
||||||
if steam_management(pos, nvm) then
|
if steam_management(pos, nvm) then
|
||||||
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
|
2
init.lua
2
init.lua
@ -13,7 +13,7 @@
|
|||||||
techage = {}
|
techage = {}
|
||||||
|
|
||||||
-- Version for compatibility checks, see readme.md/history
|
-- Version for compatibility checks, see readme.md/history
|
||||||
techage.version = 1.06
|
techage.version = 1.07
|
||||||
|
|
||||||
if minetest.global_exists("tubelib") then
|
if minetest.global_exists("tubelib") then
|
||||||
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
||||||
|
@ -64,6 +64,14 @@ minetest.register_craftitem("techage:ta5_ceramic_turbine", {
|
|||||||
inventory_image = "techage_ceramic_turbine.png",
|
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({
|
techage.furnace.register_recipe({
|
||||||
output = "techage:ta5_ceramic_turbine",
|
output = "techage:ta5_ceramic_turbine",
|
||||||
|
Loading…
Reference in New Issue
Block a user