Skip to content

Commit

Permalink
Add easy shortcut for getting an icon
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Aug 11, 2024
1 parent c256cdd commit 30858f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Refresh.GameServer/Types/Data/DataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ public class DataContext
public GameUser? User => this.Token?.User;
public TokenGame Game => this.Token?.TokenGame ?? TokenGame.Website;
public TokenPlatform Platform => this.Token?.TokenPlatform ?? TokenPlatform.Website;

public string GetIconFromHash(string hash)
{
return this.Database.GetAssetFromHash(hash)?.GetAsIcon(this.Game, this) ?? hash;
}
}

0 comments on commit 30858f2

Please sign in to comment.