mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 20:41:11 +01:00
fix donkey chest texture
This commit is contained in:
parent
9602b564c4
commit
7cabdb1707
1 changed files with 11 additions and 9 deletions
|
@ -238,18 +238,20 @@ local horse = {
|
||||||
local heal = 0
|
local heal = 0
|
||||||
|
|
||||||
if self._inv_id then
|
if self._inv_id then
|
||||||
if not self._has_chest and item:get_name() == "mcl_chests:chest" then
|
if not self._chest and item:get_name() == "mcl_chests:chest" then
|
||||||
item:take_item()
|
item:take_item()
|
||||||
clicker:set_wielded_item(item)
|
clicker:set_wielded_item(item)
|
||||||
self._has_chest = true
|
self._chest = true
|
||||||
local tex_chest = "mcl_chests_normal.png"
|
-- Update texture
|
||||||
self.base_texture = table.copy(self.base_texture)
|
if not self._naked_texture then
|
||||||
self.base_texture[1] = tex_chest
|
-- Base horse texture without chest or saddle
|
||||||
self.object:set_properties({
|
self._naked_texture = self.base_texture[2]
|
||||||
textures = self.base_texture,
|
end
|
||||||
})
|
local tex = horse_extra_texture(self)
|
||||||
|
self.base_texture = tex
|
||||||
|
self.object:set_properties({textures = self.base_texture})
|
||||||
table.insert(self.drops,{name = "mcl_chests:chest",chance=1,min=1,max=1})
|
table.insert(self.drops,{name = "mcl_chests:chest",chance=1,min=1,max=1})
|
||||||
elseif self._has_chest and clicker:get_player_control().sneak then
|
elseif self._chest and clicker:get_player_control().sneak then
|
||||||
mcl_entity_invs.show_inv_form(self,clicker,"Donkey")
|
mcl_entity_invs.show_inv_form(self,clicker,"Donkey")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue