package ru.dbotthepony.kstarbound.defs.actor.player

import ru.dbotthepony.kommons.math.RGBAColor
import ru.dbotthepony.kommons.vector.Vector2d
import ru.dbotthepony.kstarbound.json.builder.JsonFactory

@JsonFactory
data class SplashConfig(
	val splashSpeedMin: Double,
	val splashMinWaterLevel: Double,
	val splashBottomSensor: Vector2d,
	val splashTopSensor: Vector2d,
	val numSplashParticles: Int,
	val splashYVelocityFactor: Double,
	val splashParticle: Particle,
	val splashParticleVariance: Variance,
) {
	@JsonFactory
	data class Particle(
		val type: String,
		val position: Vector2d,
		val finalVelocity: Vector2d,
		val approach: Vector2d,
		val color: RGBAColor,
		val size: Double,
		val timeToLive: Double,
		val destructionAction: String,
		val destructionTime: Double,
	)

	@JsonFactory
	data class Variance(
		val velocity: Vector2d,
		val size: Double,
	)
}
