36 lines
1.2 KiB
Kotlin
36 lines
1.2 KiB
Kotlin
package ru.dbotthepony.kstarbound.defs.tile
|
|
|
|
import com.google.common.collect.ImmutableList
|
|
import com.google.gson.GsonBuilder
|
|
import ru.dbotthepony.kstarbound.defs.AssetReference
|
|
import ru.dbotthepony.kstarbound.defs.IThingWithDescription
|
|
import ru.dbotthepony.kstarbound.defs.ThingDescription
|
|
import ru.dbotthepony.kstarbound.io.json.builder.FactoryAdapter
|
|
import ru.dbotthepony.kstarbound.io.json.builder.JsonFactory
|
|
import ru.dbotthepony.kstarbound.io.json.builder.JsonPropertyConfig
|
|
|
|
@JsonFactory
|
|
data class MaterialModifier(
|
|
val modId: Int,
|
|
val modName: String,
|
|
val itemDrop: String? = null,
|
|
val health: Double = 0.0,
|
|
val harvestLevel: Double = 0.0,
|
|
val breaksWithTile: Boolean = true,
|
|
val grass: Boolean = false,
|
|
val miningParticle: String? = null,
|
|
|
|
val footstepSound: String? = null,
|
|
val miningSounds: ImmutableList<String> = ImmutableList.of(),
|
|
|
|
@JsonPropertyConfig(isFlat = true)
|
|
val descriptionData: ThingDescription,
|
|
|
|
override val renderTemplate: AssetReference<RenderTemplate>,
|
|
override val renderParameters: RenderParameters
|
|
) : IRenderableTile, IThingWithDescription by descriptionData {
|
|
init {
|
|
require(modId > 0) { "Invalid material modifier ID $modId" }
|
|
}
|
|
}
|