Skip to content

Commit

Permalink
Mirror: Fix Playglobalsound Autocompletion (#319)
Browse files Browse the repository at this point in the history
## Mirror of PR #26167: [Fix playglobalsound
autocompletion](space-wizards/space-station-14#26167)
from <img src="https://avatars.githubusercontent.com/u/10567778?v=4"
alt="space-wizards" width="22"/>
[space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14)

###### `65960facf522627c939a35a65b025ec49ffa5c52`

PR opened by <img
src="https://avatars.githubusercontent.com/u/31366439?v=4"
width="16"/><a href="https://github.com/metalgearsloth">
metalgearsloth</a> at 2024-03-16 03:02:08 UTC

---

PR changed 1 files with 3 additions and 1 deletions.

The PR had the following labels:
- Status: Needs Review


---

<details open="true"><summary><h1>Original Body</h1></summary>

> Requires space-wizards/RobustToolbox#4968


</details>

Co-authored-by: SimpleStation14 <Unknown>
Co-authored-by: VMSolidus <[email protected]>
Co-authored-by: DEATHB4DEFEAT <[email protected]>
Co-authored-by: DEATHB4DEFEAT <[email protected]>
  • Loading branch information
4 people authored Jul 12, 2024
1 parent 1c91476 commit 6949685
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 6949685

Please sign in to comment.