private void SceneLoaded(TCScene scene) { if (client != null) { Activity presence = new() { Assets = new ActivityAssets { LargeImage = scene.largeImageKey, LargeText = scene.LargeImageKeyText } }; if (scene.showStartTime) { presence.Timestamps = new ActivityTimestamps { Start = TimeHelper.UnixTimeNow() } } ; if (scene.isOnlineScene) { presence.Details = TCScenesManager.GetActiveScene().DisplayNameLocalized; presence.State = "Team Capture"; } else if (scene.isMainMenu) { presence.Details = "Main Menu"; } else if (!scene.isMainMenu && !scene.isOnlineScene) { presence.Details = "Loading..."; } else { Logger.Error("You CANNOT have an online scene and a main menu scene!"); } UpdateActivity(presence); } } #endregion } }
public static ActivityAssets AddSmallText(this ActivityAssets assets, string smallText) { assets.SmallText = smallText; return assets; }
public static ActivityAssets AddSmallImage(this ActivityAssets assets, string smallImage) { assets.SmallImage = smallImage; return assets; }
public static ActivityAssets AddLargeText(this ActivityAssets assets, string largeText) { assets.LargeText = largeText; return assets; }
public static ActivityAssets AddLargeImage(this ActivityAssets assets, string largeImage) { assets.LargeImage = largeImage; return assets; }
public static Activity AddAssets(this Activity activity, ActivityAssets value) { activity.Assets = value; return activity; }