Merge pull request #176 from Eternal-Study/Eternal-Study-Salt-Patch
Water to Salt + River Water Reactor Recipe
This commit is contained in:
commit
c98b9a3b79
3
init.lua
3
init.lua
@ -3,7 +3,7 @@
|
|||||||
TechAge
|
TechAge
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Copyright (C) 2019-2023 Joachim Stolberg
|
Copyright (C) 2019-2024 Joachim Stolberg
|
||||||
|
|
||||||
AGPL v3
|
AGPL v3
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
@ -394,6 +394,7 @@ dofile(MP.."/items/cracking.lua")
|
|||||||
dofile(MP.."/items/ceramic.lua")
|
dofile(MP.."/items/ceramic.lua")
|
||||||
dofile(MP.."/items/basalt.lua")
|
dofile(MP.."/items/basalt.lua")
|
||||||
dofile(MP.."/items/moreblocks.lua")
|
dofile(MP.."/items/moreblocks.lua")
|
||||||
|
dofile(MP.."/items/salt.lua")
|
||||||
|
|
||||||
-- Carts
|
-- Carts
|
||||||
dofile(MP.."/carts/tank_cart.lua")
|
dofile(MP.."/carts/tank_cart.lua")
|
||||||
|
44
items/salt.lua
Normal file
44
items/salt.lua
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2024 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
Salt
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
|
||||||
|
--Detects if the salt node is registered.
|
||||||
|
minetest.register_on_mods_loaded(function()
|
||||||
|
if minetest.registered_nodes["farming:salt"] then
|
||||||
|
--Adds salt to powder group to ensure reactor and silo will accept it
|
||||||
|
local def = minetest.registered_nodes["farming:salt"]
|
||||||
|
local groups = table.copy(def.groups)
|
||||||
|
groups.powder = 1
|
||||||
|
minetest.override_item("farming:salt", { groups=groups })
|
||||||
|
|
||||||
|
--Add the water -> salt & river water recipe.
|
||||||
|
techage.recipes.add("ta4_doser", {
|
||||||
|
output = "farming:salt 1",
|
||||||
|
waste = "techage:river_water 1",
|
||||||
|
input = {
|
||||||
|
"techage:water 1",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
else
|
||||||
|
-- Creates a water -> River Water recipe in absense of the farming:salt node.
|
||||||
|
techage.recipes.add("ta4_doser", {
|
||||||
|
output = "techage:river_water 1",
|
||||||
|
input = {
|
||||||
|
"techage:water 1",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end)
|
Loading…
Reference in New Issue
Block a user