GridInventory

Inherits: Inventory < NodeInventories < Node

There is currently no description for this class. Please help us by contributing one!

Properties

Array[GridInventoryConstraint]

grid_constraints

[]

Vector2i

size

Vector2i(8, 8)

Array[Vector2i]

stack_positions

[]

Array[bool]

stack_rotations

[]

Methods

int

add_at_position(position: Vector2i, item_id: String, amount: int = 1, properties: Dictionary = {}, is_rotated: bool = false)

bool

can_rotate_item(stack: ItemStack) const

QuadTree

get_quad_tree() const

ItemStack

get_stack_at(position: Vector2i) const

int

get_stack_index_at(position: Vector2i) const

Vector2i

get_stack_position(stack: ItemStack) const

Rect2i

get_stack_rect(stack: ItemStack) const

Vector2i

get_stack_size(stack: ItemStack) const

Array[ItemStack]

get_stacks_under(rect: Rect2i) const

bool

has_free_place(stack_size: Vector2i, exception: ItemStack = null) const

bool

is_stack_rotated(stack: ItemStack) const

bool

rect_free(rect: Rect2i, exception: ItemStack = null) const

void

rotate(stack: ItemStack)

void

set_quad_tree(quad_tree: QuadTree)

bool

set_stack_position(stack: ItemStack, new_position: Vector2i)

bool

sort()

bool

swap_stacks(position: Vector2i, other_inventory: GridInventory, other_position: Vector2i)

int

transfer_to(from_position: Vector2i, destination: GridInventory, destination_position: Vector2i, amount: int = 1, is_rotated: bool = false)


Signals

size_changed() 🔗

There is currently no description for this signal. Please help us by contributing one!


Property Descriptions

Array[GridInventoryConstraint] grid_constraints = [] 🔗

There is currently no description for this property. Please help us by contributing one!


Vector2i size = Vector2i(8, 8) 🔗

  • void set_size(value: Vector2i)

  • Vector2i get_size()

There is currently no description for this property. Please help us by contributing one!


Array[Vector2i] stack_positions = [] 🔗

  • void set_stack_positions(value: Array[Vector2i])

  • Array[Vector2i] get_stack_positions()

There is currently no description for this property. Please help us by contributing one!


Array[bool] stack_rotations = [] 🔗

  • void set_stack_rotations(value: Array[bool])

  • Array[bool] get_stack_rotations()

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

int add_at_position(position: Vector2i, item_id: String, amount: int = 1, properties: Dictionary = {}, is_rotated: bool = false) 🔗

There is currently no description for this method. Please help us by contributing one!


bool can_rotate_item(stack: ItemStack) const 🔗

There is currently no description for this method. Please help us by contributing one!


QuadTree get_quad_tree() const 🔗

There is currently no description for this method. Please help us by contributing one!


ItemStack get_stack_at(position: Vector2i) const 🔗

There is currently no description for this method. Please help us by contributing one!


int get_stack_index_at(position: Vector2i) const 🔗

There is currently no description for this method. Please help us by contributing one!


Vector2i get_stack_position(stack: ItemStack) const 🔗

There is currently no description for this method. Please help us by contributing one!


Rect2i get_stack_rect(stack: ItemStack) const 🔗

There is currently no description for this method. Please help us by contributing one!


Vector2i get_stack_size(stack: ItemStack) const 🔗

There is currently no description for this method. Please help us by contributing one!


Array[ItemStack] get_stacks_under(rect: Rect2i) const 🔗

There is currently no description for this method. Please help us by contributing one!


bool has_free_place(stack_size: Vector2i, exception: ItemStack = null) const 🔗

There is currently no description for this method. Please help us by contributing one!


bool is_stack_rotated(stack: ItemStack) const 🔗

There is currently no description for this method. Please help us by contributing one!


bool rect_free(rect: Rect2i, exception: ItemStack = null) const 🔗

There is currently no description for this method. Please help us by contributing one!


void rotate(stack: ItemStack) 🔗

There is currently no description for this method. Please help us by contributing one!


void set_quad_tree(quad_tree: QuadTree) 🔗

There is currently no description for this method. Please help us by contributing one!


bool set_stack_position(stack: ItemStack, new_position: Vector2i) 🔗

There is currently no description for this method. Please help us by contributing one!


bool sort() 🔗

There is currently no description for this method. Please help us by contributing one!


bool swap_stacks(position: Vector2i, other_inventory: GridInventory, other_position: Vector2i) 🔗

There is currently no description for this method. Please help us by contributing one!


int transfer_to(from_position: Vector2i, destination: GridInventory, destination_position: Vector2i, amount: int = 1, is_rotated: bool = false) 🔗

There is currently no description for this method. Please help us by contributing one!