mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 06:43:17 -04:00
set_texture()
This commit is contained in:
parent
6605724fe1
commit
df0b9ff675
1 changed files with 7 additions and 0 deletions
|
@ -71,6 +71,13 @@ function player_api.set_textures(player, textures)
|
||||||
player:set_properties({textures = textures or model_textures})
|
player:set_properties({textures = textures or model_textures})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function player_api.set_texture(player, texture, texture_ID)
|
||||||
|
local ID = not texture_ID and 1 or texture_ID
|
||||||
|
local new_textures = player:get_properties().textures
|
||||||
|
new_textures[ID] = texture
|
||||||
|
player:set_properties({textures = new_textures})
|
||||||
|
end
|
||||||
|
|
||||||
function player_api.set_animation(player, anim_name, speed)
|
function player_api.set_animation(player, anim_name, speed)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if player_anim[name] == anim_name then
|
if player_anim[name] == anim_name then
|
||||||
|
|
Loading…
Add table
Reference in a new issue