add texture table
This commit is contained in:
parent
78a5c5747c
commit
6370ebe1c8
|
@ -172,10 +172,7 @@ local sbox = {
|
||||||
fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16},
|
fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16},
|
||||||
}
|
}
|
||||||
|
|
||||||
local wtex = "default_junglewood.png"
|
local wtex = homedecor.textures.default_junglewood
|
||||||
if not minetest.get_modpath("default") then
|
|
||||||
wtex = "[combine:16x16^[noalpha^[colorize:#563d2d"
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_node("fake_fire:fancy_fire", {
|
minetest.register_node("fake_fire:fancy_fire", {
|
||||||
inventory_image = "fancy_fire_inv.png",
|
inventory_image = "fancy_fire_inv.png",
|
||||||
|
|
|
@ -2,10 +2,8 @@ local S = minetest.get_translator("homedecor_bathroom")
|
||||||
|
|
||||||
local sc_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
|
local sc_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
|
||||||
|
|
||||||
local wood_tex = "default_wood.png"
|
local wood_tex = homedecor.textures.default_wood
|
||||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
local water_tex = homedecor.textures.water
|
||||||
local water_tex = "default_water.png"
|
|
||||||
if not minetest.get_modpath("default") then water_tex = "[combine:16x16^[noalpha^[colorize:#00008b" end
|
|
||||||
|
|
||||||
homedecor.register("bathroom_tiles_dark", {
|
homedecor.register("bathroom_tiles_dark", {
|
||||||
description = S("Bathroom/kitchen tiles (dark)"),
|
description = S("Bathroom/kitchen tiles (dark)"),
|
||||||
|
|
|
@ -2,9 +2,7 @@ local S = minetest.get_translator("homedecor_bedroom")
|
||||||
|
|
||||||
local sc_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
|
local sc_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
|
||||||
|
|
||||||
local wood_tex, wool_tex = "default_wood.png", "wool_white.png"
|
local wood_tex, wool_tex = homedecor.textures.default_wood, homedecor.textures.wool_white
|
||||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
|
||||||
if not minetest.get_modpath("wool") then wool_tex = "[combine:16x16^[noalpha^[colorize:#ffffff" end
|
|
||||||
|
|
||||||
local bed_sbox = {
|
local bed_sbox = {
|
||||||
type = "wallmounted",
|
type = "wallmounted",
|
||||||
|
|
|
@ -7,7 +7,7 @@ homedecor.register("air_conditioner", {
|
||||||
mesh = "homedecor_ac.obj",
|
mesh = "homedecor_ac.obj",
|
||||||
tiles = {
|
tiles = {
|
||||||
"homedecor_ac.png",
|
"homedecor_ac.png",
|
||||||
homedecor.glass
|
homedecor.textures.glass
|
||||||
},
|
},
|
||||||
groups = { snappy = 3, dig_stone = 3 },
|
groups = { snappy = 3, dig_stone = 3 },
|
||||||
use_texture_alpha = "clip",
|
use_texture_alpha = "clip",
|
||||||
|
|
|
@ -135,7 +135,7 @@ homedecor.register("grandfather_clock", {
|
||||||
description = S("Grandfather Clock"),
|
description = S("Grandfather Clock"),
|
||||||
mesh = "homedecor_grandfather_clock.obj",
|
mesh = "homedecor_grandfather_clock.obj",
|
||||||
tiles = {
|
tiles = {
|
||||||
homedecor.glass,
|
homedecor.textures.glass,
|
||||||
"homedecor_grandfather_clock_face.png",
|
"homedecor_grandfather_clock_face.png",
|
||||||
homedecor.lux_wood,
|
homedecor.lux_wood,
|
||||||
"homedecor_grandfather_clock_face_edge.png",
|
"homedecor_grandfather_clock_face_edge.png",
|
||||||
|
|
|
@ -49,32 +49,17 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
||||||
return isceiling, pos
|
return isceiling, pos
|
||||||
end
|
end
|
||||||
|
|
||||||
homedecor.plain_wood = { name = "homedecor_generic_wood_plain.png", color = 0xffa76820 }
|
|
||||||
homedecor.mahogany_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff7d2506 }
|
|
||||||
homedecor.white_wood = "homedecor_generic_wood_plain.png"
|
|
||||||
homedecor.dark_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff39240f }
|
|
||||||
homedecor.lux_wood = { name = "homedecor_generic_wood_luxury.png", color = 0xff643f23 }
|
|
||||||
homedecor.glass = "default_glass.png"
|
|
||||||
|
|
||||||
if not minetest.get_modpath("default") then
|
|
||||||
homedecor.glass =
|
|
||||||
"[combine:16x16:" ..
|
|
||||||
"0,0=\\[combine\\:1x16\\^[noalpha\\^[colorize\\:#ffffff:" ..
|
|
||||||
"0,0=\\[combine\\:16x1\\^[noalpha\\^[colorize\\:#ffffff:" ..
|
|
||||||
"0,15=\\[combine\\:16x1\\^[noalpha\\^[colorize\\:#ffffff:" ..
|
|
||||||
"15,0=\\[combine\\:1x16\\^[noalpha\\^[colorize\\:#ffffff"
|
|
||||||
end
|
|
||||||
|
|
||||||
homedecor.color_black = 0xff303030
|
homedecor.color_black = 0xff303030
|
||||||
homedecor.color_dark_grey = 0xff606060
|
homedecor.color_dark_grey = 0xff606060
|
||||||
homedecor.color_med_grey = 0xffa0a0a0
|
homedecor.color_med_grey = 0xffa0a0a0
|
||||||
|
|
||||||
-- load different handler subsystems
|
-- load different handler subsystems
|
||||||
|
dofile(modpath.."/textures.lua")
|
||||||
|
dofile(modpath.."/materials.lua")
|
||||||
dofile(modpath.."/nodeboxes.lua")
|
dofile(modpath.."/nodeboxes.lua")
|
||||||
dofile(modpath.."/expansion.lua")
|
dofile(modpath.."/expansion.lua")
|
||||||
dofile(modpath.."/furnaces.lua")
|
dofile(modpath.."/furnaces.lua")
|
||||||
dofile(modpath.."/inventory.lua")
|
dofile(modpath.."/inventory.lua")
|
||||||
dofile(modpath.."/materials.lua")
|
|
||||||
dofile(modpath.."/registration.lua")
|
dofile(modpath.."/registration.lua")
|
||||||
dofile(modpath.."/water_particles.lua")
|
dofile(modpath.."/water_particles.lua")
|
||||||
dofile(modpath.."/sit.lua")
|
dofile(modpath.."/sit.lua")
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
homedecor.plain_wood = { name = "homedecor_generic_wood_plain.png", color = 0xffa76820 }
|
||||||
|
homedecor.mahogany_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff7d2506 }
|
||||||
|
homedecor.white_wood = "homedecor_generic_wood_plain.png"
|
||||||
|
homedecor.dark_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff39240f }
|
||||||
|
homedecor.lux_wood = { name = "homedecor_generic_wood_luxury.png", color = 0xff643f23 }
|
||||||
|
|
||||||
|
homedecor.textures = {
|
||||||
|
glass =
|
||||||
|
"[combine:16x16:" ..
|
||||||
|
"0,0=\\[combine\\:1x16\\^[noalpha\\^[colorize\\:#ffffff:" ..
|
||||||
|
"0,0=\\[combine\\:16x1\\^[noalpha\\^[colorize\\:#ffffff:" ..
|
||||||
|
"0,15=\\[combine\\:16x1\\^[noalpha\\^[colorize\\:#ffffff:" ..
|
||||||
|
"15,0=\\[combine\\:1x16\\^[noalpha\\^[colorize\\:#ffffff",
|
||||||
|
default_wood = "[combine:16x16^[noalpha^[colorize:#654321",
|
||||||
|
default_junglewood = "[combine:16x16^[noalpha^[colorize:#563d2d",
|
||||||
|
water = "[combine:16x16^[noalpha^[colorize:#00008b",
|
||||||
|
wool_white = "[combine:16x16^[noalpha^[colorize:#ffffff",
|
||||||
|
wool_black = "[combine:16x16^[noalpha^[colorize:#000000",
|
||||||
|
wool_grey = "[combine:16x16^[noalpha^[colorize:#313b3c",
|
||||||
|
}
|
||||||
|
|
||||||
|
if minetest.get_modpath("default") then
|
||||||
|
homedecor.textures = {
|
||||||
|
glass = "default_glass.png",
|
||||||
|
default_wood = "default_wood.png",
|
||||||
|
default_junglewood = "default_junglewood.png",
|
||||||
|
water = "default_water.png",
|
||||||
|
wool_white = "wool_white.png",
|
||||||
|
wool_black = "wool_black.png",
|
||||||
|
wool_grey = "wool_grey.png",
|
||||||
|
}
|
||||||
|
end
|
|
@ -43,8 +43,7 @@ homedecor.register("barbecue", {
|
||||||
|
|
||||||
minetest.register_alias("homedecor:barbecue_meat", "air")
|
minetest.register_alias("homedecor:barbecue_meat", "air")
|
||||||
|
|
||||||
local wood_tex = "default_wood.png"
|
local wood_tex = homedecor.textures.default_wood
|
||||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
|
||||||
|
|
||||||
homedecor.register("doghouse", {
|
homedecor.register("doghouse", {
|
||||||
mesh = "homedecor_doghouse.obj",
|
mesh = "homedecor_doghouse.obj",
|
||||||
|
|
|
@ -5,8 +5,7 @@ local ob_cbox = {
|
||||||
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
|
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
|
||||||
}
|
}
|
||||||
|
|
||||||
local wood_tex = "default_wood.png"
|
local wood_tex = homedecor.textures.default_wood
|
||||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
|
||||||
|
|
||||||
homedecor.register("openframe_bookshelf", {
|
homedecor.register("openframe_bookshelf", {
|
||||||
description = S("Bookshelf (open-frame)"),
|
description = S("Bookshelf (open-frame)"),
|
||||||
|
|
|
@ -145,8 +145,7 @@ homedecor.register("dishwasher_"..m, {
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local wood_tex = "default_wood.png"
|
local wood_tex = homedecor.textures.default_wood
|
||||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
|
||||||
local cabinet_sides = "("..wood_tex.."^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
|
local cabinet_sides = "("..wood_tex.."^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
|
||||||
local cabinet_sides_colored = "(homedecor_generic_wood_plain.png^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
|
local cabinet_sides_colored = "(homedecor_generic_wood_plain.png^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,8 @@ local S = minetest.get_translator("homedecor_misc")
|
||||||
|
|
||||||
homedecor_misc = {}
|
homedecor_misc = {}
|
||||||
|
|
||||||
local wool_black, wool_grey, wood_tex = "wool_black.png", "wool_grey.png", "default_wood.png"
|
local wool_black, wool_grey = homedecor.textures.wool_black, homedecor.textures.wool_grey
|
||||||
if not minetest.get_modpath("wool") then
|
local wood_tex = homedecor.textures.default_wood
|
||||||
wool_black = "[combine:16x16^[noalpha^[colorize:#000000"
|
|
||||||
wool_grey = "[combine:16x16^[noalpha^[colorize:#313b3c"
|
|
||||||
end
|
|
||||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
|
||||||
|
|
||||||
homedecor.register("ceiling_paint", {
|
homedecor.register("ceiling_paint", {
|
||||||
description = S("Textured Ceiling Paint"),
|
description = S("Textured Ceiling Paint"),
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
local S = minetest.get_translator("homedecor_pictures_and_paintings")
|
local S = minetest.get_translator("homedecor_pictures_and_paintings")
|
||||||
|
|
||||||
local wood_tex
|
local wood_tex = homedecor.textures.default_wood
|
||||||
if minetest.get_modpath("default") then
|
|
||||||
wood_tex = "default_wood.png"
|
|
||||||
else
|
|
||||||
wood_tex = "[combine:16x16^[noalpha^[colorize:#563d2d"
|
|
||||||
end
|
|
||||||
|
|
||||||
local pframe_cbox = {
|
local pframe_cbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
|
|
@ -5,8 +5,8 @@ homedecor_roofing = {}
|
||||||
minetest.register_node(":homedecor:skylight", {
|
minetest.register_node(":homedecor:skylight", {
|
||||||
description = S("Glass Skylight"),
|
description = S("Glass Skylight"),
|
||||||
drawtype = "raillike",
|
drawtype = "raillike",
|
||||||
tiles = { homedecor.glass },
|
tiles = { homedecor.textures.glass },
|
||||||
wield_image = homedecor.glass,
|
wield_image = homedecor.textures.glass,
|
||||||
inventory_image = "homedecor_skylight_inv.png",
|
inventory_image = "homedecor_skylight_inv.png",
|
||||||
groups = { snappy = 3, dig_tree = 2 },
|
groups = { snappy = 3, dig_tree = 2 },
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
|
Loading…
Reference in New Issue