Splitters part 1

This commit is contained in:
Rendo 2025-10-16 23:29:49 +05:00
commit 3c0777f4fd
9 changed files with 150 additions and 2 deletions

View file

@ -24,7 +24,7 @@ func _process(_delta: float) -> void:
var output : Structure = get_output_structure()
if output == null:
return
var transfer_context : InventoryContext = InventoryContext.new(structure_parent,output,get_output_position())
var transfer_context : InventoryContext = InventoryContext.new(structure_parent,output,structure_parent.relative_tile_as_global(get_output_position()))
if output.inventory.can_add(inventory.output_slot.held_item,transfer_context):
inventory.output_slot.merge_stack(output.inventory.add(inventory.output_slot.extract(),transfer_context))