extends Node

onready var ConsoleService = $"/root/ConsoleService"
onready var TaskService = $"/root/TaskService"

const package = {
	"name": "voxel_mesher",
	"version": "0.1.0"
}

func init():
	ConsoleService.log("[VoxelMesher] Mod Init")
	TaskService.connect('task_start', self, 'task_monitor')
	
func task_monitor(task):
	if task.name == 'start_game': start()

func start():
	var scene_root = $"/root/Main/Scene"
	var scene = preload("VoxelScene.tscn")
	var scene_instance = scene.instance()
	scene_root.add_child(scene_instance)
