Fix awarding android stats for using exopack energy

This commit is contained in:
DBotThePony 2023-07-09 16:39:37 +07:00
parent a71cab3564
commit dfb07cc9c5
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -98,7 +98,7 @@ class BatteryBackedEnergyStorage(
howMuch -= extracted howMuch -= extracted
if (howMuch.isZero) { if (howMuch.isZero) {
if (!simulate && ply is ServerPlayer) { if (!simulate && ply is ServerPlayer && isAndroid) {
ply.awardStat(StatNames.POWER_CONSUMED, drained.toInt() * 10) ply.awardStat(StatNames.POWER_CONSUMED, drained.toInt() * 10)
} }
@ -113,7 +113,7 @@ class BatteryBackedEnergyStorage(
if (!simulate) { if (!simulate) {
battery = new battery = new
if (ply is ServerPlayer) { if (ply is ServerPlayer && isAndroid) {
ply.awardStat(StatNames.POWER_CONSUMED, drained.toInt() * 10) ply.awardStat(StatNames.POWER_CONSUMED, drained.toInt() * 10)
} }
} }