From 4cb7d0e1f39018eb1ea15c9e257302754f8840c1 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Sat, 7 May 2022 20:29:39 +0200 Subject: [PATCH] add entity prototype --- .../schema/common/factorioPrototypes.kt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/events-schema/src/commonMain/kotlin/dev/adamko/kafkatorio/schema/common/factorioPrototypes.kt b/modules/events-schema/src/commonMain/kotlin/dev/adamko/kafkatorio/schema/common/factorioPrototypes.kt index 3a4a7dc..49f8370 100644 --- a/modules/events-schema/src/commonMain/kotlin/dev/adamko/kafkatorio/schema/common/factorioPrototypes.kt +++ b/modules/events-schema/src/commonMain/kotlin/dev/adamko/kafkatorio/schema/common/factorioPrototypes.kt @@ -24,4 +24,29 @@ sealed interface FactorioPrototype { /** Can the tile be mined for resources? */ val canBeMined: Boolean, ) : FactorioPrototype + + + @SerialName("kafkatorio.prototype.Entity") + @Serializable + data class Entity( + override val name: PrototypeName, + override val mapColour: Colour, + + val type: String, + val objectName: String, + val colour: Colour, + val maxHealth: Float, + val isBuilding: Boolean, + val isEntityWithOwner: Boolean, + val isMilitaryTarget: Boolean, + val miningProperties: MiningProperties + ) : FactorioPrototype { + + @Serializable + data class MiningProperties( + val canBeMined: Boolean, + val products: List?, + ) + + } }