Skip to content

Commit

Permalink
fix: enviroment -> environment (#219)
Browse files Browse the repository at this point in the history
* fix: enviroment -> environment

* add obselete property for old misspelling
  • Loading branch information
CanadaHonk committed Jul 26, 2023
1 parent eea59a5 commit d8c97cc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
9 changes: 8 additions & 1 deletion DiscordRPC/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,16 @@ public class Configuration
public string CdnHost { get; set; }

/// <summary>
/// The type of enviroment the connection on. Usually Production.
/// The type of environment the connection on. Usually Production.
/// </summary>
[JsonProperty("environment")]
public string Environment { get; set; }

/// <summary>
/// Obsolete: Use "environment" instead. The type of environment the connection on. Usually Production.
/// </summary>
[JsonProperty("enviroment")]
[Obsolete("This property is obsolete: use \"environment\" instead", false)]
public string Enviroment { get; set; }
}
}
4 changes: 2 additions & 2 deletions DiscordRPC/IO/ManagedNamedPipeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public static string GetPipeName(int pipe)
=> GetPipeName(pipe, "");

/// <summary>
/// Gets the name of the possible sandbox enviroment the pipe might be located within. If the platform doesn't support sandboxed Discord, then it will return null.
/// Gets the name of the possible sandbox environment the pipe might be located within. If the platform doesn't support sandboxed Discord, then it will return null.
/// </summary>
/// <returns></returns>
public static string GetPipeSandbox()
Expand All @@ -486,7 +486,7 @@ public static string GetPipeSandbox()
}

/// <summary>
/// Gets the temporary path for the current enviroment. Only applicable for UNIX based systems.
/// Gets the temporary path for the current environment. Only applicable for UNIX based systems.
/// </summary>
/// <returns></returns>
private static string GetTemporaryDirectory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static DiscordNativeInstall()
}
else
{
Debug.LogError("Discord RPC is unable to work in a .NET 2.0 SUBSET enviroment. Builds may not work and may hardcrash if not fixed. Please manually fix by changing player settings.");
Debug.LogError("Discord RPC is unable to work in a .NET 2.0 SUBSET environment. Builds may not work and may hardcrash if not fixed. Please manually fix by changing player settings.");
}
}

Expand Down
4 changes: 2 additions & 2 deletions Unity Example/Assets/Discord RPC/Plugins/DiscordRPC.XML

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

Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private string GetPipeName(int pipe, string sandbox = "")
case PlatformID.Unix:
case PlatformID.MacOSX:
Logger.Trace("PIPE UNIX / MACOSX");
return Path.Combine(GetEnviromentTemp(), sandbox + string.Format(PIPE_NAME, pipe));
return Path.Combine(GetEnvironmentTemp(), sandbox + string.Format(PIPE_NAME, pipe));
}
}

Expand All @@ -227,7 +227,7 @@ private string GetPipeSandbox()
}
}

private string GetEnviromentTemp()
private string GetEnvironmentTemp()
{
string temp = null;
temp = temp ?? Environment.GetEnvironmentVariable("XDG_RUNTIME_DIR");
Expand Down

0 comments on commit d8c97cc

Please sign in to comment.