-
Notifications
You must be signed in to change notification settings - Fork 5
Make posters dyeable (should be backward-compatible with existing ones) #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
yl-whosit
commented
Mar 30, 2025
- set signs param2 to colorfacedir
- make signs use a color palette and hardware coloring
- add poster coloring crafting recipes and optional depend on dye

- make signs use a color palette and hardware coloring - add poster coloring crafting recipes and optional depend on dye
Niklp09
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this!
Would be nice if you could try to follow the code style of the project, it looks broken both in codium and on gh.
Compress the new textures, they're unreasonably large.
I usually use
alias op='find . -type f -iname "*.png" -not -iname "screenshot*" -exec optipng -o7 -zm1-9 -nc -strip all -clobber {} \;'
signs/crafts.lua
Outdated
| if minetest.registered_items["dye:red"] then | ||
| local dyes = { | ||
| "dye:white", | ||
| "dye:grey", | ||
| "dye:orange", | ||
| "dye:brown", | ||
| "dye:dark_grey", | ||
| "dye:yellow", | ||
| "dye:green", | ||
| "dye:red", | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use xcompat?
Supported dye items: https://github.com/mt-mods/xcompat/blob/8d6e82cfdbbc84bdb63791caa05376c01bb83275/src/materials/minetest.lua#L28-L42
signs/crafts.lua
Outdated
| minetest.register_craft({ | ||
| type = "shaped", | ||
| output = minetest.itemstring_with_palette("signs:paper_poster", (i-1) * 32), | ||
| recipe = { | ||
| { "signs:paper_poster", dye, "" }, | ||
| { "", "", "" }, | ||
| { "", "", "" }, | ||
| } | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd go w/ shapeless, since using shapeless crafting isn't a performance problem anymore. (you decide:)
| minetest.register_craft({ | |
| type = "shaped", | |
| output = minetest.itemstring_with_palette("signs:paper_poster", (i-1) * 32), | |
| recipe = { | |
| { "signs:paper_poster", dye, "" }, | |
| { "", "", "" }, | |
| { "", "", "" }, | |
| } | |
| }) | |
| minetest.register_craft({ | |
| type = "shapeless", | |
| output = minetest.itemstring_with_palette("signs:paper_poster", (i-1) * 32), | |
| recipe = {"signs:paper_poster", dye} | |
| }) |
|
Sorry about space/tab mix, I had to hunt down those spaces using emacs Please tell me if there are any other issues. Also please squash :D |
|
I'm also now wondering if those textures are a little too rough, and should be made a smidge lighter (seemed to fit "medieval" theme we have on YL :p) |
Niklp09
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have to check for xcompat as it is a hard dependency, LGTM otherwise.
Thanks!
|
Oops, fixed. |