From dfb07cc9c5f195ef83a3d4d0d24c43f6383ca001 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 9 Jul 2023 16:39:37 +0700 Subject: [PATCH] Fix awarding android stats for using exopack energy --- .../mc/otm/capability/energy/BatteryBackedEnergyStorage.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/BatteryBackedEnergyStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/BatteryBackedEnergyStorage.kt index 9740cedf2..a04a14b70 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/BatteryBackedEnergyStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/BatteryBackedEnergyStorage.kt @@ -98,7 +98,7 @@ class BatteryBackedEnergyStorage( howMuch -= extracted if (howMuch.isZero) { - if (!simulate && ply is ServerPlayer) { + if (!simulate && ply is ServerPlayer && isAndroid) { ply.awardStat(StatNames.POWER_CONSUMED, drained.toInt() * 10) } @@ -113,7 +113,7 @@ class BatteryBackedEnergyStorage( if (!simulate) { battery = new - if (ply is ServerPlayer) { + if (ply is ServerPlayer && isAndroid) { ply.awardStat(StatNames.POWER_CONSUMED, drained.toInt() * 10) } }