extends Node2D

class_name Equipment

@onready var anims := $AnimatedSprite2D
@onready var label := $Label

enum TYPE {
	SPONGE,
	MOP,
	KARCHER,
	BUBBLE_GUN,
	SUIT,
	JETPACK,
}

const names := [
	"Sponge",
	"Mop",
	"Karcher",
	"Bubble-Gun",
	"Suit",
	"Jetpack"
]

const stats := [
	[
		[0.0, 1.0, 0.0],
		[0.0, 0.9, 0.0],
		[0.0, 0.7, 0.0]
	],
	[
		[0.0, 0.8, 0.0],
		[0.0, 0.7, 0.0],
		[0.0, 0.5, 0.0]
	],
	[
		[0.0, 0.7, 0.0],
		[0.0, 0.5, 0.0],
		[0.0, 0.3, 0.0]
	],
	[
		[0.0, 0.3, 0.0],
		[0.0, 0.2, 0.0],
		[0.0, 0.1, 0.0]
	],
	[
		[0.0, 0.0, 0.0],
		[0.0, 0.0, 1.0],
		[0.0, 0.0, 3.0]
	],
	[
		[0.0, 1.0, 0.0],
		[0.0, 2.0, 0.0],
		[0.0, 3.0, 0.0]
	]
]

var type := TYPE.SPONGE
var level := 0
var state_type := Astronaut.STAT_TYPES.CLEAN_SPEED 

var modififers : Array[float] = [0.0, 1.0, 0.0]



### 	 ACCESSORS 	 ###






### 	 BUILT-IN 	 ###

func _ready() -> void:
	update_equipment()




### 	 VIRTUAL 	 ###





### 	 LOGIC 	 ###

func get_equipment_name() -> String:
	return names[type] + " +" + str(level+1)


func update_equipment() -> void:
	anims.play(names[type])
	label.text = get_equipment_name()

### 	 SIGNAL-RESPONSE 	 ###
