[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / model / mapper / BlockMapper.kt
diff --git a/core/src/ru/deadsoftware/cavedroid/game/model/mapper/BlockMapper.kt b/core/src/ru/deadsoftware/cavedroid/game/model/mapper/BlockMapper.kt
index cae219f00c053b679141776e2ec8a67b40395bf1..a122754caad73e972a6cb20f7155c6b76f02a9fd 100644 (file)
return when (dto.meta) {
"water" -> Water(commonBlockParams, requireNotNull(dto.state))
"lava" -> Lava(commonBlockParams, requireNotNull(dto.state))
- "slab" -> Slab(commonBlockParams, requireNotNull(dto.fullBlock))
+ "slab" -> Slab(commonBlockParams, requireNotNull(dto.fullBlock), requireNotNull(dto.otherPart))
"none" -> None(commonBlockParams)
else -> Normal(commonBlockParams)
}
isTransparent = dto.transparent,
requiresBlock = dto.blockRequired,
animationInfo = mapBlockAnimationInfo(dto),
- texture = loadTexture(dto.texture),
+ texture = getTexture(dto.texture),
spriteMargins = BlockMargins(
left = dto.spriteLeft,
top = dto.spriteTop,
)
}
- private fun loadTexture(textureName: String): Texture? {
+ private fun getTexture(textureName: String): Texture? {
if (textureName == GameItemsHolder.FALLBACK_BLOCK_KEY) {
return null
}