Add AddItem dialog to the inventory screen.
This commit is contained in:
parent
c94c820efb
commit
48074f3d13
17 changed files with 704 additions and 84 deletions
|
|
@ -26,8 +26,8 @@ class CharacterSheetJsonFactory(
|
|||
val json = CharacterSheetJsonV1(
|
||||
id = sheet.id,
|
||||
name = sheet.name,
|
||||
portrait = sheet.portrait,
|
||||
thumbnail = sheet.thumbnail,
|
||||
portrait = sheet.portrait?.takeIf { it.isNotBlank() },
|
||||
thumbnail = sheet.thumbnail?.takeIf { it.isNotBlank() },
|
||||
level = sheet.level,
|
||||
shouldLevelUp = sheet.shouldLevelUp,
|
||||
strength = sheet.strength,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ data class Inventory(
|
|||
data class Item(
|
||||
val inventoryId: String,
|
||||
val itemId: String,
|
||||
val count: Int,
|
||||
val count: Float,
|
||||
val equipped: Boolean,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ data class InventoryJsonV1(
|
|||
data class ItemJson(
|
||||
val inventoryId: String,
|
||||
val itemId: String,
|
||||
val count: Int,
|
||||
val count: Float,
|
||||
val equipped: Boolean?,
|
||||
)
|
||||
}
|
||||
|
|
@ -30,8 +30,8 @@ class ItemJsonFactoryV1 {
|
|||
metadata = ItemJsonV1.ItemMetadataJsonV1(
|
||||
name = item.metadata.label,
|
||||
description = item.metadata.description,
|
||||
image = item.metadata.image,
|
||||
thumbnail = item.metadata.thumbnail,
|
||||
image = item.metadata.image?.takeIf { it.isNotBlank() },
|
||||
thumbnail = item.metadata.thumbnail?.takeIf { it.isNotBlank() },
|
||||
),
|
||||
options = ItemJsonV1.ItemOptionJsonV1(
|
||||
stackable = item.options.stackable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue