Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirror: Fix Playglobalsound Autocompletion #319

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Robust.Shared.Console;
using Robust.Shared.ContentPack;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;

namespace Content.Server.Administration.Commands;

Expand All @@ -14,6 +15,7 @@ public sealed class PlayGlobalSoundCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IPrototypeManager _protoManager = default!;
[Dependency] private readonly IResourceManager _res = default!;

public string Command => "playglobalsound";
Expand Down Expand Up @@ -95,7 +97,7 @@ public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
var hint = Loc.GetString("play-global-sound-command-arg-path");

var options = CompletionHelper.ContentFilePath(args[0], _res);
var options = CompletionHelper.AudioFilePath(args[0], _protoManager, _res);

return CompletionResult.FromHintOptions(options, hint);
}
Expand Down
Loading