extends Node

var level := 1

var score := 0
var mainteance := -0

var dirt_range := Vector2(-1, 0)

var selectables : Array[Astronaut] = []
var selected : Array[Astronaut] = []

const new_crew := {"call_sign": "X09D",
	"anim_type":"white",
	"equipment":[
		{"type":Equipment.TYPE.SPONGE,"level":0},
		{"type":Equipment.TYPE.SUIT,"level":0},
		{"type":Equipment.TYPE.JETPACK,"level":0},
		]
	}

var crew := [
	{"call_sign": "X09D",
	"anim_type":"white",
	"equipment":[
		{"type":Equipment.TYPE.SPONGE,"level":0},
		{"type":Equipment.TYPE.SUIT,"level":0},
		{"type":Equipment.TYPE.JETPACK,"level":0},
		]
	}
]

var used_call_signs := ["X09D"]

const equipment_price := [
	[
		[0,20,40]
	],
	[
		[40,80,160]
	],
	[
		[160,320,640]
	],
	[
		[640,1280,2560]
	],
	[
		[0,40,80]
	],
	[
		[0,40,80]
	]
]

const equipment_maintenance_cost := [
	[
		[5,10,20]
	],
	[
		[10,20,40]
	],
	[
		[20,40,80]
	],
	[
		[40,80,160]
	],
	[
		[5,10,20]
	],
	[
		[5,10,20]
	]
]


const alphanumeric := ["A","B","C","D","E","F","G","H","I","J","K","L",
"M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",
"0","1","2","3","4","5","6","7","8","9"]



### 	 ACCESSORS 	 ###






### 	 BUILT-IN 	 ###

func _ready() -> void:
	pass




### 	 VIRTUAL 	 ###





### 	 LOGIC 	 ###

func generate_callsign() -> String:
	return alphanumeric.pick_random() + alphanumeric.pick_random() + alphanumeric.pick_random() + alphanumeric.pick_random()


func get_new_callsign() -> String:
	var new_callsign = generate_callsign()
	while used_call_signs.find(new_callsign) != -1:
		new_callsign = generate_callsign()
	used_call_signs.append(new_callsign)
	return new_callsign



### 	 SIGNAL-RESPONSE 	 ###
