v1.3.0.1 (Epic Store release)

This commit is contained in:
Regalis11
2024-03-28 18:34:33 +02:00
parent 81ca8637be
commit 3791670c42
269 changed files with 13160 additions and 2966 deletions
@@ -0,0 +1,34 @@
using Barotrauma.Networking;
using Barotrauma.Steam;
namespace Barotrauma;
static class SocialExtensions
{
public static LocalizedString ViewProfileLabel(this AccountId accountId)
=> accountId switch
{
SteamId => TextManager.Get("ViewSteamProfile"),
EpicAccountId => TextManager.Get("ViewEpicProfile"),
_ => "View profile of unknown origin"
};
public static void OpenProfile(this AccountId accountId)
{
string url = accountId switch
{
SteamId steamId => $"https://steamcommunity.com/profiles/{steamId.Value}",
EpicAccountId epicAccountId => $"https://store.epicgames.com/u/{epicAccountId.EosStringRepresentation}",
_ => ""
};
if (SteamManager.IsInitialized)
{
SteamManager.OverlayCustomUrl(url);
}
else
{
GameMain.ShowOpenUriPrompt(url);
}
}
}