mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 00:20:17 +01:00
use static hardware coloring for books,
use soft overlays for cover trim,
This commit is contained in:
parent
914aee41fe
commit
c9c4214bff
@ -3,12 +3,12 @@ local S = homedecor_i18n.gettext
|
|||||||
local function N_(x) return x end
|
local function N_(x) return x end
|
||||||
|
|
||||||
local bookcolors = {
|
local bookcolors = {
|
||||||
{ N_("red"), "#c00000:150" },
|
{ N_("red"), 0xffd26466 },
|
||||||
{ N_("green"), "#008000:150" },
|
{ N_("green"), 0xff62aa66 },
|
||||||
{ N_("blue"), "#4040c0:150" },
|
{ N_("blue"), 0xff8686d7 },
|
||||||
{ N_("violet"), "#600070:150" },
|
{ N_("violet"), 0xff9c65a7 },
|
||||||
{ N_("grey"), "#202020:150" },
|
{ N_("grey"), 0xff757579 },
|
||||||
{ N_("brown"), "#603010:175" }
|
{ N_("brown"), 0xff896958 }
|
||||||
}
|
}
|
||||||
|
|
||||||
local BOOK_FORMNAME = "homedecor:book_form"
|
local BOOK_FORMNAME = "homedecor:book_form"
|
||||||
@ -38,17 +38,17 @@ for _, c in ipairs(bookcolors) do
|
|||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local inv_img = "homedecor_book_inv.png^[colorize:"..hue.."^homedecor_book_trim_inv.png"
|
|
||||||
|
|
||||||
homedecor.register("book_"..color, {
|
homedecor.register("book_"..color, {
|
||||||
description = S("Writable Book (@1)", S(color)),
|
description = S("Writable Book (@1)", S(color)),
|
||||||
mesh = "homedecor_book.obj",
|
mesh = "homedecor_book.obj",
|
||||||
tiles = {
|
tiles = {
|
||||||
"(homedecor_book_cover.png^[colorize:"..hue..")^homedecor_book_cover_trim.png",
|
{ name = "homedecor_book_cover.png", color = hue },
|
||||||
"homedecor_book_edges.png"
|
{ name = "homedecor_book_edges.png", color = "white" }
|
||||||
|
},
|
||||||
|
overlay_tiles = {
|
||||||
|
{ name = "homedecor_book_cover_trim.png", color = "white" },
|
||||||
|
""
|
||||||
},
|
},
|
||||||
inventory_image = inv_img,
|
|
||||||
wield_image = inv_img,
|
|
||||||
groups = { snappy=3, oddly_breakable_by_hand=3, book=1 },
|
groups = { snappy=3, oddly_breakable_by_hand=3, book=1 },
|
||||||
walkable = false,
|
walkable = false,
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
@ -104,9 +104,9 @@ for _, c in ipairs(bookcolors) do
|
|||||||
homedecor.register("book_open_"..color, {
|
homedecor.register("book_open_"..color, {
|
||||||
mesh = "homedecor_book_open.obj",
|
mesh = "homedecor_book_open.obj",
|
||||||
tiles = {
|
tiles = {
|
||||||
"(homedecor_book_cover.png^[colorize:"..hue..")^homedecor_book_cover_trim.png",
|
{ name = "homedecor_book_cover.png", color = hue },
|
||||||
"homedecor_book_edges.png",
|
{ name = "homedecor_book_edges.png", color = "white" },
|
||||||
"homedecor_book_pages.png"
|
{ name = "homedecor_book_pages.png", color = "white" }
|
||||||
},
|
},
|
||||||
groups = { snappy=3, oddly_breakable_by_hand=3, not_in_creative_inventory=1 },
|
groups = { snappy=3, oddly_breakable_by_hand=3, not_in_creative_inventory=1 },
|
||||||
drop = "homedecor:book_"..color,
|
drop = "homedecor:book_"..color,
|
||||||
|
Loading…
Reference in New Issue
Block a user