belt improvements
This commit is contained in:
parent
eab885b9d3
commit
4bae29f29f
7 changed files with 10 additions and 7 deletions
|
@ -4,6 +4,6 @@ const test_item :=preload("res://generic/items/dbg_item.tres")
|
|||
|
||||
func _process(_delta: float) -> void:
|
||||
for point in [Vector2(-1,0),Vector2(1,0),Vector2(0,1),Vector2(0,-1)]:
|
||||
var found_structure = get_parent().get_relative(point)
|
||||
var found_structure :Structure = get_parent().get_relative(point)
|
||||
if found_structure and found_structure.inventory:
|
||||
found_structure.inventory.add(Stack.new(test_item,1))
|
||||
found_structure.inventory.add_from_side(Stack.new(test_item,randi_range(1,test_item.stack_size)),Structure.facing_to_vector(found_structure.facing).angle_to(point))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue