# Plik: res://data/GameClasses.gd
extends Resource 
class_name GameClasses # Użyjemy go do globalnego dostępu (jak Singleton dla klas)

# =========================================================================
# === 1. KLASA DANYCH PLANETY =============================================
# =========================================================================
class PlanetData extends Resource:
	@export var name: String = ""
	@export var size: int = 1
	@export var orbit_radius: float = 0.0 
	@export var angle: float = 0.0
	@export var rotation_speed: float = 0.0
	@export var texture_path: String = "" 
	
	func randomize_properties():
		size = randi_range(1, 5)
		rotation_speed = randf_range(0.0001, 0.001)
		var tex_id = randi_range(1, 18) 
		texture_path = "res://assets/planets/p%d.png" % tex_id


# =========================================================================
# === 2. KLASA DANYCH GWIAZDY/SEKTORA ====================================
# =========================================================================
class StarData extends Resource:
	@export var name: String = ""
	@export var position: Vector2 = Vector2.ZERO
	@export var type: String = "G2V" 
	@export var texture_path: String = ""
	@export var planets: Array = [] # Lista obiektów PlanetData
	
	func randomize_properties():
		var types = ["O", "B", "A", "F", "G", "K", "M"]
		type = types[randi() % types.size()]
		var tex_id = randi_range(1, 3) 
		texture_path = "res://assets/stars/s%d.png" % tex_id
		name = "Ziemia" 
