extends Node const my_version = "0.1.0" var SCRIPT_generator var SCRIPT_steady var generator var steady 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) var rng = RandomNumberGenerator.new() rng.seed = generator.gen_seed steady = SCRIPT_steady.new() steady.generate(rng) emit_signal("finished_randomizing") func statusUpdate(text): call_deferred("emit_signal", "randomizer_status", text) func getSaveFileName(): return "zzRN_%d" % generator.gen_seed