Don't do full battery refill

This commit is contained in:
DBotThePony 2023-06-27 22:22:58 +07:00
parent f6519e12e3
commit 6660a929b9
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -1276,7 +1276,7 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
mattery.iteration++
mattery.shouldSendIteration = true
mattery.deathLog.addLast(ply.tickCount to ply.combatTracker.deathMessage)
mattery.androidEnergy.fillBattery() // если смерть была от разряда батареи, то предотвращаем софтлок
mattery.androidEnergy.batteryLevel = mattery.androidEnergy.batteryLevel.coerceAtLeast(Decimal(20_000)) // если смерть была от разряда батареи, то предотвращаем софтлок
while (mattery.deathLog.size > 6) {
mattery.deathLog.removeFirst()