mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-08 03:00:38 +02:00
Add MV-Freezer (#457)
New Grinder-recipe: ice => snowblock New recipe for freezer: Freezer now generates ice
This commit is contained in:
9
technic/machines/register/freezer.lua
Normal file
9
technic/machines/register/freezer.lua
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
local S = technic.getter
|
||||
|
||||
function technic.register_freezer(data)
|
||||
data.typename = "freezing"
|
||||
data.machine_name = "freezer"
|
||||
data.machine_desc = S("%s Freezer")
|
||||
technic.register_base_machine(data)
|
||||
end
|
21
technic/machines/register/freezer_recipes.lua
Normal file
21
technic/machines/register/freezer_recipes.lua
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
local S = technic.getter
|
||||
|
||||
technic.register_recipe_type("freezing", { description = S("Freezing") })
|
||||
|
||||
function technic.register_freezer_recipe(data)
|
||||
data.time = data.time or 5
|
||||
technic.register_recipe("freezing", data)
|
||||
end
|
||||
|
||||
local recipes = {
|
||||
{"bucket:bucket_water", { "default:ice", "bucket:bucket_empty" } },
|
||||
{"bucket:bucket_river_water", { "default:ice", "bucket:bucket_empty" } },
|
||||
{"default:dirt", "default:dirt_with_snow" },
|
||||
{"bucket:bucket_lava", { "default:obsidian", "bucket:bucket_empty" } }
|
||||
}
|
||||
|
||||
for _, data in pairs(recipes) do
|
||||
technic.register_freezer_recipe({input = {data[1]}, output = data[2]})
|
||||
end
|
||||
|
@ -30,6 +30,8 @@ local recipes = {
|
||||
{"default:sandstone", "default:sand 2"}, -- reverse recipe can be found in the compressor
|
||||
{"default:desert_sandstone", "default:desert_sand 2"}, -- reverse recipe can be found in the compressor
|
||||
{"default:silver_sandstone", "default:silver_sand 2"}, -- reverse recipe can be found in the compressor
|
||||
|
||||
{"default:ice", "default:snowblock"},
|
||||
}
|
||||
|
||||
-- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe)
|
||||
|
@ -20,6 +20,7 @@ dofile(path.."/grinder_recipes.lua")
|
||||
dofile(path.."/extractor_recipes.lua")
|
||||
dofile(path.."/compressor_recipes.lua")
|
||||
dofile(path.."/centrifuge_recipes.lua")
|
||||
dofile(path.."/freezer_recipes.lua")
|
||||
|
||||
-- Multi-Machine Recipes
|
||||
dofile(path.."/grindings.lua")
|
||||
@ -31,3 +32,4 @@ dofile(path.."/grinder.lua")
|
||||
dofile(path.."/extractor.lua")
|
||||
dofile(path.."/compressor.lua")
|
||||
dofile(path.."/centrifuge.lua")
|
||||
dofile(path.."/freezer.lua")
|
||||
|
Reference in New Issue
Block a user