virtual_item_container

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Source File: addons/grid_building/systems/building/virtual/virtual_item_container.gd

Extends: Node

Public Methods

try_remove

1
2
3
4
try_remove(
    type: Resource,
    amount: int
) -> int

Provides virtual methods for an inventory node class that needs to work with SpendMaterialsRuleGeneric Tries to remove a number of items from the container Returns the actual amount removed


try_add

1
2
3
4
try_add(
    type: Resource,
    amount: int
) -> int

Tries to add a number of an item to the container Returns the actual amount added


get_count

1
get_count(type: Resource) -> int

Gets a number count of an item type stored in the container if any