41 lines
1.3 KiB
Kotlin
41 lines
1.3 KiB
Kotlin
package ru.dbotthepony.kstarbound.defs.tile
|
|
|
|
import com.google.common.collect.ImmutableList
|
|
import ru.dbotthepony.kstarbound.defs.AssetReference
|
|
import ru.dbotthepony.kstarbound.world.physics.CollisionType
|
|
import ru.dbotthepony.kstarbound.defs.IThingWithDescription
|
|
import ru.dbotthepony.kstarbound.defs.ThingDescription
|
|
import ru.dbotthepony.kstarbound.io.json.builder.JsonFactory
|
|
import ru.dbotthepony.kstarbound.io.json.builder.JsonFlat
|
|
import ru.dbotthepony.kstarbound.io.json.builder.JsonIgnore
|
|
import ru.dbotthepony.kvector.vector.RGBAColor
|
|
|
|
@JsonFactory
|
|
data class TileDefinition(
|
|
val materialId: Int,
|
|
val materialName: String,
|
|
val particleColor: RGBAColor? = null,
|
|
val itemDrop: String? = null,
|
|
val footstepSound: String? = null,
|
|
val miningSounds: ImmutableList<String> = ImmutableList.of(),
|
|
|
|
val blocksLiquidFlow: Boolean = true,
|
|
val soil: Boolean = false,
|
|
|
|
val health: Double = 0.0,
|
|
val category: String,
|
|
|
|
@JsonFlat
|
|
val descriptionData: ThingDescription,
|
|
|
|
// meta tiles are treated uniquely by many systems
|
|
// such as players/projectiles unable to break them, etc
|
|
@JsonIgnore
|
|
val isMeta: Boolean = false,
|
|
|
|
val collisionKind: CollisionType = CollisionType.BLOCK,
|
|
|
|
override val renderTemplate: AssetReference<RenderTemplate>,
|
|
override val renderParameters: RenderParameters,
|
|
) : IRenderableTile, IThingWithDescription by descriptionData
|