Skip to content

Commit

Permalink
more commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Aug 17, 2024
1 parent 9c3c9a3 commit 2f798f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 1 addition & 2 deletions SomethingNeedDoing/Grammar/Commands/LoopCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ internal class LoopCommand : MacroCommand
private readonly int startingLoops;
private int loopsRemaining;

private LoopCommand(string text, int loopCount, WaitModifier wait, EchoModifier echo)
: base(text, wait)
private LoopCommand(string text, int loopCount, WaitModifier wait, EchoModifier echo) : base(text, wait)
{
loopsRemaining = loopCount >= 0 ? loopCount : MaxLoops;
startingLoops = loopsRemaining;
Expand Down
5 changes: 4 additions & 1 deletion SomethingNeedDoing/Misc/Changelog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ static void DisplayChangelog(string date, string changes, bool separator = true)

DisplayChangelog(
"2024-08-24",
"- Added GetZoneInstance()\n");
"- Added GetZoneInstance()\n" +
"- Added IsPauseLoopSet()\n" +
"- Added IsStopLoopSet()\n +" +
"- Added GetMonsterNoteRankInfo()\n");

DisplayChangelog(
"2024-07-29",
Expand Down
2 changes: 2 additions & 0 deletions SomethingNeedDoing/Misc/Commands/InternalCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ public List<string> ListAllFunctions()

public void SetSNDProperty(string key, string value) => Service.Configuration.SetProperty(key, value);
public object? GetSNDProperty(string key) => Service.Configuration.GetProperty(key);
public bool IsPauseLoopSet() => Service.MacroManager.PauseAtLoop;
public bool IsStopLoopSet() => Service.MacroManager.StopAtLoop;
}
2 changes: 2 additions & 0 deletions SomethingNeedDoing/Misc/Commands/QuestCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public static string GetQuestNameByID(ushort id)
return matchingRows.Count > 0 ? Svc.Data.GetExcelSheet<Quest>(Svc.ClientState.ClientLanguage)!.GetRow((uint)matchingRows.First().i)!.RowId : null;
}

public unsafe MonsterNoteRankInfo GetMonsterNoteRankInfo(int index) => MonsterNoteManager.Instance()->RankData[index];

private static bool IsMatch(string x, string y) => Regex.IsMatch(x, $@"\b{Regex.Escape(y)}\b");
private static object MatchingScore(string item, string line)
{
Expand Down

0 comments on commit 2f798f2

Please sign in to comment.