Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
фикс хуйни
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Rubinov committed Jun 8, 2024
1 parent 038c987 commit f0ccb01
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,18 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
}

[AdminCommand(AdminFlags.Host)]
public sealed class SetBalanceCommand : IConsoleCommand
public sealed class SetZeroBalanceCommand : IConsoleCommand
{
[Dependency] private readonly IServerDbManager _dbManager = default!;

public string Command => "setbalance";
public string Command => "setzerobalance";
public string Description => Loc.GetString("set-balance-command-description");
public string Help => Loc.GetString("set-balance-command-help-text", ("command", Command));

public async void Execute(IConsoleShell shell, string argStr, string[] args)
{
var loc = IoCManager.Resolve<ILocalizationManager>();
var set_balance = 0;
int.TryParse(args[1], out set_balance);
if (args.Length == 1 || args.Length == 2)
if (args.Length == 1)
{
var _userId = await _dbManager.GetPlayerRecordByUserName(args[0], new CancellationToken());
if (_userId is not null) {
Expand All @@ -70,7 +68,7 @@ public async void Execute(IConsoleShell shell, string argStr, string[] args)
profile.Age,
profile.Sex,
profile.Gender,
set_balance,
0,
profile.Appearance,
profile.SpawnPriority,
profile.JobPriorities,

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'

Check failure on line 74 in Content.Server/Administration/Commands/CorvaxSetBalanceCommand.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument 10: cannot convert from 'System.Collections.Generic.IReadOnlyDictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>' to 'System.Collections.Generic.Dictionary<Robust.Shared.Prototypes.ProtoId<Content.Shared.Roles.JobPrototype>, Content.Shared.Preferences.JobPriority>'
Expand All @@ -82,12 +80,15 @@ public async void Execute(IConsoleShell shell, string argStr, string[] args)
}
}
}
return;
} else {
shell.WriteLine(Loc.GetString("shell-target-player-does-not-exist "));
return;
}
return;
}
else
{
shell.WriteLine(Loc.GetString("shell-need-between-arguments", ("lower", "1"), ("upper", "2")));
shell.WriteLine(Loc.GetString("shell-need-exactly-one-argument"));
return;
}
}
Expand Down

0 comments on commit f0ccb01

Please sign in to comment.