From 24df358add22584ed044fd2eeb738e5ae04682ca Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Thu, 11 May 2023 02:24:03 +0300 Subject: [PATCH] Condition 'components != null' is always 'true' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit УВЫ БЛЯТЬ НЕ ТРУ --- .../ru/dbotthepony/mc/otm/graph/storage/StorageNode.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/graph/storage/StorageNode.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/graph/storage/StorageNode.kt index a5b57a4b5..c2b1c3e53 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/graph/storage/StorageNode.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/graph/storage/StorageNode.kt @@ -37,9 +37,10 @@ open class StorageNode(private val energyDemander: IMatteryEnergyStorage? = null return } - for (component in components) { - to.add(component) - } + if (components != null) + for (component in components) { + to.add(component) + } } /**