Adjusts to also hide impossible item silhouettes

This commit is contained in:
Mark Suckerberg
2025-12-30 17:53:57 -06:00
parent 2d2faebd10
commit 0f4ba92de5
2 changed files with 5 additions and 4 deletions

View File

@@ -45,9 +45,11 @@ namespace game::window
for (int index = 0; index < Item::ITEM_COUNT; index++)
{
if (index == Item::INVALID) continue;
auto type = (Item::Type)index;
auto seen = values.contains(type);
//Hide invalid items and impossible-to-obtain items when not seen.
if (!seen && (Item::CATEGORIES[type] == Item::INVALID || Item::RARITIES[type] == Item::IMPOSSIBLE)) continue;
auto columns = (int)(texture.size.x / ITEM_SIZE.x);
auto crop = vec2(type % columns, type / columns) * ITEM_SIZE;
@@ -59,7 +61,6 @@ namespace game::window
auto cursorScreenPos = ImGui::GetCursorScreenPos();
auto quantity = 0;
auto seen = values.contains(type);
if (seen)
{

View File

@@ -115,7 +115,7 @@ namespace game::window
ImGui::PushItemWidth(100);
for (int i = 0; i < Item::ITEM_COUNT; i++)
{
if (i == Item::INVALID) continue;
if (Item::CATEGORIES[i] == Item::INVALID) continue;
ImGui::PushID(i);
//TODO: Probably a cleaner way to do this, maybe