Integrate more with MineClone's APIs
I wasn't sure if their licenses allowed me, but apparently they do: https://git.minetest.land/MineClone2/MineClone2/issues/1849
This commit is contained in:
parent
be5267ccd8
commit
ea6f7b5fa4
@ -1,7 +1,8 @@
|
||||
std = "min"
|
||||
read_globals = {
|
||||
"default", "digiline", "ItemStack", "mesecon", "minetest", "pipeworks",
|
||||
"table.copy", "table.unpack", "unpack", "VoxelArea", "vector",
|
||||
"default", "digiline", "ItemStack", "mcl_sounds", "mesecon", "minetest",
|
||||
"pipeworks", "table.copy", "table.unpack", "unpack", "VoxelArea",
|
||||
"vector",
|
||||
}
|
||||
globals = {"minetest.is_protected"}
|
||||
ignore = {"21/_.*"}
|
||||
|
2
mod.conf
2
mod.conf
@ -2,5 +2,5 @@ name = area_containers
|
||||
title = Area Containers
|
||||
author = Jude Melton-Houghton
|
||||
description = Adds nodes that contain areas in which you can build
|
||||
optional_depends = default, digilines, mcl_core, mesecons, mesecons_mvps, pipeworks
|
||||
optional_depends = default, digilines, mcl_core, mcl_sounds, mesecons, mesecons_mvps, pipeworks
|
||||
min_minetest_version = 5.4
|
||||
|
@ -108,7 +108,11 @@ for i, name in ipairs(ALL_CONTAINER_STATES) do
|
||||
description = S("Area Container"),
|
||||
tiles = table.copy(container_tiles),
|
||||
drop = ALL_CONTAINER_STATES[1],
|
||||
groups = merged_table(container_pipeworks.groups, {cracky = 2}),
|
||||
groups = merged_table(container_pipeworks.groups, {
|
||||
cracky = 2,
|
||||
pickaxey = 2,
|
||||
}),
|
||||
_mcl_hardness = 5,
|
||||
on_construct = container_base.on_construct,
|
||||
after_place_node = container_after_place_node,
|
||||
on_destruct = container_base.on_destruct,
|
||||
@ -143,6 +147,9 @@ for i, name in ipairs(ALL_CONTAINER_STATES) do
|
||||
if minetest.global_exists("default") and
|
||||
default.node_sound_metal_defaults then
|
||||
container_def.sounds = default.node_sound_metal_defaults()
|
||||
elseif minetest.global_exists("mcl_sounds") and
|
||||
mcl_sounds.node_sound_metal_defaults then
|
||||
container_def.sounds = mcl_sounds.node_sound_metal_defaults()
|
||||
end
|
||||
if i > 1 then
|
||||
container_def.groups.not_in_creative_inventory = 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user