Files
OldThink/Content.Server/White/Reputation/Commands/ShowReputationCommand.cs
HitPanda 7c9bd1d934 [Feat] Респект и уважуха (#476)
* db

* wd comment

* manager & commands

* system & round end results

* raise ban event

* client manager & cached values

* role pick tweak

* tweak last commit

* more fixes

* weights fix

* Fix for short rounds

* tweak in cached dictionary

* reva pick system

* fix last commit

* cult role pick

* nukeops role picking

* fix cache in async & show command

* ooc msg show value

* move pick method to manager & traitor pick fix
2024-01-25 08:05:48 +03:00

31 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Content.Shared.Administration;
using Robust.Shared.Console;
namespace Content.Server.White.Reputation.Commands;
[AnyCommand]
public sealed class ShowReputationCommand : IConsoleCommand
{
[Dependency] private readonly ReputationManager _repManager = default!;
public string Command => "showreput";
public string Description => "Узнать свою репутацию.";
public string Help => "Использование: showreput";
public async void Execute(IConsoleShell shell, string argStr, string[] args)
{
IoCManager.InjectDependencies(this);
if (shell.Player == null)
return;
var value = await _repManager.GetPlayerReputation(shell.Player.UserId);
if (value == null)
{
shell.WriteLine("Не удалось получить данные о репутации. Обратитесь к кодерам или попробуйте ещё раз.");
return;
}
shell.WriteLine($"Ваша репутация: {value}");
}
}