30 lines
1007 B
Kotlin
30 lines
1007 B
Kotlin
package ru.dbotthepony.kstarbound.defs.tile
|
|
|
|
import com.google.common.collect.ImmutableList
|
|
import ru.dbotthepony.kstarbound.Registry
|
|
import ru.dbotthepony.kstarbound.defs.StatusEffectDefinition
|
|
import ru.dbotthepony.kstarbound.json.builder.JsonFactory
|
|
import ru.dbotthepony.kvector.vector.RGBAColor
|
|
|
|
@JsonFactory
|
|
data class LiquidDefinition(
|
|
val name: String,
|
|
val liquidId: Int,
|
|
val description: String = "...",
|
|
val tickDelta: Int = 1,
|
|
val color: RGBAColor,
|
|
val itemDrop: String? = null,
|
|
val statusEffects: ImmutableList<Registry.Ref<StatusEffectDefinition>> = ImmutableList.of(),
|
|
val interactions: ImmutableList<Interaction> = ImmutableList.of(),
|
|
val texture: String,
|
|
val bottomLightMix: RGBAColor,
|
|
val textureMovementFactor: Double,
|
|
) {
|
|
@JsonFactory
|
|
data class Interaction(val liquid: Int, val liquidResult: Int? = null, val materialResult: String? = null) {
|
|
init {
|
|
require(liquidResult != null || materialResult != null) { "Both liquidResult and materialResult are missing" }
|
|
}
|
|
}
|
|
}
|