using System; using System.Collections.Generic; using System.Text.Json.Serialization; // ReSharper disable ClassNeverInstantiated.Global // ReSharper disable UnusedMember.Global namespace GoldbergGUI.Core.Models { public class GoldbergGlobalConfiguration { /// /// Name of the user /// public string AccountName { get; set; } /// /// Steam64ID of the user /// public long UserSteamId { get; set; } /// /// language to be used /// public string Language { get; set; } /// /// Custom broadcast addresses (IPv4 or domain addresses) /// public List CustomBroadcastIps { get; set; } } public class GoldbergConfiguration { /// /// App ID of the game /// public int AppId { get; set; } /// /// List of DLC /// public List DlcList { get; set; } public List Depots { get; set; } public List SubscribedGroups { get; set; } //public List AppPaths { get; set; } public List Achievements { get; set; } public List Items { get; set; } public List Leaderboards { get; set; } public List Stats { get; set; } // Add controller setting here! /// /// Set offline mode. /// public bool Offline { get; set; } /// /// Disable networking (game is set to online, however all outgoing network connectivity will be disabled). /// public bool DisableNetworking { get; set; } /// /// Disable overlay (experimental only). /// public bool DisableOverlay { get; set; } public GoldbergGlobalConfiguration OverwrittenGlobalConfiguration { get; set; } } public class DlcApp : SteamApp { public DlcApp() { } public DlcApp(SteamApp steamApp) { AppId = steamApp.AppId; Name = steamApp.Name; ComparableName = steamApp.ComparableName; AppType = steamApp.AppType; LastModified = steamApp.LastModified; PriceChangeNumber = steamApp.PriceChangeNumber; } /// /// Path to DLC (relative to Steam API DLL) (optional) /// public string AppPath { get; set; } } public class Group { /// /// ID of group (https://steamcommunity.com/gid/103582791433980119/memberslistxml/?xml=1). /// public int GroupId { get; set; } /// /// Name of group. /// public string GroupName { get; set; } /// /// App ID of game associated with group (https://steamcommunity.com/games/218620/memberslistxml/?xml=1). /// public int AppId { get; set; } } public class Achievement { /// /// Achievement description. /// [JsonPropertyName("description")] public string Description { get; set; } /// /// Human readable name, as shown on webpage, game library, overlay, etc. /// [JsonPropertyName("displayName")] public string DisplayName { get; set; } /// /// Is achievement hidden? 0 = false, else true. /// [JsonPropertyName("hidden")] public int Hidden { get; set; } /// /// Path to icon when unlocked (colored). /// [JsonPropertyName("icon")] public string Icon { get; set; } /// /// Path to icon when locked (grayed out). /// // ReSharper disable once StringLiteralTypo [JsonPropertyName("icongray")] public string IconGray { get; set; } /// /// Internal name. /// [JsonPropertyName("name")] public string Name { get; set; } } public class Item { [JsonPropertyName("Timestamp")] public DateTimeOffset Timestamp { get; set; } [JsonPropertyName("modified")] public string Modified { get; set; } [JsonPropertyName("date_created")] public string DateCreated { get; set; } [JsonPropertyName("type")] public string Type { get; set; } [JsonPropertyName("display_type")] public string DisplayType { get; set; } [JsonPropertyName("name")] public string Name { get; set; } [JsonPropertyName("bundle")] public string Bundle { get; set; } [JsonPropertyName("description")] public string Description { get; set; } [JsonPropertyName("background_color")] public string BackgroundColor { get; set; } [JsonPropertyName("icon_url")] public Uri IconUrl { get; set; } [JsonPropertyName("icon_url_large")] public Uri IconUrlLarge { get; set; } [JsonPropertyName("name_color")] public string NameColor { get; set; } [JsonPropertyName("tradable")] // [JsonConverter(typeof(PurpleParseStringConverter))] public bool Tradable { get; set; } [JsonPropertyName("marketable")] // [JsonConverter(typeof(PurpleParseStringConverter))] public bool Marketable { get; set; } [JsonPropertyName("commodity")] // [JsonConverter(typeof(PurpleParseStringConverter))] public bool Commodity { get; set; } [JsonPropertyName("drop_interval")] // [JsonConverter(typeof(FluffyParseStringConverter))] public long DropInterval { get; set; } [JsonPropertyName("drop_max_per_window")] // [JsonConverter(typeof(FluffyParseStringConverter))] public long DropMaxPerWindow { get; set; } // ReSharper disable once StringLiteralTypo [JsonPropertyName("workshopid")] // [JsonConverter(typeof(FluffyParseStringConverter))] public long WorkshopId { get; set; } [JsonPropertyName("tw_unique_to_own")] // [JsonConverter(typeof(PurpleParseStringConverter))] public bool TwUniqueToOwn { get; set; } [JsonPropertyName("item_quality")] // [JsonConverter(typeof(FluffyParseStringConverter))] public long ItemQuality { get; set; } [JsonPropertyName("tw_price")] public string TwPrice { get; set; } [JsonPropertyName("tw_type")] public string TwType { get; set; } [JsonPropertyName("tw_client_visible")] // [JsonConverter(typeof(FluffyParseStringConverter))] public long TwClientVisible { get; set; } [JsonPropertyName("tw_icon_small")] public string TwIconSmall { get; set; } [JsonPropertyName("tw_icon_large")] public string TwIconLarge { get; set; } [JsonPropertyName("tw_description")] public string TwDescription { get; set; } [JsonPropertyName("tw_client_name")] public string TwClientName { get; set; } [JsonPropertyName("tw_client_type")] public string TwClientType { get; set; } [JsonPropertyName("tw_rarity")] public string TwRarity { get; set; } } public class Leaderboard { public string Name { get; set; } public SortMethod SortMethodSetting { get; set; } public DisplayType DisplayTypeSetting { get; set; } public enum SortMethod { None, Ascending, Descending } public enum DisplayType { None, Numeric, TimeSeconds, TimeMilliseconds } } public class Stat { public string Name { get; set; } public StatType StatTypeSetting { get; set; } public string Value { get; set; } public enum StatType { Int, Float, AvgRate } } }