cracking and hydrogenation recipes added

This commit is contained in:
Joachim Stolberg 2020-07-06 20:18:38 +02:00
parent 5fec894a11
commit 849fb91918
4 changed files with 79 additions and 3 deletions

View File

@ -332,7 +332,7 @@ end
minetest.register_lbm({
label = "[techage] Rinser update",
name = "techage:update",
name = "techage:rinser_update",
nodenames = {"techage:ta2_rinser_act", "techage:ta3_rinser_act"},
run_at_every_load = true,
action = function(pos, node)

View File

@ -207,7 +207,7 @@ minetest.register_craft({
minetest.register_lbm({
label = "[techage] Lighter update",
name = "techage:update",
name = "techage:lighter_update",
nodenames = {"techage:lighter_burn"},
run_at_every_load = true,
action = function(pos, node)

73
items/cracking.lua Normal file
View File

@ -0,0 +1,73 @@
--[[
TechAge
=======
Copyright (C) 2019-2020 Joachim Stolberg
GPL v3
See LICENSE.txt for more information
Cracking breaks long chains of hydrocarbons into short chains using a catalyst.
Gibbsite powder serves as a catalyst (is not consumed).
It can be used to convert bitumen into fueloil, fueloil into naphtha and naphtha into gasoline.
In hydrogenation, pairs of hydrogen atoms are added to a molecule to convert short-chain
hydrocarbons into long ones.
Here iron powder is required as a catalyst (is not consumed).
It can be used to convert gasoline into naphtha, naphtha into fueloil, and fueloil into bitumen.
]]--
-- Cracking
techage.recipes.add("ta4_doser", {
output = "techage:fueloil 1",
input = {
"techage:bitumen 1",
},
catalyst = "techage:gibbsite_powder",
})
techage.recipes.add("ta4_doser", {
output = "techage:naphtha 1",
input = {
"techage:fueloil 1",
},
catalyst = "techage:gibbsite_powder",
})
techage.recipes.add("ta4_doser", {
output = "techage:gasoline 1",
input = {
"techage:naphtha 1",
},
catalyst = "techage:gibbsite_powder",
})
-- Hydrogenate
techage.recipes.add("ta4_doser", {
output = "techage:bitumen 2",
input = {
"techage:fueloil 1",
"techage:hydrogen 1",
},
catalyst = "techage:iron_powder",
})
techage.recipes.add("ta4_doser", {
output = "techage:fueloil 2",
input = {
"techage:naphtha 1",
"techage:hydrogen 1",
},
catalyst = "techage:iron_powder",
})
techage.recipes.add("ta4_doser", {
output = "techage:naphtha 2",
input = {
"techage:gasoline 1",
"techage:hydrogen 1",
},
catalyst = "techage:iron_powder",
})

View File

@ -37,7 +37,7 @@ local function node_timer(pos, elapsed)
power.consumer_alive(pos, Cable, CYCLE_TIME)
local nvm = techage.get_nvm(pos)
local mem = techage.get_mem(pos)
mem.grow_pos = mem.grow_pos or {} -- keep the pos blank for same time
mem.grow_pos = mem.grow_pos or {} -- keep the pos blank for some time
nvm.tick = nvm.tick or math.random(RANDOM_VAL, RANDOM_VAL*2)
nvm.tick = nvm.tick - 1
if nvm.tick == 0 then
@ -153,6 +153,9 @@ minetest.after(1, function()
if ndef.on_timer then -- probably a plant that still needs to grow
techage.register_plant(name)
end
elseif mod == "flowers" then
print(name)
techage.register_flower(name)
end
end
end