Grid Placement
Development ⚠️ GridPlacement 6.0 (GECS) is in active development. This is the GDScript ECS architecture.

ItemContainerComponent

AUTO-GENERATED (GDScript) API entry

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: components/inventory/item_container_component.gd

Version: 6.0

class_name: ItemContainerComponent extends: Component

Signals

(none)

Exports

  • item_stacks: Array
  • max_stacks: int = 32
  • auto_stack: bool = true

Methods

  • add_resource(resource_type: Resource, count: int, max_stack_size: int = 0) -> int
  • remove_resource(resource_type: Resource, count: int) -> int
  • get_resource_count(resource_type: Resource) -> int
  • has_resources(stacks: Array) -> bool
  • consume_resources(stacks: Array) -> int
  • normalize_stacks -> void
  • validate -> Array
  • _resolve_stack_limit(existing_limit: int, requested_limit: int) -> int
  • _find_stack_with_space(stacks: Array, resource_type: Resource, max_stack_size: int) -> int