class_name Scene_Manager
extends Node

signal scene_changed(scene_path: String)

func change_scene(scene_path: String) -> void:
	var error: Error = get_tree().change_scene_to_file(scene_path)
	if error != OK:
		return
	scene_changed.emit(scene_path)

func reload_current_scene() -> void:
	var scene_file_path: String = get_tree().current_scene.scene_file_path
	if scene_file_path == "":
		return
	change_scene(scene_file_path)

func quit_game() -> void:
	get_tree().quit()
