From 849fb91918d31f9e6e392cab9d5db150a50b0ea1 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Mon, 6 Jul 2020 20:18:38 +0200 Subject: [PATCH] cracking and hydrogenation recipes added --- basic_machines/gravelrinser.lua | 2 +- iron_age/charcoalpile.lua | 2 +- items/cracking.lua | 73 +++++++++++++++++++++++++++++++++ lamps/growlight.lua | 5 ++- 4 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 items/cracking.lua diff --git a/basic_machines/gravelrinser.lua b/basic_machines/gravelrinser.lua index 4915fa5..f4bd8fb 100644 --- a/basic_machines/gravelrinser.lua +++ b/basic_machines/gravelrinser.lua @@ -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) diff --git a/iron_age/charcoalpile.lua b/iron_age/charcoalpile.lua index 8354107..0ebae12 100644 --- a/iron_age/charcoalpile.lua +++ b/iron_age/charcoalpile.lua @@ -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) diff --git a/items/cracking.lua b/items/cracking.lua new file mode 100644 index 0000000..abcb719 --- /dev/null +++ b/items/cracking.lua @@ -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", +}) diff --git a/lamps/growlight.lua b/lamps/growlight.lua index f0403fe..c6790a4 100644 --- a/lamps/growlight.lua +++ b/lamps/growlight.lua @@ -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