mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-11-13 05:40:36 +01:00
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},
|
||||
}
|
||||
|
||||
local wtex = "default_junglewood.png"
|
||||
if not minetest.get_modpath("default") then
|
||||
wtex = "[combine:16x16^[noalpha^[colorize:#563d2d"
|
||||
end
|
||||
local wtex = homedecor.textures.default_junglewood
|
||||
|
||||
minetest.register_node("fake_fire:fancy_fire", {
|
||||
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 wood_tex = "default_wood.png"
|
||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
||||
local water_tex = "default_water.png"
|
||||
if not minetest.get_modpath("default") then water_tex = "[combine:16x16^[noalpha^[colorize:#00008b" end
|
||||
local wood_tex = homedecor.textures.default_wood
|
||||
local water_tex = homedecor.textures.water
|
||||
|
||||
homedecor.register("bathroom_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 wood_tex, wool_tex = "default_wood.png", "wool_white.png"
|
||||
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 wood_tex, wool_tex = homedecor.textures.default_wood, homedecor.textures.wool_white
|
||||
|
||||
local bed_sbox = {
|
||||
type = "wallmounted",
|
||||
|
|
|
@ -7,7 +7,7 @@ homedecor.register("air_conditioner", {
|
|||
mesh = "homedecor_ac.obj",
|
||||
tiles = {
|
||||
"homedecor_ac.png",
|
||||
homedecor.glass
|
||||
homedecor.textures.glass
|
||||
},
|
||||
groups = { snappy = 3, dig_stone = 3 },
|
||||
use_texture_alpha = "clip",
|
||||
|
|
|
@ -135,7 +135,7 @@ homedecor.register("grandfather_clock", {
|
|||
description = S("Grandfather Clock"),
|
||||
mesh = "homedecor_grandfather_clock.obj",
|
||||
tiles = {
|
||||
homedecor.glass,
|
||||
homedecor.textures.glass,
|
||||
"homedecor_grandfather_clock_face.png",
|
||||
homedecor.lux_wood,
|
||||
"homedecor_grandfather_clock_face_edge.png",
|
||||
|
|
|
@ -49,32 +49,17 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
|||
return isceiling, pos
|
||||
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_dark_grey = 0xff606060
|
||||
homedecor.color_med_grey = 0xffa0a0a0
|
||||
|
||||
-- load different handler subsystems
|
||||
dofile(modpath.."/textures.lua")
|
||||
dofile(modpath.."/materials.lua")
|
||||
dofile(modpath.."/nodeboxes.lua")
|
||||
dofile(modpath.."/expansion.lua")
|
||||
dofile(modpath.."/furnaces.lua")
|
||||
dofile(modpath.."/inventory.lua")
|
||||
dofile(modpath.."/materials.lua")
|
||||
dofile(modpath.."/registration.lua")
|
||||
dofile(modpath.."/water_particles.lua")
|
||||
dofile(modpath.."/sit.lua")
|
||||
|
|
32
homedecor_common/textures.lua
Normal file
32
homedecor_common/textures.lua
Normal file
|
@ -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")
|
||||
|
||||
local wood_tex = "default_wood.png"
|
||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
||||
local wood_tex = homedecor.textures.default_wood
|
||||
|
||||
homedecor.register("doghouse", {
|
||||
mesh = "homedecor_doghouse.obj",
|
||||
|
|
|
@ -5,8 +5,7 @@ local ob_cbox = {
|
|||
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
|
||||
local wood_tex = "default_wood.png"
|
||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
||||
local wood_tex = homedecor.textures.default_wood
|
||||
|
||||
homedecor.register("openframe_bookshelf", {
|
||||
description = S("Bookshelf (open-frame)"),
|
||||
|
|
|
@ -145,8 +145,7 @@ homedecor.register("dishwasher_"..m, {
|
|||
})
|
||||
end
|
||||
|
||||
local wood_tex = "default_wood.png"
|
||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
||||
local wood_tex = homedecor.textures.default_wood
|
||||
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"
|
||||
|
||||
|
|
|
@ -11,12 +11,8 @@ local S = minetest.get_translator("homedecor_misc")
|
|||
|
||||
homedecor_misc = {}
|
||||
|
||||
local wool_black, wool_grey, wood_tex = "wool_black.png", "wool_grey.png", "default_wood.png"
|
||||
if not minetest.get_modpath("wool") then
|
||||
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
|
||||
local wool_black, wool_grey = homedecor.textures.wool_black, homedecor.textures.wool_grey
|
||||
local wood_tex = homedecor.textures.default_wood
|
||||
|
||||
homedecor.register("ceiling_paint", {
|
||||
description = S("Textured Ceiling Paint"),
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
local S = minetest.get_translator("homedecor_pictures_and_paintings")
|
||||
|
||||
local wood_tex
|
||||
if minetest.get_modpath("default") then
|
||||
wood_tex = "default_wood.png"
|
||||
else
|
||||
wood_tex = "[combine:16x16^[noalpha^[colorize:#563d2d"
|
||||
end
|
||||
local wood_tex = homedecor.textures.default_wood
|
||||
|
||||
local pframe_cbox = {
|
||||
type = "fixed",
|
||||
|
|
|
@ -5,8 +5,8 @@ homedecor_roofing = {}
|
|||
minetest.register_node(":homedecor:skylight", {
|
||||
description = S("Glass Skylight"),
|
||||
drawtype = "raillike",
|
||||
tiles = { homedecor.glass },
|
||||
wield_image = homedecor.glass,
|
||||
tiles = { homedecor.textures.glass },
|
||||
wield_image = homedecor.textures.glass,
|
||||
inventory_image = "homedecor_skylight_inv.png",
|
||||
groups = { snappy = 3, dig_tree = 2 },
|
||||
paramtype = "light",
|
||||
|
|
Loading…
Reference in New Issue
Block a user