Skip to content

Commit

Permalink
Fix crash with doc.entry_revealed
Browse files Browse the repository at this point in the history
  • Loading branch information
dacmot committed Apr 22, 2022
1 parent 4282141 commit f6de6c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reveal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,14 @@ local function async_update()
end

function doc.mark_entry_as_revealed(playername, category_id, entry_id)
if not doc.entry_revealed(playername, category_id, entry_id) then
-- Temp Fix: `doc.entry_revealed()` crashes on some items like farming:* because they're given the wrong category_id
-- if not doc.entry_revealed(playername, category_id, entry_id) then
orig_mark_entry_as_revealed(playername, category_id, entry_id)
if not next(async_update_users) then
minetest.after(0, async_update)
async_update_users[playername] = true
end
end
-- end
end


Expand Down

0 comments on commit f6de6c1

Please sign in to comment.