mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-23 07:35:16 +02:00
Add a dirty hack to auto-fix framed maps with the same IDs
This commit is contained in:
parent
ea4aec2f1e
commit
35b00a6170
1 changed files with 9 additions and 0 deletions
|
@ -191,11 +191,20 @@ function tpl_entity:set_item(itemstack, pos)
|
|||
|
||||
-- map support
|
||||
if self._map_id then
|
||||
local unran_callback = true
|
||||
mcl_maps.load_map(self._map_id, function(texture)
|
||||
unran_callback = false
|
||||
if self.object and self.object:get_pos() then
|
||||
self.object:set_properties(table_merge(map_props, {textures = {texture}}))
|
||||
end
|
||||
end)
|
||||
-- dirty recursive hack because dynamic_add_media is unreliable
|
||||
-- (and subsequently, mcl_maps.load_map is just as unreliable)
|
||||
core.after(0, function()
|
||||
if unran_callback then
|
||||
update_entity(pos)
|
||||
end
|
||||
end)
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue