Skip to content

Commit

Permalink
Server hop support in link()
Browse files Browse the repository at this point in the history
  • Loading branch information
ike709 committed Jan 14, 2025
1 parent 2844789 commit 719238e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OpenDreamClient/Interface/DreamInterfaceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ internal sealed class DreamInterfaceManager : IDreamInterfaceManager {
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ITimerManager _timerManager = default!;
[Dependency] private readonly IUriOpener _uriOpener = default!;
[Dependency] private readonly IGameController _gameController = default!;

Check notice

Code scanning / InspectCode

Prefer using concrete value over 'default' or 'new()' Note

Use 'null' instead of 'default'

private readonly ISawmill _sawmill = Logger.GetSawmill("opendream.interface");

Expand Down Expand Up @@ -270,8 +271,10 @@ private void RxLink(MsgLink message) {
// TODO: This can be a topic call or a connection to another server
if (uri.Scheme is "http" or "https") {
_uriOpener.OpenUri(message.Url);
} else if (uri.Scheme is "ss14" or "ss14s") {
_gameController.Redial(message.Url, "link() used to connect to another server.");
} else {
_sawmill.Warning($"Received link \"{message.Url}\" which is being ignored because it's not http or https");
_sawmill.Warning($"Received link \"{message.Url}\" which is not supported. Ignoring.");
}
}

Expand Down

0 comments on commit 719238e

Please sign in to comment.