mt-mods / xcompat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add texture API

Niklp09 opened this issue · comments

Many (homedecor, display_modpack, etc.) mods depend on special game textures e.g. default_wood.png. It would make sense to have some kind of gamecompat here.

Propsal:
Just add a xcompat.textures.$texturename table, $texturenames should be the same as for xcompat.materials.

yes, this is on the mental todo list. potentially maybe this weekend - assuming i finish #1

i had a think about this some more. in contrast to materials, im thinking of grouping by node, so:

...
apple_tree = {
  trunk_side = "texture.png",
  trunk_top = "texture.png",
  leave = "texture.png",
  fruit = "texture.png",
}
...

as compared to/instead of

...
apple_tree_trunk_side = "texture.png",
apple_tree_trunk_top = "texture.png",
apple_tree_leave = "texture.png",
apple_tree_fruit = "texture.png"
...

I don't think they should be grouped, it doesn't make using it any easier, and it doesn't make sense for a lot of nodes that only have one texture.

Please also consider formspec textures.

My mods in particular have a need of a cross platform:

  • Arrow for crafting &etc.
  • FS background
  • primary and secondary inventory slot backgrounds
  • navigation arrow (can be rotated for either direction)
  • cancel confirm search and other fundamental UI icons
  • icons for minetest concepts such as crafting grids, blocks, plants, various item attributes, skins, etc.

Not all of these are immediately needed. Each of them would be appreciated. I'm willing to either find candidates - or perhaps make a few of them as SVGs to be rasterized.

Lazerbeak12345: i would recommend making a new issue for ui/ux textures or something, this and the linked pr is mostly for unify duplicated code we have in other mods already