Skip to content

Commit

Permalink
Fixed incrementOnly stats not showing as incrementOnly.
Browse files Browse the repository at this point in the history
  • Loading branch information
syntax-tm committed Mar 19, 2024
1 parent 4727b83 commit dfed131
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/SAM.API/Stats/Types/FloatStatInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace SAM.API.Stats;
public class FloatStatInfo : StatInfoBase<float>
{
public float DefaultValue { get; set; }
public bool IncrementOnly { get; set; }
public float MaxChange { get; set; }
public float MaxValue { get; set; }
public float MinValue { get; set; }
Expand Down
1 change: 0 additions & 1 deletion src/SAM.API/Stats/Types/IntegerStatInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace SAM.API.Stats;
public class IntegerStatInfo : StatInfoBase<int>
{
public int DefaultValue { get; set; }
public bool IncrementOnly { get; set; }
public int MaxChange { get; set; }
public int MaxValue { get; set; }
public int MinValue { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/SAM.API/Stats/Types/StatInfoBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public abstract class StatInfoBase
{
public string Id { get; protected init; }
public string DisplayName { get; protected init; }
public bool IsIncrementOnly { get; protected init; }
public bool IncrementOnly { get; protected init; }
public int Permission { get; protected init; }
public abstract UserStatType Type { get; }

Expand All @@ -13,7 +13,7 @@ public string Extra
get
{
var flags = StatFlags.None;
flags |= IsIncrementOnly == false ? 0 : StatFlags.IncrementOnly;
flags |= IncrementOnly == false ? 0 : StatFlags.IncrementOnly;
flags |= ((Permission & 2) != 0) == false ? 0 : StatFlags.Protected;
flags |= ((Permission & ~2) != 0) == false ? 0 : StatFlags.UnknownPermission;
return flags.ToString();
Expand Down
2 changes: 1 addition & 1 deletion src/SAM.Core/Stats/SteamStatisticBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public abstract class SteamStatisticBase : BindableBase

public string Id => StatInfo?.Id;
public string DisplayName => StatInfo?.DisplayName;
public bool IsIncrementOnly => StatInfo?.IsIncrementOnly ?? default;
public bool IsIncrementOnly => StatInfo?.IncrementOnly ?? default;
public int Permission => StatInfo?.Permission ?? default;
public bool IsAverageRate => StatType == StatType.AvgRate;
public bool IsFloat => StatType is StatType.Float or StatType.Unknown;
Expand Down

0 comments on commit dfed131

Please sign in to comment.