41 lines
739 B
GDScript
41 lines
739 B
GDScript
extends Interactable
|
|
|
|
|
|
var test: bool = false
|
|
|
|
func _init() -> void:
|
|
max_person_using = 1
|
|
can_store = true
|
|
print("init")
|
|
func _ready() -> void:
|
|
self.owner = $".."
|
|
print(self)
|
|
#object_placed.connect(_on_object_placed.bind(self))
|
|
print("ready")
|
|
|
|
|
|
|
|
|
|
func start_action(person, object):
|
|
pass
|
|
|
|
|
|
func give_out(person):
|
|
pass
|
|
|
|
|
|
func _on_object_placed(_owner):
|
|
print(2)
|
|
print(_owner)
|
|
var newItem = ItemManager.get_item(0).instantiate()
|
|
ItemManager.add_shelf(_owner)
|
|
#ItemManager.shelfes.append(_owner)
|
|
ItemManager.add_item_to_shelf(_owner, newItem)
|
|
print("placed")
|
|
|
|
func create():
|
|
var newItem = ItemManager.get_item(0).instantiate()
|
|
ItemManager.shelfes.append(self)
|
|
ItemManager.add_item_to_shelf(self, newItem)
|
|
print("placed")
|