2021-02-15 14:52:58 -05:00
|
|
|
using System;
|
2021-01-10 10:08:12 -05:00
|
|
|
using System.Collections.Generic;
|
2021-02-15 14:52:58 -05:00
|
|
|
using System.Text.Json.Serialization;
|
2021-04-29 10:44:37 -04:00
|
|
|
// ReSharper disable ClassNeverInstantiated.Global
|
|
|
|
// ReSharper disable UnusedMember.Global
|
2021-01-10 10:08:12 -05:00
|
|
|
|
|
|
|
namespace GoldbergGUI.Core.Models
|
|
|
|
{
|
2021-01-15 11:46:13 -05:00
|
|
|
public class GoldbergGlobalConfiguration
|
|
|
|
{
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Name of the user
|
|
|
|
/// </summary>
|
2021-01-15 11:46:13 -05:00
|
|
|
public string AccountName { get; set; }
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Steam64ID of the user
|
|
|
|
/// </summary>
|
2021-01-15 11:46:13 -05:00
|
|
|
public long UserSteamId { get; set; }
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// language to be used
|
|
|
|
/// </summary>
|
2021-01-15 11:46:13 -05:00
|
|
|
public string Language { get; set; }
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Custom broadcast addresses (IPv4 or domain addresses)
|
|
|
|
/// </summary>
|
2021-02-15 14:52:58 -05:00
|
|
|
public List<string> CustomBroadcastIps { get; set; }
|
2021-01-15 11:46:13 -05:00
|
|
|
}
|
2021-01-10 10:08:12 -05:00
|
|
|
public class GoldbergConfiguration
|
|
|
|
{
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// App ID of the game
|
|
|
|
/// </summary>
|
2021-01-10 10:08:12 -05:00
|
|
|
public int AppId { get; set; }
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// List of DLC
|
|
|
|
/// </summary>
|
2021-04-28 07:33:04 -04:00
|
|
|
public List<DlcApp> DlcList { get; set; }
|
2021-02-15 14:52:58 -05:00
|
|
|
|
2021-04-28 11:14:29 -04:00
|
|
|
public List<int> Depots { get; set; }
|
2021-02-15 14:52:58 -05:00
|
|
|
|
2021-02-17 08:27:54 -05:00
|
|
|
public List<Group> SubscribedGroups { get; set; }
|
2021-02-15 14:52:58 -05:00
|
|
|
|
2021-04-28 07:33:04 -04:00
|
|
|
//public List<AppPath> AppPaths { get; set; }
|
2021-02-15 14:52:58 -05:00
|
|
|
|
|
|
|
public List<Achievement> Achievements { get; set; }
|
|
|
|
|
|
|
|
public List<Item> Items { get; set; }
|
|
|
|
|
|
|
|
public List<Leaderboard> Leaderboards { get; set; }
|
|
|
|
|
|
|
|
public List<Stat> Stats { get; set; }
|
|
|
|
|
|
|
|
// Add controller setting here!
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Set offline mode.
|
|
|
|
/// </summary>
|
2021-01-10 10:08:12 -05:00
|
|
|
public bool Offline { get; set; }
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Disable networking (game is set to online, however all outgoing network connectivity will be disabled).
|
|
|
|
/// </summary>
|
2021-01-10 10:08:12 -05:00
|
|
|
public bool DisableNetworking { get; set; }
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Disable overlay (experimental only).
|
|
|
|
/// </summary>
|
2021-01-10 10:08:12 -05:00
|
|
|
public bool DisableOverlay { get; set; }
|
2021-02-15 14:52:58 -05:00
|
|
|
|
|
|
|
public GoldbergGlobalConfiguration OverwrittenGlobalConfiguration { get; set; }
|
|
|
|
}
|
|
|
|
|
2021-04-28 07:33:04 -04:00
|
|
|
public class DlcApp : SteamApp
|
2021-02-17 08:27:54 -05:00
|
|
|
{
|
2021-08-29 16:42:33 -04:00
|
|
|
public DlcApp() { }
|
|
|
|
|
|
|
|
public DlcApp(SteamApp steamApp)
|
|
|
|
{
|
|
|
|
this.AppId = steamApp.AppId;
|
|
|
|
this.Name = steamApp.Name;
|
|
|
|
this.ComparableName = steamApp.ComparableName;
|
|
|
|
this.AppType = steamApp.AppType;
|
|
|
|
this.LastModified = steamApp.LastModified;
|
|
|
|
this.PriceChangeNumber = steamApp.PriceChangeNumber;
|
|
|
|
}
|
|
|
|
|
2021-04-28 07:51:06 -04:00
|
|
|
/// <summary>
|
|
|
|
/// Path to DLC (relative to Steam API DLL) (optional)
|
|
|
|
/// </summary>
|
2021-04-28 07:33:04 -04:00
|
|
|
public string AppPath { get; set; }
|
2021-02-17 08:27:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public class Group
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// ID of group (https://steamcommunity.com/gid/103582791433980119/memberslistxml/?xml=1).
|
|
|
|
/// </summary>
|
|
|
|
public int GroupId { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// Name of group.
|
|
|
|
/// </summary>
|
|
|
|
public string GroupName { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// App ID of game associated with group (https://steamcommunity.com/games/218620/memberslistxml/?xml=1).
|
|
|
|
/// </summary>
|
|
|
|
public int AppId { get; set; }
|
|
|
|
}
|
|
|
|
|
2021-02-15 14:52:58 -05:00
|
|
|
public class Achievement
|
|
|
|
{
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Achievement description.
|
|
|
|
/// </summary>
|
2021-02-15 14:52:58 -05:00
|
|
|
[JsonPropertyName("description")]
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
2021-04-29 10:44:37 -04:00
|
|
|
/// Human readable name, as shown on webpage, game library, overlay, etc.
|
2021-02-17 08:27:54 -05:00
|
|
|
/// </summary>
|
2021-02-15 14:52:58 -05:00
|
|
|
[JsonPropertyName("displayName")]
|
|
|
|
public string DisplayName { get; set; }
|
|
|
|
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Is achievement hidden? 0 = false, else true.
|
|
|
|
/// </summary>
|
2021-02-15 14:52:58 -05:00
|
|
|
[JsonPropertyName("hidden")]
|
2021-02-17 08:27:54 -05:00
|
|
|
public int Hidden { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Path to icon when unlocked (colored).
|
|
|
|
/// </summary>
|
2021-02-15 14:52:58 -05:00
|
|
|
[JsonPropertyName("icon")]
|
|
|
|
public string Icon { get; set; }
|
|
|
|
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Path to icon when locked (grayed out).
|
|
|
|
/// </summary>
|
2021-04-29 10:44:37 -04:00
|
|
|
// ReSharper disable once StringLiteralTypo
|
2021-02-15 14:52:58 -05:00
|
|
|
[JsonPropertyName("icongray")]
|
|
|
|
public string IconGray { get; set; }
|
|
|
|
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Internal name.
|
|
|
|
/// </summary>
|
2021-02-15 14:52:58 -05:00
|
|
|
[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; }
|
|
|
|
|
2021-04-29 10:44:37 -04:00
|
|
|
// ReSharper disable once StringLiteralTypo
|
2021-02-15 14:52:58 -05:00
|
|
|
[JsonPropertyName("workshopid")]
|
|
|
|
// [JsonConverter(typeof(FluffyParseStringConverter))]
|
2021-04-29 10:44:37 -04:00
|
|
|
public long WorkshopId { get; set; }
|
2021-02-15 14:52:58 -05:00
|
|
|
|
|
|
|
[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
|
|
|
|
}
|
2021-01-10 10:08:12 -05:00
|
|
|
}
|
|
|
|
}
|