added compatibility for minetest mods (WIP)

This commit is contained in:
cale 2016-07-12 16:56:54 +02:00
parent 31dc0adcda
commit 4d8ccaff01
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,5 @@
default.LIGHT_MAX = 14
function default.drop_items(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
meta:from_table(oldmetadata)
@ -78,3 +80,12 @@ function default.sounds.dirt(t)
{name = "default_dirt_1", gain = 0.1}
return t
end
default.node_sound_stone_defaults = default.sounds.stone
default.node_sound_dirt_defaults = default.sounds.dirt
default.node_sound_wood_defaults = default.sounds.wood
default.node_sound_sand_defaults = default.sounds.dirt
default.node_sound_gravel_defaults = default.sounds.dirt
default.node_sound_leaves_defaults = default.sounds.dirt
default.node_sound_glass_defaults = default.sounds.dirt

View File

@ -751,7 +751,7 @@ minetest.register_node("default:stone_with_coal", {
description = "Stone with Coal",
tiles = {"default_stone_with_coal.png"},
groups = {cracky = 2},
drops = "default:coal_lump",
drop = "default:coal_lump",
sounds = default.sounds.stone(),
})
@ -864,3 +864,7 @@ default.register_fence("default:fence_jungle_wood", {
default.register_fence("default:fence_quartz", {
material = "default:quartz",
})
-- alias
minetest.register_alias("default:dirt_with_grass", "default:grass")
minetest.register_alias("default:dirt_with_dry_grass", "default:dry_grass")