Use xcompat for steel block texture

This commit is contained in:
luk3yx 2024-03-05 10:10:35 +13:00
parent 31f7314591
commit bf10290b39
2 changed files with 4 additions and 7 deletions

View File

@ -1,3 +1,3 @@
name = snippets
optional_depends = cloaking, default, fs51
optional_depends = cloaking, fs51, xcompat
supported_games = *

View File

@ -3,12 +3,9 @@
--
-- Use steel block texture in minetest_game
local bg
if minetest.registered_nodes['default:steelblock'] then
bg = 'default_steel_block.png'
else
bg = '[combine:1x1^[noalpha^[colorize:#aaa'
end
local bg = minetest.global_exists('xcompat') and xcompat.textures and
xcompat.textures.metal.steel.block or
'[combine:1x1^[noalpha^[colorize:#aaa'
minetest.register_node('snippets:button', {
description = 'Snippets button',