@icon("./gear.png")
class_name Gear extends Node3D

func gear_name():
	return "Gear"
func model_file():
	return "hammer.glb"
func continuous():
	return false
func idle_basis():
	return Basis(
		Vector3(1, 0, 0),
		Vector3(0, 1, 0),
		Vector3(0, 0, 1))
func use_basis():
	return Basis(
		Vector3(1, 0, 0),
		Vector3(0, 0, -1),
		Vector3(0, 1, 0))
func pickup_basis():
	return idle_basis()

func use(player):
	basis = use_basis()
	$Timer.start()
	on_use(player)

func unequip(player):
	on_unequip(player)

func on_use(_player):
	pass

func on_unequip(_player):
	pass

func on_ready():
	pass

func _on_timer_timeout():
	basis = idle_basis()

func _ready():
	basis = idle_basis()
	if get_parent() is GearPickup:
		basis = pickup_basis()
	on_ready()
