Skip to content

Commit

Permalink
Added custom status
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni1kko committed Jan 31, 2022
1 parent a4d4dc3 commit 3070285
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 32 deletions.
76 changes: 51 additions & 25 deletions Source - OLD/HourBoostr.Settings/Ui/AppHome.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Source - OLD/HourBoostr.Settings/Ui/AppHome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,15 @@ private void SetActiveGame()
}
}

private void txtStatus_TextChanged(object sender, EventArgs e)
{
if (mSettings.Accounts.Any())
{
mActiveAccount.ActiveGame = uint.MaxValue;
mActiveAccount.CustomStatus = txtStatus.Text;
}
}

/// <summary>
/// Prevents any typing in loginkey textbox
/// Not using ReadOnly because I don't like how it greys it out
Expand Down Expand Up @@ -577,6 +586,5 @@ private void lblStartBooster_Click(object sender, EventArgs e)
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void lblStartBooster_MouseLeave(object sender, EventArgs e) => lblStartBooster.ForeColor = Color.Gray;

}
}
21 changes: 19 additions & 2 deletions Source - OLD/HourBoostr/Core/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -653,16 +653,33 @@ private void SetGamesPlaying(bool state)
}
};


if (!mPlayingBlocked)
{
var customStatus = mAccountSettings.ActiveGame.Equals(uint.MaxValue) && !string.IsNullOrEmpty(mAccountSettings.CustomStatus);
var OtherGames = new List<uint>();

if (customStatus)
{
request.Body.games_played.Add(new CMsgClientGamesPlayed.GamePlayed
{
game_id = new GameID
{
AppType = GameID.GameType.Shortcut,
ModID = mAccountSettings.ActiveGame
},
game_extra_info = mAccountSettings.CustomStatus
});
mLog.Write(LogLevel.Info, $"Status Set: ({mAccountSettings.CustomStatus}) has been set as playing");
mSteam.client.Send(request);
}

void sortGames(uint CurrentGame, uint ActiveGame)
{
if (CurrentGame == ActiveGame && ActiveGame != 0)
if (CurrentGame == ActiveGame && ActiveGame != 0 && !customStatus)
{
request.Body.games_played.Add(new CMsgClientGamesPlayed.GamePlayed { game_id = new GameID(CurrentGame) });
mLog.Write(LogLevel.Info, $"AppID: {CurrentGame} has been set as playing status");
mLog.Write(LogLevel.Info, $"AppID: ({CurrentGame}) has been set as playing status");
mSteam.client.Send(request);
}
else
Expand Down
2 changes: 1 addition & 1 deletion Source - OLD/SingleBoostr.Core/Misc/Const.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public sealed class SingleBoostr
public sealed class HourBoostr
{
public const string NAME = "HourBoostr";
public const string VERSION = "4.2.1";
public const string VERSION = "4.3.0";
public static string IDLER_EXE => $"{NAME}.exe";
public static string SETTINGS_EXE => $"{NAME}.Settings.exe";
public static string SETTINGS_FILE => $"{NAME}.Settings.json";
Expand Down
7 changes: 6 additions & 1 deletion Source - OLD/SingleBoostr.Core/Objects/AccountSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ public class AccountSettings
/// <summary>
///
/// </summary>
public uint ActiveGame { get; set; } = 0;
public uint ActiveGame { get; set; } = 4294967295;

/// <summary>
///
/// </summary>
public string CustomStatus { get; set; } = "HourBoostr";

/// <summary>
///
Expand Down
4 changes: 2 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
{
"Name":"HourBoostr",
"Version": "4.2.1",
"Info": "Bug fix for saying update on latest version"
"Version": "4.3.0",
"Info": "Hotfix and new features to set specific game or custom status"
}
]
}

0 comments on commit 3070285

Please sign in to comment.