2023-02-23 12:14:10 +01:00
|
|
|
-- IndustrialTest
|
|
|
|
-- Copyright (C) 2023 mrkubax10
|
|
|
|
|
|
|
|
-- This program is free software: you can redistribute it and/or modify
|
|
|
|
-- it under the terms of the GNU General Public License as published by
|
|
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
|
|
|
-- (at your option) any later version.
|
|
|
|
|
|
|
|
-- This program is distributed in the hope that it will be useful,
|
|
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
-- GNU General Public License for more details.
|
|
|
|
|
|
|
|
-- You should have received a copy of the GNU General Public License
|
|
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2023-02-23 12:09:46 +01:00
|
|
|
local S=minetest.get_translator("industrialtest")
|
|
|
|
|
|
|
|
local mtgAvailable=minetest.get_modpath("default")
|
2023-02-23 13:49:13 +01:00
|
|
|
local mclAvailable=minetest.get_modpath("mcl_core")
|
2023-02-23 12:09:46 +01:00
|
|
|
|
|
|
|
-- compatibilty that adds not existing elements
|
|
|
|
if mclAvailable then
|
|
|
|
-- register required items that are not available in MCL
|
|
|
|
minetest.register_craftitem("industrialtest:raw_tin",{
|
|
|
|
description=S("Raw Tin"),
|
|
|
|
inventory_image="industrialtest_mcl_raw_tin.png"
|
|
|
|
})
|
|
|
|
minetest.register_craftitem("industrialtest:tin_ingot",{
|
|
|
|
description=S("Tin Ingot"),
|
|
|
|
inventory_image="industrialtest_mcl_tin_ingot.png"
|
|
|
|
})
|
|
|
|
|
|
|
|
-- register required blocks that are not available in MCL
|
2023-02-23 13:49:13 +01:00
|
|
|
minetest.register_node("industrialtest:stone_with_tin",{
|
2023-02-23 12:09:46 +01:00
|
|
|
description=S("Tin Ore"),
|
2023-02-23 14:08:00 +01:00
|
|
|
tiles={"default_stone.png^industrialtest_mcl_stone_with_tin.png"},
|
2023-02-23 12:09:46 +01:00
|
|
|
sounds=mcl_sounds.node_sound_stone_defaults(),
|
2023-02-23 13:49:13 +01:00
|
|
|
drop="industrialtest:raw_tin",
|
|
|
|
groups={pickaxey=3,building_block=1,material_stone=1,blast_furnace_smeltable=1},
|
|
|
|
_mcl_blast_resistance = 3,
|
|
|
|
_mcl_hardness = 3,
|
|
|
|
_mcl_silk_touch_drop = true,
|
|
|
|
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
|
2023-02-23 12:09:46 +01:00
|
|
|
})
|
2023-02-23 14:08:00 +01:00
|
|
|
minetest.register_node("industrialtest:raw_tin_block",{
|
|
|
|
description=S("Raw Tin Block"),
|
|
|
|
tiles={"industrialtest_mcl_raw_tin_block.png"},
|
|
|
|
groups={pickaxey=2,building_block=1,blast_furnace_smeltable=1},
|
|
|
|
sounds=mcl_sounds.node_sound_metal_defaults(),
|
|
|
|
_mcl_blast_resistance=6,
|
|
|
|
_mcl_hardness=5,
|
|
|
|
})
|
2023-02-23 12:09:46 +01:00
|
|
|
|
2023-02-23 14:08:00 +01:00
|
|
|
-- register crafts that are not available in MCL
|
|
|
|
minetest.register_craft({
|
|
|
|
type="cooking",
|
|
|
|
output="industrialtest:tin_ingot",
|
|
|
|
recipe="industrialtest:raw_tin"
|
|
|
|
})
|
2023-02-23 12:09:46 +01:00
|
|
|
-- register required ores that are not available in MCL
|
|
|
|
local stonelike={"mcl_core:stone","mcl_core:diorite","mcl_core:andesite","mcl_core:granite"}
|
|
|
|
minetest.register_ore({
|
|
|
|
ore_type="scatter",
|
2023-02-23 13:49:13 +01:00
|
|
|
ore="industrialtest:stone_with_tin",
|
|
|
|
wherein=stonelike,
|
|
|
|
clust_scarcity=10*10*10,
|
2023-02-23 12:09:46 +01:00
|
|
|
clust_num_ores=5,
|
|
|
|
clust_size=3,
|
|
|
|
y_max=mcl_worlds.layer_to_y(39),
|
|
|
|
y_min=mcl_vars.mg_overworld_min
|
|
|
|
})
|
2023-02-23 13:49:13 +01:00
|
|
|
end
|