[{"data":1,"prerenderedAt":137},["ShallowReactive",2],{"class-doc-/reference/2.0/gg_inventory/gginventorystackingstrategy":3,"navigation":65},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"_id":8,"navigation":6,"addon":5,"version":9,"brief_description":10,"description":11,"tutorials":7,"methods":12,"signals":56,"constants":57,"members":58,"inherits":59,"name":60,"title":60,"_source":61,"_file":62,"_stem":63,"_extension":64},"/reference/2.0/gg_inventory/gginventorystackingstrategy","gg_inventory",false,"","content:40.reference:2.0:gg_inventory:GGInventoryStackingStrategy.xml","2.0","Implements the interface for stacking and splitting of inventory items.","The [method stack_items] method stacks as many items as possible to \"unclutter\" the inventory. The [method split_item] method can be used to split an item into two. In addition, the provided [method can_stack] and [method stack] methods. [br][br]The methods in this class are not intended to be called directly. They are called by a [GGInventory] instance. [br][br][b]Note[/b]: This class does not provide an implementation. Please use [GGInventoryStackingStrategyDefault] instead.",[13,29,41,48],{"description":14,"name":15,"public":16,"returnType":17,"params":18},"Returns whether the [param source_item] from the [param source_inventory] can be stacked onto the [param target_item] in the [param target_inventory].","can_stack",true,"bool",[19,22,24,27],{"name":20,"type":21},"source_inventory","GGInventory",{"name":23,"type":21},"target_inventory",{"name":25,"type":26},"source_item","GGItemData",{"name":28,"type":26},"target_item",{"description":30,"name":31,"public":16,"returnType":32,"params":33},"Attempt to stack source onto target. returns the quantity that was stacked (0 means nothing was stacked).","stack","int",[34,35,36,37,39],{"name":20,"type":21},{"name":23,"type":21},{"name":25,"type":26},{"name":38,"type":32},"target_slot_id",{"name":40,"type":32},"quantity",{"description":42,"name":43,"public":16,"returnType":44,"params":45},"Combine all compatible stackable items in the inventory, so they take up the least amount of slots possible.","stack_items","void",[46],{"name":47,"type":21},"inventory",{"description":49,"name":50,"public":16,"returnType":44,"params":51},"Splits an item into two. If no [param quantity] is specified, it will split the [param item] as evenly in half as possible.","split_item",[52,53,55],{"name":47,"type":21},{"name":54,"type":26},"item",{"name":40,"type":32},[],[],[],"Resource","GGInventoryStackingStrategy","content","40.reference/2.0/gg_inventory/GGInventoryStackingStrategy.xml","40.reference/2.0/gg_inventory/GGInventoryStackingStrategy","xml",[66,75,102,122],{"title":67,"_path":68,"children":69},"Getting Started","/getting-started",[70,72],{"title":71,"_path":68},"Introduction",{"title":73,"_path":74},"Installation","/getting-started/installation",{"title":76,"_path":77,"children":78},"Concepts","/concepts",[79,81,84,87,90,93,96,99],{"title":80,"_path":77},"Overview",{"title":82,"_path":83},"Inventory","/concepts/inventory",{"title":85,"_path":86},"Interactions","/concepts/interaction",{"title":88,"_path":89},"Permissions","/concepts/permissions",{"title":91,"_path":92},"Multiplayer","/concepts/multiplayer",{"title":94,"_path":95},"User Interface","/concepts/user-interface",{"title":97,"_path":98},"Game Integration","/concepts/game-integration",{"title":100,"_path":101},"Crafting","/concepts/crafting",{"title":103,"_path":104,"children":105},"Demos","/demos",[106,108,111,114,116,119],{"title":107,"_path":104},"Inventory Tour",{"title":109,"_path":110},"Inventory UI Playground","/demos/inventory_ui",{"title":112,"_path":113},"Inventory Game UI","/demos/inventory_game_ui",{"title":100,"_path":115},"/demos/crafting",{"title":117,"_path":118},"Multiplayer Lobby","/demos/mp_lobby",{"title":120,"_path":121},"Sequencer (prototype)","/demos/sequencer",{"title":123,"_path":124,"children":125},"Guide","/guide",[126,128,131,134],{"title":127,"_path":124},"Architecture Deep Dive",{"title":129,"_path":130},"Design Principles","/guide/design-principles",{"title":132,"_path":133},"Changelog v2.x","/guide/changelog-v2",{"title":135,"_path":136},"Changelog v1.x","/guide/changelog",1743268976777]