Skip to content

Commit

Permalink
update hidden item detect api usage
Browse files Browse the repository at this point in the history
  • Loading branch information
frto027 committed Jun 10, 2021
1 parent 41e06ca commit 0875565
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions patch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ WikiDic.fandomWikiInfo = {
}

WikiDic.spindownDiceSkip = {
[656] = true,
[710] = true,
[711] = true,
[713] = true,
[714] = true,
[715] = true,
-- fill it in the init function
}

WikiDic.nullVector = Vector(0,0)
Expand Down Expand Up @@ -416,6 +411,12 @@ function WikiDic:InitFonts()
WikiDic.spindownDiceItemSprites[0]:ReplaceSpritesheet(0,WikiDic.ItemConfig:GetCollectible(WikiDic.spindownDiceId).GfxFileName)
WikiDic.spindownDiceItemSprites[0]:LoadGraphics()

for i = 1,3000 do
local cfg = WikiDic.ItemConfig:GetCollectible(i)
if (not cfg) or cfg.Hidden then
WikiDic.spindownDiceSkip[i] = true
end
end
end

WikiDic.questionMarkSprite = Sprite()
Expand Down Expand Up @@ -586,7 +587,7 @@ function WikiDic:RenderCallback()
local cur_entity = entity_id
local cur_sprites_i = 1
repeat
if ItemConfig.Config.IsValidCollectible(cur_entity) and not WikiDic.spindownDiceSkip[cur_entity] then
if not WikiDic.spindownDiceSkip[cur_entity] then
WikiDic.spindownDiceItemSprites[cur_sprites_i]:ReplaceSpritesheet(0,WikiDic.ItemConfig:GetCollectible(cur_entity).GfxFileName)
WikiDic.spindownDiceItemSprites[cur_sprites_i]:LoadGraphics()
cur_sprites_i = cur_sprites_i + 1
Expand Down

0 comments on commit 0875565

Please sign in to comment.