[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
This commit is contained in:
HitPanda
2023-10-08 15:53:28 +03:00
committed by Aviu00
parent a29e004eba
commit 7c9bd1d934
37 changed files with 3752 additions and 25 deletions

View File

@@ -20,6 +20,7 @@ public sealed class BanCommand : LocalizedCommands
[Dependency] private readonly IBanManager _bans = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly UtkaTCPWrapper _utkaSockets = default!; // WD
[Dependency] private readonly IEntityManager _entMan = default!; // WD
public override string Command => "ban";
@@ -128,6 +129,7 @@ public sealed class BanCommand : LocalizedCommands
BanId = banId
};
_utkaSockets.SendMessageToAll(utkaBanned);
_entMan.EventBus.RaiseEvent(EventSource.Local, utkaBanned);
//WD end
}

View File

@@ -31,6 +31,7 @@ public sealed class RoleBanManager
[Dependency] private readonly UtkaTCPWrapper _utkaSockets = default!; // WD
[Dependency] private readonly IEntitySystemManager _systems = default!; // WD
[Dependency] private readonly IBanManager _banManager = default!; // WD
[Dependency] private readonly IEntityManager _entMan = default!; // WD
private const string JobPrefix = "Job:";
@@ -425,6 +426,7 @@ public sealed class RoleBanManager
};
_utkaSockets.SendMessageToAll(utkaBanned);
_entMan.EventBus.RaiseEvent(EventSource.Local, utkaBanned);
}
private async Task<int> UtkaGetBanId(string reason, string role, NetUserId targetUid)