[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

@@ -29,6 +29,9 @@ using Content.Server.Station.Systems;
using Content.Server.Store.Components;
using Content.Server.Store.Systems;
using Content.Shared.CCVar;
using Content.Server.Traitor;
using Content.Server.White.Administration;
using Content.Server.White.Reputation;
using Content.Shared.Dataset;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Prototypes;
@@ -86,6 +89,9 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
[Dependency] private readonly IAdminManager _adminManager = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly WarDeclaratorSystem _warDeclarator = default!;
//WD EDIT
[Dependency] private readonly ReputationManager _reputationManager = default!;
//WD EDIT
[ValidatePrototypeId<CurrencyPrototype>]
@@ -686,7 +692,9 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
}
else
{
nukeOp = _random.PickAndTake(cmdrPrefList);
//nukeOp = _random.PickAndTake(cmdrPrefList);
nukeOp = _reputationManager.PickPlayerBasedOnReputation(cmdrPrefList); // WD edit
cmdrPrefList.Remove(nukeOp); // WD edit
everyone.Remove(nukeOp);
prefList.Remove(nukeOp);
medPrefList.Remove(nukeOp);
@@ -716,7 +724,9 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
}
else
{
nukeOp = _random.PickAndTake(medPrefList);
//nukeOp = _random.PickAndTake(medPrefList);
nukeOp = _reputationManager.PickPlayerBasedOnReputation(medPrefList); // WD edit
medPrefList.Remove(nukeOp); // WD edit
everyone.Remove(nukeOp);
prefList.Remove(nukeOp);
Logger.InfoS("preset", "Insufficient preferred nukeop commanders, picking an agent");
@@ -725,7 +735,9 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
}
else
{
nukeOp = _random.PickAndTake(prefList);
//nukeOp = _random.PickAndTake(prefList);
nukeOp = _reputationManager.PickPlayerBasedOnReputation(prefList); // WD edit
prefList.Remove(nukeOp); // WD edit
everyone.Remove(nukeOp);
Logger.InfoS("preset", "Selected a preferred nukeop commander.");
}