From d348e4a48078b4eae2fc44ebf7101df2377ed5ab Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 20 Dec 2025 22:10:25 +0100 Subject: [PATCH] Fix kits frfrfrfr? Signed-off-by: Chaoscaot --- CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt | 3 +-- CommonCore/SQL/src/de/steamwar/sql/internal/KotlinDatabase.kt | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt b/CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt index f1bd3c79..a5df337e 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt +++ b/CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt @@ -72,9 +72,8 @@ class InternalKit(id: EntityID): CompositeEntity(id) { ) { this.inventory = rawInventory this.armor = rawArmor - this.inUse = true } - } + }.also { it.setDefault() } @JvmStatic fun getKitInUse(userId: Int, gamemode: String) = useDb { diff --git a/CommonCore/SQL/src/de/steamwar/sql/internal/KotlinDatabase.kt b/CommonCore/SQL/src/de/steamwar/sql/internal/KotlinDatabase.kt index bf0cc9ff..11504eea 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/internal/KotlinDatabase.kt +++ b/CommonCore/SQL/src/de/steamwar/sql/internal/KotlinDatabase.kt @@ -23,6 +23,7 @@ import org.intellij.lang.annotations.Language import org.jetbrains.exposed.v1.core.ColumnType import org.jetbrains.exposed.v1.core.Expression import org.jetbrains.exposed.v1.core.ResultRow +import org.jetbrains.exposed.v1.core.StdOutSqlLogger import org.jetbrains.exposed.v1.core.statements.StatementType import org.jetbrains.exposed.v1.dao.IntEntity import org.jetbrains.exposed.v1.dao.IntEntityClass @@ -69,6 +70,7 @@ object KotlinDatabase { fun useDb(statement: JdbcTransaction.() -> T): T { KotlinDatabase.ensureConnected() return TransactionManager.currentOrNull()?.statement() ?: transaction(KotlinDatabase.db) { + addLogger(StdOutSqlLogger) statement() } }