summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b9841a5)
raw | patch | inline | side by side (parent: b9841a5)
author | fredboy <fredboy@protonmail.com> | |
Thu, 9 May 2024 11:51:47 +0000 (18:51 +0700) | ||
committer | fredboy <fredboy@protonmail.com> | |
Thu, 9 May 2024 11:51:47 +0000 (18:51 +0700) |
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseEmptyBucketAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseEmptyBucketAction.kt
index 9f7c9f41d2ac7a854a6e5006311cf53ef44dfee3..57ca3f755305a5531b9cf972078d67e7cbcb6b48 100644 (file)
}
gameWorld.resetForeMap(x, y)
+ @Suppress("REDUNDANT_ELSE_IN_WHEN")
val filled = when (foregroundBlock) {
is Block.Lava -> gameItemsHolder.getItem("bucket_lava")
is Block.Water -> gameItemsHolder.getItem("bucket_water")
diff --git a/core/src/ru/deadsoftware/cavedroid/game/mobs/player/Inventory.kt b/core/src/ru/deadsoftware/cavedroid/game/mobs/player/Inventory.kt
index d99a90ec60e8762c5e6b0c16f4fdfeccb02b361c..8ce959222ae36f356cfba860de33213857b52b1b 100644 (file)
tooltipManager: TooltipManager,
) : Serializable {
+ @Suppress("UNNECESSARY_LATEINIT")
@Transient
private lateinit var tooltipManager: TooltipManager
+ @Suppress("UNNECESSARY_LATEINIT")
@Transient
private lateinit var fallbackItem: InventoryItem
diff --git a/core/src/ru/deadsoftware/cavedroid/game/model/block/CommonBlockParams.kt b/core/src/ru/deadsoftware/cavedroid/game/model/block/CommonBlockParams.kt
index e98f1be893ae3071f7be4c54226bd767e21f8c0c..369f7523430927e4f9d5a2c55e93b0ec3fc3fa80 100644 (file)
import ru.deadsoftware.cavedroid.game.model.item.Item
data class CommonBlockParams(
- @Deprecated("numeric id's will be removed") val id: Int?,
val key: String,
val collisionMargins: BlockMargins,
val hitPoints: Int,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/model/dto/BlockDto.kt b/core/src/ru/deadsoftware/cavedroid/game/model/dto/BlockDto.kt
index c6065b70c008586345df38c1ec323b759653a224..69b1f18379bad1a778a62fa5e979e7f16abc93b9 100644 (file)
@Serializable
data class BlockDto(
- @Deprecated("numeric ids will be removed") @SerialName("id") val id: Int? = null,
@SerialName("left") val left: Int = 0,
@SerialName("top") val top: Int = 0,
@SerialName("right") val right: Int = 0,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/model/dto/ItemDto.kt b/core/src/ru/deadsoftware/cavedroid/game/model/dto/ItemDto.kt
index fe28e6440adc30a52eadaab656d6bbb9306592f3..f3c0544087c53ea3dfd659521f17367a310605a4 100644 (file)
@Serializable
data class ItemDto(
- @Deprecated("numeric ids will be removed") @SerialName("id") val id: Int? = null,
@SerialName("name") val name: String,
@SerialName("type") val type: String = "normal",
@SerialName("texture") val texture: String,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/model/item/CommonItemParams.kt b/core/src/ru/deadsoftware/cavedroid/game/model/item/CommonItemParams.kt
index 291cfb896aab462b4dda9b7eb1a8d473712dffc9..0330a36f403b3021173179e8b3925becea15511d 100644 (file)
import ru.deadsoftware.cavedroid.misc.utils.SpriteOrigin
data class CommonItemParams(
- @Deprecated("numeric id's will be removed") val id: Int?,
val key: String,
val name: String,
val inHandSpriteOrigin: SpriteOrigin,
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 85d8cb722d457511ba96d4f46c10e81e994a0e38..f45451f6110bd4bac94fd2bdfade5c9678c88374 100644 (file)
private fun mapCommonParams(key: String, dto: BlockDto): CommonBlockParams {
return CommonBlockParams(
- id = dto.id,
key = key,
collisionMargins = BlockMargins(
left = dto.left,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/model/mapper/ItemMapper.kt b/core/src/ru/deadsoftware/cavedroid/game/model/mapper/ItemMapper.kt
index b951f261e795b7937d40c0c6a6f3b08272e50d72..4557cc82d9a5182e2ca779160bc7c2522d866915 100644 (file)
private fun mapCommonParams(key: String, dto: ItemDto): CommonItemParams {
return CommonItemParams(
- id = dto.id,
key = key,
name = dto.name,
inHandSpriteOrigin = SpriteOrigin(
diff --git a/core/src/ru/deadsoftware/cavedroid/game/objects/Drop.kt b/core/src/ru/deadsoftware/cavedroid/game/objects/Drop.kt
index b6f21bb1d8e6c4509c43d82955a73768a1bb57d6..f67c66c742f9526ab7d8f0e557364405062efa09 100644 (file)
val velocity = getInitialVelocity()
var pickedUp = false
+ @Suppress("UNNECESSARY_LATEINIT")
@Transient
lateinit var item: Item
private set