34 lines
568 B
GDScript
34 lines
568 B
GDScript
extends Interactable
|
|
|
|
|
|
var test: bool = false
|
|
|
|
func _init() -> void:
|
|
max_person_using = 1
|
|
can_store = true
|
|
func _ready() -> void:
|
|
self.owner = $".."
|
|
print(self)
|
|
#object_placed.connect(_on_object_placed.bind(self))
|
|
|
|
|
|
|
|
|
|
func start_action(person, object):
|
|
if person.target_action == "take":
|
|
give_out(person)
|
|
|
|
|
|
func give_out(person):
|
|
person.hold_item(person.target_item)
|
|
stored_items.erase(person.target_item)
|
|
|
|
|
|
|
|
|
|
|
|
func create():
|
|
var newItem = ItemManager.get_item(0).instantiate()
|
|
ItemManager.add_shelf(self)
|
|
ItemManager.add_item_to_shelf(self, newItem)
|