Fix gulag & tweak ratio (#36)

* - tweak: Tweak gulag ratio

* - fix: Fix gulag.
This commit is contained in:
Aviu00
2024-02-08 18:43:17 +09:00
committed by GitHub
parent 84c371a2a3
commit 337034d734
6 changed files with 60 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ namespace Content.Server._Miracle.GulagSystem;
public sealed partial class GulagSystem : SharedGulagSystem
{
//1 second = 10 points
//1 second = 0.01 points
[Dependency] private readonly AdminSystem _adminSystem = default!;
[Dependency] private readonly IBanManager _banManager = default!;
[Dependency] private readonly BiomeSystem _biome = default!;
@@ -382,7 +382,16 @@ public sealed partial class GulagSystem : SharedGulagSystem
var newExpirationTime = banDef.ExpirationTime!.Value.DateTime - ConvertPointsToTime(points);
_db.EditServerBan(banDef.Id!.Value, banDef.Reason, banDef.Severity, newExpirationTime, banDef.UserId!.Value, DateTime.Now);
// Update time
_banManager.RemoveCachedServerBan(banDef.UserId.Value, banDef.Id.Value);
_banManager.AddCachedServerBan(new ServerBanDef(
banDef.Id, banDef.UserId, banDef.Address, banDef.HWId, banDef.BanTime, newExpirationTime,
banDef.RoundId, banDef.PlaytimeAtNote, banDef.Reason, banDef.Severity, banDef.BanningAdmin,
banDef.Unban, banDef.ServerName));
}
_pointsPerPlayer.Clear();
_activeMap = null!;
_mapEntity = null!;