Skip to content

Commit

Permalink
Add Item Tracking in-game
Browse files Browse the repository at this point in the history
  • Loading branch information
PoryGone committed Feb 9, 2024
1 parent 7fc8e58 commit 2dd1ca6
Show file tree
Hide file tree
Showing 18 changed files with 82 additions and 0 deletions.
Binary file added Content/Sprites/Breakables_Filled.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Breakables_Grey.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Cassettes_Filled.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Cassettes_Grey.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Coins_Filled.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Coins_Grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Dash_Filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Dash_Grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/DoubleDash_Filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/DoubleDash_Grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Feather_Filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Feather_Grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Springs_Filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Springs_Grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Traffic_Filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/Sprites/Traffic_Grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions Source/Helpers/UI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,85 @@ public static void DeathLinks(Batcher batch, int count, int req, in Vec2 at, flo
Icon(batch, "icon_skull", $"x{count:00}/{req:00}", at, align);
}

public static void Items(Batcher batch, in Vec2 at, float align = 0)
{
Vec2 pos = at;
if (Save.CurrentRecord.GetFlag("Breakables") == 0)
{
Icon(batch, "Breakables_Grey", "", pos, align);
}
else
{
Icon(batch, "Breakables_Filled", "", pos, align);
}
pos.X += (UI.IconSize + 8);
if (Save.CurrentRecord.GetFlag("Cassette") == 0)
{
Icon(batch, "Cassettes_Grey", "", pos, align);
}
else
{
Icon(batch, "Cassettes_Filled", "", pos, align);
}
pos.X -= (UI.IconSize + 8);
pos.Y += (UI.IconSize + 8);
if (Save.CurrentRecord.GetFlag("Coin") == 0)
{
Icon(batch, "Coins_Grey", "", pos, align);
}
else
{
Icon(batch, "Coins_Filled", "", pos, align);
}
pos.X += (UI.IconSize + 8);
if (Save.CurrentRecord.GetFlag("DashRefill") == 0)
{
Icon(batch, "Dash_Grey", "", pos, align);
}
else
{
Icon(batch, "Dash_Filled", "", pos, align);
}
pos.X -= (UI.IconSize + 8);
pos.Y += (UI.IconSize + 8);
if (Save.CurrentRecord.GetFlag("DoubleDashRefill") == 0)
{
Icon(batch, "DoubleDash_Grey", "", pos, align);
}
else
{
Icon(batch, "DoubleDash_Filled", "", pos, align);
}
pos.X += (UI.IconSize + 8);
if (Save.CurrentRecord.GetFlag("Feather") == 0)
{
Icon(batch, "Feather_Grey", "", pos, align);
}
else
{
Icon(batch, "Feather_Filled", "", pos, align);
}
pos.X -= (UI.IconSize + 8);
pos.Y += (UI.IconSize + 8);
if (Save.CurrentRecord.GetFlag("Spring") == 0)
{
Icon(batch, "Springs_Grey", "", pos, align);
}
else
{
Icon(batch, "Springs_Filled", "", pos, align);
}
pos.X += (UI.IconSize + 8);
if (Save.CurrentRecord.GetFlag("TrafficBlock") == 0)
{
Icon(batch, "Traffic_Grey", "", pos, align);
}
else
{
Icon(batch, "Traffic_Filled", "", pos, align);
}
}

public static void Prompt(Batcher batch, VirtualButton button, string label, in Vec2 at, out float width, float align = 0)
{
var pos = at;
Expand Down
3 changes: 3 additions & 0 deletions Source/Scenes/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,10 @@ public override void Render(Target target)
if (Game.Instance.ArchipelagoManager.DeathLink)
{
UI.DeathLinks(batch, Game.Instance.ArchipelagoManager.DeathsCounted, Game.Instance.ArchipelagoManager.DeathLinkAmnesty, pos);
pos.Y += (UI.IconSize + 8);
}

UI.Items(batch, pos, 0);
}

// show version number when paused / in ending area
Expand Down

0 comments on commit 2dd1ca6

Please sign in to comment.