use nodecore stone texture if found

This commit is contained in:
tenplus1 2024-09-28 17:54:43 +01:00
commit 72f4e36b7b

View file

@ -447,15 +447,23 @@ end
local player_pos = {} local player_pos = {}
-- stone texture
local stone_tex = "default_stone.png"
if minetest.get_modpath("nc_terrain") then
stone_tex = "nc_terrain_stone.png"
end
-- protection node -- protection node
minetest.register_node("protector:protect", { minetest.register_node("protector:protect", {
description = S("Protection Block") .. " (" .. S("USE for area check") .. ")", description = S("Protection Block") .. " (" .. S("USE for area check") .. ")",
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
"default_stone.png^protector_overlay.png", stone_tex .. "^protector_overlay.png",
"default_stone.png^protector_overlay.png", stone_tex .. "^protector_overlay.png",
"default_stone.png^protector_overlay.png^protector_logo.png" stone_tex .. "^protector_overlay.png^protector_logo.png"
}, },
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
groups = {dig_immediate = 2, unbreakable = 1}, groups = {dig_immediate = 2, unbreakable = 1},