replace the rest of the hard coded texture conversions to use homedecor.textures

This commit is contained in:
wsor4035 2024-03-03 14:48:55 -05:00
parent f432c53117
commit 13e562986a
6 changed files with 12 additions and 24 deletions

View File

@ -76,10 +76,11 @@ building_blocks_stairs("building_blocks:Adobe", {
key = "node_sound_stone_defaults", key = "node_sound_stone_defaults",
}, },
}) })
local grasstex = {"[combine:16x16^[noalpha^[colorize:#006400"} local grasstex = {
if minetest.get_modpath("default") then homedecor.textures.grass.top,
grasstex = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"} homedecor.textures.grass.dirt,
end homedecor.textures.grass.side
}
building_blocks_stairs("building_blocks:fakegrass", { building_blocks_stairs("building_blocks:fakegrass", {
tiles = grasstex, tiles = grasstex,
description = S("Fake Grass"), description = S("Fake Grass"),
@ -147,10 +148,7 @@ minetest.register_node("building_blocks:brobble_spread", {
}) })
if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
local graveltex = "[combine:16x16^[noalpha^[colorize:#3a3b3c" local graveltex = homedecor.textures.gravel
if minetest.get_modpath("default") then
graveltex = "default_gravel.png"
end
minetest.register_node("building_blocks:gravel_spread", { minetest.register_node("building_blocks:gravel_spread", {
drawtype = "raillike", drawtype = "raillike",
description = S("Gravel Spread"), description = S("Gravel Spread"),

View File

@ -1,12 +1,6 @@
local S = minetest.get_translator("homedecor_clocks") local S = minetest.get_translator("homedecor_clocks")
local wood local wood = homedecor.textures.wood.apple.planks
if minetest.get_modpath("default") then
wood = "default_wood.png"
else
wood = "[combine:16x16^[noalpha^[colorize:#563d2d"
end
local plastic_craft = { local plastic_craft = {
output = "homedecor:analog_clock_plastic 2", output = "homedecor:analog_clock_plastic 2",

View File

@ -288,8 +288,7 @@ homedecor.register("swing_rope", {
selection_box = homedecor.nodebox.null selection_box = homedecor.nodebox.null
}) })
local water_tex = "default_water.png" local water_tex = homedecor.textures.water.tile
if not minetest.get_modpath("default") then water_tex = "[combine:16x16^[noalpha^[colorize:#00008b" end
local cobble_tex = minetest.registered_nodes["mapgen_stone"].tiles[1] local cobble_tex = minetest.registered_nodes["mapgen_stone"].tiles[1]
local stone_drop = minetest.registered_nodes["mapgen_stone"].drop local stone_drop = minetest.registered_nodes["mapgen_stone"].drop
if stone_drop and type(stone_drop) == "string" then if stone_drop and type(stone_drop) == "string" then

View File

@ -80,8 +80,7 @@ local ib_cbox = {
fixed = { -6/16, -8/16, -4/16, 17/16, 4/16, 4/16 } fixed = { -6/16, -8/16, -4/16, 17/16, 4/16, 4/16 }
} }
local wool_tex = "wool_grey.png" local wool_tex = homedecor.textures.wool.grey
if not minetest.get_modpath("wool") then wool_tex = "[combine:16x16^[noalpha^[colorize:#3A3B3C" end
homedecor.register("ironing_board", { homedecor.register("ironing_board", {
description = S("Ironing board"), description = S("Ironing board"),

View File

@ -452,7 +452,7 @@ for brightness_level = 0, 14 do
lighttex = "homedecor_plasma_lamp_off.png" lighttex = "homedecor_plasma_lamp_off.png"
end end
local gtex=minetest.get_modpath("default") and "default_gold_block.png" or "[combine:16x16^[noalpha^[colorize:#FFD700" local gtex=homedecor.textures.metal.gold.block
homedecor.register("plasma_lamp_"..brightness_level, { homedecor.register("plasma_lamp_"..brightness_level, {
description = S("Plasma Lamp/Light"), description = S("Plasma Lamp/Light"),
drawtype = "mesh", drawtype = "mesh",
@ -703,8 +703,7 @@ for brightness_level = 0, 14 do
fixed = { -0.25, -0.5, -0.25, 0.25, 1.5, 0.25 } fixed = { -0.25, -0.5, -0.25, 0.25, 1.5, 0.25 }
} }
local wool_brightened=(minetest.get_modpath("wool") and "wool_grey.png" or "[combine:16x16^[noalpha6[colorize:#A9A9A9") local wool_brightened=homedecor.textures.wool.grey .. "^[colorize:#ffffff:"..(brightness_level * 15)
.. "^[colorize:#ffffff:"..(brightness_level * 15)
homedecor.register("table_lamp_"..brightness_level, { homedecor.register("table_lamp_"..brightness_level, {
description = S("Table Lamp/Light"), description = S("Table Lamp/Light"),

View File

@ -336,8 +336,7 @@ homedecor_roofing.register_slope("homedecor", "glass",
S("Glass Shingles") S("Glass Shingles")
) )
local brick_tex = "default_brick.png" local brick_tex = homedecor.textures.brick
if not minetest.get_modpath("default") then brick_tex = "[combine:16x16^[noalpha^[colorize:#AA4A44" end
homedecor.register("chimney", { homedecor.register("chimney", {
description = S("Chimney"), description = S("Chimney"),