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

Commit

Permalink
fix: fixed the sayout issue when manual toggle.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 17, 2023
1 parent 3d515f3 commit b86b197
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
6 changes: 4 additions & 2 deletions RotationSolver/Commands/RSCommands_StateSpecialCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ private static unsafe void DoStateCommandType(StateCommandType stateType) => DoO

_stateString = stateType.ToStateString(role);
UpdateToast();
return stateType;
});

public static unsafe void UpdateStateNamePlate()
Expand All @@ -57,15 +58,16 @@ private static void DoSpecialCommandType(SpecialCommandType specialType, bool sa
_specialString = specialType.ToSpecialString(role);
DataCenter.SetSpecialType(specialType);
if (sayout) UpdateToast();
return specialType;
});

private static void DoOneCommandType<T>(T type, Func<T, JobRole, string> sayout, Action<JobRole> doingSomething)
private static void DoOneCommandType<T>(T type, Func<T, JobRole, string> sayout, Func<JobRole, T> doingSomething)
where T : struct, Enum
{
//Get jobrole.
var role = Service.Player.ClassJob.GameData.GetJobRole();

doingSomething(role);
type = doingSomething(role);

//Saying out.
if (Service.Config.SayOutStateChanged) SpeechHelper.Speak(sayout(type, role));
Expand Down
2 changes: 0 additions & 2 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
"ConfigWindow_Events_DutyStart": "Duty Start: ",
"ConfigWindow_Events_DutyEnd": "Duty End: ",
"ConfigWindow_Params_Description": "In this window, you can set the parameters about the using way of actions.",
"ConfigWindow_Param_NeverReplaceIcon": "Never Replace Icons",
"ConfigWindow_Param_NeverReplaceIconDesc": "Icon replacement: Repose is automatically displayed as the next action to be used",
"ConfigWindow_Param_UseOverlayWindow": "Display Top Overlay",
"ConfigWindow_Param_UseOverlayWindowDesc": "This top window is used to display some extra information on your game window, such as target's positional, target and sub-target, etc.",
"ConfigWindow_Param_Basic": "Basic",
Expand Down
2 changes: 0 additions & 2 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ internal partial class Strings
public string ConfigWindow_Events_DutyStart { get; set; } = "Duty Start: ";
public string ConfigWindow_Events_DutyEnd{ get; set; } = "Duty End: ";
public string ConfigWindow_Params_Description { get; set; } = "In this window, you can set the parameters about the using way of actions.";
public string ConfigWindow_Param_NeverReplaceIcon { get; set; } = "Never Replace Icons";
public string ConfigWindow_Param_NeverReplaceIconDesc { get; set; } = "Icon replacement: Repose is automatically displayed as the next action to be used";
public string ConfigWindow_Param_UseOverlayWindow { get; set; } = "Display Top Overlay";
public string ConfigWindow_Param_UseOverlayWindowDesc { get; set; } = "This top window is used to display some extra information on your game window, such as target's positional, target and sub-target, etc.";
public string ConfigWindow_Param_Basic { get; set; } = "Basic";
Expand Down
4 changes: 0 additions & 4 deletions RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ private void DrawParamTab()

private void DrawParamBasic()
{
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_NeverReplaceIcon,
ref Service.Config.NeverReplaceIcon, Service.Default.NeverReplaceIcon,
LocalizationManager.RightLang.ConfigWindow_Param_NeverReplaceIconDesc);

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_UseOverlayWindow,
ref Service.Config.UseOverlayWindow, Service.Default.UseOverlayWindow,
LocalizationManager.RightLang.ConfigWindow_Param_UseOverlayWindowDesc);
Expand Down

0 comments on commit b86b197

Please sign in to comment.