extends Node const my_version = "0.1.0" var SCRIPT_generator var generator var thread = Thread.new() signal finished_randomizing signal randomizer_status func start(gen_seed = ""): thread.start(self, "_thread_func", gen_seed) yield(self, "finished_randomizing") func _thread_func(gen_seed): generator = SCRIPT_generator.new($GeneratedPuzzles) generator.connect("generator_status", self, "statusUpdate") generator.generate(gen_seed) emit_signal("finished_randomizing") func statusUpdate(text): call_deferred("emit_signal", "randomizer_status", text) func getSaveFileName(): return "zzRN_%d" % generator.gen_seed