ненужно

This commit is contained in:
DBotThePony 2023-01-23 13:58:00 +07:00
parent f3a2c1d327
commit a8e921bfb1
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 2 additions and 28 deletions

View File

@ -70,7 +70,6 @@ fun addStarboundJsonAdapters(builder: GsonBuilder) {
registerTypeAdapter(PolyTypeAdapter)
// Снаряды
registerTypeAdapterFactory(ConfigurableProjectile.ADAPTER)
registerTypeAdapterFactory(ActionConfig.ADAPTER)
registerTypeAdapterFactory(ActionProjectile.ADAPTER)
registerTypeAdapterFactory(ActionSound.ADAPTER)

View File

@ -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<ConfigurableProjectile, ConfiguredProjectile>() {
var projectileName by Delegates.notNull<String>()
var physics: ProjectilePhysics = ProjectilePhysics.DEFAULT
@ -94,33 +96,6 @@ class ConfigurableProjectile : RawPrototype<ConfigurableProjectile, ConfiguredPr
power = power,
)
}
companion object {
val ADAPTER = BuilderAdapter.Builder(
::ConfigurableProjectile,
ConfigurableProjectile::projectileName,
ConfigurableProjectile::physics,
ConfigurableProjectile::damageKindImage,
ConfigurableProjectile::damageType,
ConfigurableProjectile::damageKind,
ConfigurableProjectile::pointLight,
ConfigurableProjectile::lightColor,
ConfigurableProjectile::onlyHitTerrain,
ConfigurableProjectile::orientationLocked,
ConfigurableProjectile::image,
ConfigurableProjectile::timeToLive,
ConfigurableProjectile::animationCycle,
ConfigurableProjectile::bounces,
ConfigurableProjectile::frameNumber,
ConfigurableProjectile::scripts,
ConfigurableProjectile::actionOnReap,
ConfigurableProjectile::animationLoops,
ConfigurableProjectile::hydrophobic,
ConfigurableProjectile::piercing,
ConfigurableProjectile::speed,
ConfigurableProjectile::power,
)
}
}
/////////////////////////////////