fix missing horns on respawn/egg place

This commit is contained in:
tenplus1 2024-03-16 07:28:44 +00:00
parent 76c30c81c3
commit 808bbf82e9
1 changed files with 9 additions and 0 deletions

View File

@ -214,6 +214,15 @@ for _, col in ipairs(all_colours) do
return false
end,
-- fix any issue with horns by re-checking
on_spawn = function(self)
local textures = horn_texture_sel(self.attribute_horns, self.gotten)
self.object:set_properties({textures = {textures}})
self.base_texture = {textures}
end,
on_grown = function(self)
-- add the horns if we have horns when fully grown