Add portable RV homes and decor prototype

This commit is contained in:
Alexander Sellite 2026-08-30 21:37:26 -04:00
parent 81decf2b71
commit fe099f47dd
56 changed files with 5459 additions and 112 deletions

View file

@ -35,6 +35,41 @@ func _run() -> void:
hotbar.setup(bag, ItemCatalogResource, catches, layout)
assert(PlayerInventoryLayout.INVENTORY_CAPACITIES == [9, 18, 27, 36])
assert(PlayerCoolerCapacity.CAPACITIES == [9, 18, 27, 36, 45, 54, 63, 72])
var basic_cube: ItemData = ItemCatalogResource.get_item_by_id(&"basic_cube")
assert(basic_cube != null)
assert(basic_cube.icon != null)
assert(basic_cube.hotbar_allowed)
assert(bag.add_item(&"basic_cube"))
assert(layout.is_item_in_inventory(&"basic_cube"))
assert(hotbar.assign_item(0, &"basic_cube"))
assert(hotbar.get_item_id(0) == &"basic_cube")
assert(
layout.get_container(
PlayerInventoryLayout.EntryKind.ITEM,
&"basic_cube",
) == PlayerInventoryLayout.InventoryContainer.HOTBAR
)
assert(hotbar.clear_slot(0))
assert(layout.is_item_in_inventory(&"basic_cube"))
assert(bag.remove_item(&"basic_cube"))
var packed_decor_slot: int = hotbar.find_first_empty_slot()
assert(packed_decor_slot == 0)
assert(layout.prepare_new_item_placement(
&"basic_cube",
PlayerInventoryLayout.InventoryContainer.HOTBAR,
packed_decor_slot,
))
assert(bag.add_item(&"basic_cube"))
assert(
layout.get_container(
PlayerInventoryLayout.EntryKind.ITEM,
&"basic_cube",
) == PlayerInventoryLayout.InventoryContainer.HOTBAR
)
assert(hotbar.assign_item(packed_decor_slot, &"basic_cube"))
assert(hotbar.select_slot(packed_decor_slot))
assert(hotbar.get_selected_item_id() == &"basic_cube")
assert(bag.remove_item(&"basic_cube"))
assert(bag.add_item(&"coffee", 3))
assert(layout.get_inventory_count() == 1)