Skip to content

Commit

Permalink
imp - Consistency for GetLine() function
Browse files Browse the repository at this point in the history
---

In the GetLine() function, we've added the restoreDriver parameter for the
ShellType version of the function.

---

Type: imp
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 8, 2025
1 parent 7ef86f3 commit 0d0f579
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
changes!
-->
<NitrocidModAPIVersionMajor>3.1.27</NitrocidModAPIVersionMajor>
<NitrocidModAPIVersionChangeset>42</NitrocidModAPIVersionChangeset>
<NitrocidModAPIVersionChangeset>43</NitrocidModAPIVersionChangeset>

<!-- The above two properties are to be installed to the file version -->
<NitrocidModAPIVersion>$(NitrocidModAPIVersionMajor).$(NitrocidModAPIVersionChangeset)</NitrocidModAPIVersion>
Expand Down
2 changes: 1 addition & 1 deletion public/Nitrocid.Templates/templates/KSMod/ModName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class ModName : IMod

public string Version => "1.0.0";

public Version MinimumSupportedApiVersion => new(3, 1, 27, 42);
public Version MinimumSupportedApiVersion => new(3, 1, 27, 43);

public ModLoadPriority LoadPriority => ModLoadPriority.Optional;

Expand Down
7 changes: 4 additions & 3 deletions public/Nitrocid/Shell/ShellBase/Shells/ShellManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,10 @@ public static void GetLine(string FullCommand, string OutputPath = "") =>
/// <param name="FullCommand">The full command string</param>
/// <param name="OutputPath">Optional (non-)neutralized output path</param>
/// <param name="ShellType">Shell type</param>
/// <param name="restoreDriver">Whether to restore the driver to the previous state</param>
/// <remarks>All new shells implemented either in KS or by mods should use this routine to allow effective and consistent line parsing.</remarks>
public static void GetLine(string FullCommand, string OutputPath = "", ShellType ShellType = ShellType.Shell) =>
GetLine(FullCommand, OutputPath, GetShellTypeName(ShellType), true, Config.MainConfig.SetTitleOnCommandExecution);
public static void GetLine(string FullCommand, string OutputPath = "", ShellType ShellType = ShellType.Shell, bool restoreDriver = true) =>
GetLine(FullCommand, OutputPath, GetShellTypeName(ShellType), restoreDriver, Config.MainConfig.SetTitleOnCommandExecution);

/// <summary>
/// Parses a specified command.
Expand All @@ -314,7 +315,7 @@ public static void GetLine(string FullCommand, string OutputPath = "", string Sh
/// <param name="restoreDriver">Whether to restore the driver to the previous state</param>
/// <param name="setTitle">Whether to set the console title</param>
/// <remarks>All new shells implemented either in KS or by mods should use this routine to allow effective and consistent line parsing.</remarks>
internal static void GetLine(string FullCommand, string OutputPath = "", string ShellType = "Shell", bool restoreDriver = true, bool setTitle = true)
internal static void GetLine(string FullCommand, string OutputPath, string ShellType, bool restoreDriver, bool setTitle)
{
// Check for sanity
if (string.IsNullOrEmpty(FullCommand))
Expand Down

0 comments on commit 0d0f579

Please sign in to comment.