1
0
mirror of https://github.com/mt-mods/basic_materials.git synced 2025-07-04 17:10:25 +02:00

remove dep on default and make game agnostic

This commit is contained in:
unknown
2022-01-25 21:08:32 -05:00
parent 8b681d9755
commit 3a79e10da7
9 changed files with 293 additions and 337 deletions

View File

@ -1,28 +1,22 @@
local S = minetest.get_translator("basic_materials")
local sound_api = dofile(basic_materials.modpath .. "/sound_api_core/init.lua")
local chains_sbox = {type = "fixed",fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }}
minetest.register_node("basic_materials:cement_block", {
description = S("Cement"),
tiles = {"basic_materials_cement_block.png"},
is_ground_content = true,
groups = {cracky=2},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=2, dig_stone = 1},
sounds = sound_api.node_sound_stone_defaults(),
})
minetest.register_node("basic_materials:concrete_block", {
description = S("Concrete Block"),
tiles = {"basic_materials_concrete_block.png",},
groups = {cracky=1, level=2, concrete=1},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=1, concrete=1, dig_stone = 1},
sounds = sound_api.node_sound_stone_defaults(),
})
local chains_sbox = {
type = "fixed",
fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }
}
minetest.register_node("basic_materials:chain_steel", {
description = S("Chain (steel, hanging)"),
drawtype = "mesh",
@ -33,7 +27,7 @@ minetest.register_node("basic_materials:chain_steel", {
sunlight_propagates = true,
paramtype = "light",
inventory_image = "basic_materials_chain_steel_inv.png",
groups = {cracky=3},
groups = {cracky=3, dig_stone = 1},
selection_box = chains_sbox,
})
@ -47,7 +41,7 @@ minetest.register_node("basic_materials:chain_brass", {
sunlight_propagates = true,
paramtype = "light",
inventory_image = "basic_materials_chain_brass_inv.png",
groups = {cracky=3},
groups = {cracky=3, dig_stone = 1},
selection_box = chains_sbox,
})
@ -55,6 +49,6 @@ minetest.register_node("basic_materials:brass_block", {
description = S("Brass Block"),
tiles = { "basic_materials_brass_block.png" },
is_ground_content = false,
groups = {cracky=1, level=2},
sounds = default.node_sound_metal_defaults()
groups = {cracky=1, dig_stone = 1},
sounds = sound_api.node_sound_metal_defaults()
})