Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add a saying hello count message on the main page.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Nov 7, 2023
1 parent 985b2fe commit acd7003
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"ClickingCount": 56849,
"SaidUsers": []
"ClickingCount": 56901,
"SaidUsers": [
"Ig4lHXUohMZNIeheUtAtRg=="
]
}
7 changes: 6 additions & 1 deletion RotationSolver.Basic/Configuration/RotationSolverRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
public class RotationSolverRecord
{
/// <summary>
/// How many times have rs clicked for you
/// How many times have rs clicked for you.
/// </summary>
public uint ClickingCount { get; set; } = 0;

/// <summary>
/// How many times have you greeted the other users.
/// </summary>
public uint SayingHelloCount { get; set; } = 0;

/// <summary>
/// The users that already said hello.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ internal class Strings
public string ConfigWindow_Basic_ClickingDuration { get; set; } = "The clicking duration, RS will try to click at this moment.";
public string ConfigWindow_Basic_WeaponDelay { get; set; } = "This is the clipping time.\nGCD is over. However, RS forgets to click the next action.";
public string ConfigWindow_About_ClickingCount { get; set; } = "Rotation Solver helped you by clicking actions {0:N0} times.";
public string ConfigWindow_About_SayHelloCount { get; set; } = "You have sayed hello to other users {0:N0} times!";
public string ConfigWindow_Auto_AutoHealTimeToKill { get; set; } = "Stop healing when time to kill is lower then...";
public string ConfigWindow_UI_ShowHostiles { get; set; } = "Show the hostile target icon";
public string ConfigWindow_UI_HostileIconHeight { get; set; } = "Hostile Icon height from position";
Expand Down
12 changes: 12 additions & 0 deletions RotationSolver/UI/RotationConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,18 @@ private static void DrawAbout()
}
}

var sayHelloCount = OtherConfiguration.RotationSolverRecord.SayingHelloCount;
if(sayHelloCount > 0)
{
using var color = ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.2f, 0.8f, 0.95f, 1));
var countStr = string.Format(LocalizationManager.RightLang.ConfigWindow_About_SayHelloCount, sayHelloCount);

ImGuiHelper.DrawItemMiddle(() =>
{
ImGui.TextWrapped(countStr);
}, width, ImGui.CalcTextSize(countStr).X);
}

_aboutHeaders.Draw();
}

Expand Down
2 changes: 2 additions & 0 deletions RotationSolver/Updaters/SocialUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,12 @@ public ChatEntity(PlayerCharacter character)
{
player = character;
}

public abstract SeString GetMessage();

public void Dispose()
{
OtherConfiguration.RotationSolverRecord.SayingHelloCount++;
var hash = EncryptString(player);
saidAuthors.Add(hash);
if (Service.Config.GetValue(PluginConfigBool.JustSayHelloOnce))
Expand Down

0 comments on commit acd7003

Please sign in to comment.