From a8e921bfb1e8c3c6119119ee780d06e6f4c02eec Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 23 Jan 2023 13:58:00 +0700 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D1=83=D0=B6=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kstarbound/StarboundJsonAdapters.kt | 1 - .../defs/projectile/Configurable.kt | 29 ++----------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/StarboundJsonAdapters.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/StarboundJsonAdapters.kt index bd5657d9..c7387e7e 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/StarboundJsonAdapters.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/StarboundJsonAdapters.kt @@ -70,7 +70,6 @@ fun addStarboundJsonAdapters(builder: GsonBuilder) { registerTypeAdapter(PolyTypeAdapter) // Снаряды - registerTypeAdapterFactory(ConfigurableProjectile.ADAPTER) registerTypeAdapterFactory(ActionConfig.ADAPTER) registerTypeAdapterFactory(ActionProjectile.ADAPTER) registerTypeAdapterFactory(ActionSound.ADAPTER) diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/defs/projectile/Configurable.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/defs/projectile/Configurable.kt index f3b59b0e..03ac6e03 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/defs/projectile/Configurable.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/defs/projectile/Configurable.kt @@ -10,12 +10,14 @@ import ru.dbotthepony.kstarbound.defs.* import ru.dbotthepony.kstarbound.defs.image.ImageReference import ru.dbotthepony.kstarbound.io.json.builder.BuilderAdapter import ru.dbotthepony.kstarbound.io.json.builder.EnumAdapter +import ru.dbotthepony.kstarbound.io.json.builder.JsonBuilder import ru.dbotthepony.kstarbound.registerTypeAdapter import ru.dbotthepony.kstarbound.util.NotNullVar import ru.dbotthepony.kvector.vector.Color import java.util.concurrent.ConcurrentHashMap import kotlin.properties.Delegates +@JsonBuilder class ConfigurableProjectile : RawPrototype() { var projectileName by Delegates.notNull() var physics: ProjectilePhysics = ProjectilePhysics.DEFAULT @@ -94,33 +96,6 @@ class ConfigurableProjectile : RawPrototype