Skip to content
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

enhancement request: more colors (support for https://gitlab.com/VanessaE/unifieddyes) #2

Open
superfloh247 opened this issue May 20, 2021 · 4 comments

Comments

@superfloh247
Copy link

Hi,

how can more colors be added to basic_colors?
eg. dye:turquoise or dye:medium_green

I think they come from the mod https://gitlab.com/VanessaE/unifieddyes

can you give me a hint how to support https://gitlab.com/VanessaE/unifieddyes and add all colors to clothing?

@superfloh247 superfloh247 changed the title enhancement request: more colors enhancement request: more colors (support for https://gitlab.com/VanessaE/unifieddyes) May 20, 2021
@sfence
Copy link
Owner

sfence commented May 25, 2021

Hi,

how can more colors be added to basic_colors?
eg. dye:turquoise or dye:medium_green

I think they come from the mod https://gitlab.com/VanessaE/unifieddyes

can you give me a hint how to support https://gitlab.com/VanessaE/unifieddyes and add all colors to clothing?

Hi.
Colors is defined in file colors_pictures.lua.

So, it should be enough to add some code like

if (minetest.get_modpath(unifieddyes)~=nil) then
   for _,unified_color in pairs(all_unified_colors) do
     basic_colors[color_key] = {
        color = S("Color name"),
        hex = "HEXCOLORCODE"
     }
  end
end

after basic_colors definition in colors_pictures.lua.

@superfloh247
Copy link
Author

I managed to add unifieddyes basic colors to clothing, without replacing existing clothing colors.
But that's no even half the work, now I have to add wool crafting items, PNG graphics, ...

@sfence
Copy link
Owner

sfence commented May 28, 2021

I managed to add unifieddyes basic colors to clothing, without replacing existing clothing colors.
But that's no even half the work, now I have to add wool crafting items, PNG graphics, ...

I have used for most items in clothing pictures colored by [multiply: texture attribute.
So it should be enough to set correct color codes to the table.

@superfloh247
Copy link
Author

wow, a whole lot of beautiful API yet to discover :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants