Skip to content

Instantly share code, notes, and snippets.

@Jordach
Created February 10, 2017 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jordach/fd4e92af873a380d3fcb414d5ad196b9 to your computer and use it in GitHub Desktop.
Save Jordach/fd4e92af873a380d3fcb414d5ad196b9 to your computer and use it in GitHub Desktop.
1) Give Stu the following
- https://jordach.net/Images/ProtonArt/character.blend
- https://jordach.net/Images/ProtonArt/character.x
- https://jordach.net/Images/ProtonArt/base_armour.png
- https://jordach.net/Images/ProtonArt/base_armour_straps.png
- https://raw.githubusercontent.com/Jordach/minetest_projekt/master/mods/player_textures/textures/ptextures_transparent.png
- https://github.com/Jordach/minetest_projekt/blob/master/mods/player_textures/textures/player_singleplayer.png
Request that Stu uses the new model. Ensure Stu reads the documentation with it.
See; https://gist.github.com/Jordach/2215026d4ea928ab87c1d57f47fdfb47
2) Prepare a pull request to Minetest Game with the following files:
- https://jordach.net/Images/ProtonArt/character.blend
- https://jordach.net/Images/ProtonArt/character.x
- https://raw.githubusercontent.com/Jordach/minetest_projekt/master/mods/player_textures/textures/ptextures_transparent.png
- https://github.com/Jordach/minetest_projekt/blob/master/mods/player_textures/textures/player_singleplayer.png
Documentation for the model's materials can be found here; https://gist.github.com/Jordach/2215026d4ea928ab87c1d57f47fdfb47
Rename ptextures_transparent.png to layer_hidden.png
Rename player_singleplayer.png to character.png
3) Provide a framework for other mods to read a characters current character texture set;
default.player_texture_table[player:get_name()]
returns
{
"ptextures_transparent.png",
"player_singleplayer2.png",
"base_armour.png^base_armour_straps.png",
"base_armour.png^base_armour_straps.png",
"base_armour.png^base_armour_straps.png",
"base_armour.png^base_armour_straps.png",
"ptextures_transparent.png"
}
To update a players current texture set, do
default.player_texture_table[player:get_name()] = {
"texture_1.png",
"texture_2.png",
"texture_3.png",
"texture_4.png",
"texture_5.png",
"texture_6.png",
"texture_7.png"
}
then do player:set_properties({
textures = default.player_texture_table[player:get_name()]
})
It should be expected that a players table can be edited by any mod, - but also should be iterated over to ensure that it does not cause issues between mods applying their textures over another.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment