Merge pull request #176 from Eternal-Study/Eternal-Study-Salt-Patch

Water to Salt + River Water Reactor Recipe
This commit is contained in:
Joachim Stolberg 2024-06-30 10:53:10 +02:00 committed by GitHub
commit c98b9a3b79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 46 additions and 1 deletions

View File

@ -3,7 +3,7 @@
TechAge
=======
Copyright (C) 2019-2023 Joachim Stolberg
Copyright (C) 2019-2024 Joachim Stolberg
AGPL v3
See LICENSE.txt for more information
@ -394,6 +394,7 @@ dofile(MP.."/items/cracking.lua")
dofile(MP.."/items/ceramic.lua")
dofile(MP.."/items/basalt.lua")
dofile(MP.."/items/moreblocks.lua")
dofile(MP.."/items/salt.lua")
-- Carts
dofile(MP.."/carts/tank_cart.lua")

44
items/salt.lua Normal file
View 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)