phase out separate colors of shutter textures
in favor of colorizing a base texture also all-new inventory image
|
@ -3,36 +3,40 @@
|
||||||
local S = homedecor.gettext
|
local S = homedecor.gettext
|
||||||
|
|
||||||
local shutters = {
|
local shutters = {
|
||||||
{"oak", "Unpainted oak"},
|
{"oak", "Unpainted oak", "#bf8a51:200" },
|
||||||
{"mahogany", "Mahogany"},
|
{"mahogany", "Mahogany", "#822606:200" },
|
||||||
{"red", "Red"},
|
{"red", "Red", "#d00000:150" },
|
||||||
{"yellow", "Yellow"},
|
{"yellow", "Yellow", "#ffff00:150" },
|
||||||
{"forest_green", "Forest green"},
|
{"forest_green", "Forest green", "#006000:150" },
|
||||||
{"light_blue", "Light blue"},
|
{"light_blue", "Light blue", "#1963c7:150" },
|
||||||
{"violet", "Violet"},
|
{"violet", "Violet", "#6000ff:150" },
|
||||||
{"black", "Black"},
|
{"black", "Black", "#000000:200" },
|
||||||
{"dark_grey", "Dark grey"},
|
{"dark_grey", "Dark grey", "#202020:200" },
|
||||||
{"grey", "Grey"},
|
{"grey", "Grey", "#c0c0c0:150" },
|
||||||
{"white", "White"},
|
{"white", "White", "#ffffff:150" },
|
||||||
}
|
}
|
||||||
|
|
||||||
local shutter_cbox = {
|
local shutter_cbox = {
|
||||||
type = "wallmounted",
|
type = "wallmounted",
|
||||||
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||||
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 },
|
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 }
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in ipairs(shutters) do
|
for i in ipairs(shutters) do
|
||||||
local name = shutters[i][1]
|
local name = shutters[i][1]
|
||||||
local desc = shutters[i][2]
|
local desc = shutters[i][2]
|
||||||
|
local hue = shutters[i][3]
|
||||||
|
|
||||||
|
local tile = "homedecor_window_shutter.png^[colorize:"..hue
|
||||||
|
local inv = "homedecor_window_shutter_inv.png^[colorize:"..hue
|
||||||
|
|
||||||
homedecor.register("shutter_"..name, {
|
homedecor.register("shutter_"..name, {
|
||||||
mesh = "homedecor_window_shutter.obj",
|
mesh = "homedecor_window_shutter.obj",
|
||||||
tiles = { "homedecor_window_shutter_"..name..".png" },
|
tiles = { tile },
|
||||||
description = S("Wooden Shutter ("..desc..")"),
|
description = S("Wooden Shutter ("..desc..")"),
|
||||||
inventory_image = "homedecor_window_shutter_"..name.."_inv.png",
|
inventory_image = inv,
|
||||||
wield_image = "homedecor_window_shutter_"..name.."_inv.png",
|
wield_image = inv,
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
@ -45,3 +49,4 @@ for i in ipairs(shutters) do
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
||||||
|
|
||||||
|
|
BIN
homedecor/textures/homedecor_window_shutter.png
Normal file
After Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 513 B |
Before Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 308 B |
BIN
homedecor/textures/homedecor_window_shutter_inv.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 1003 B |
Before Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 560 B |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 596 B |