diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-12-09 13:14:25 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-12-09 13:14:25 -0500 |
commit | f0555579cd462b27c71c486bd7456265cc827937 (patch) | |
tree | 12dd8a500dd836f9466e534039fda46005547639 /randomizer/randomizer.gd | |
parent | e72b3e5fae63db0f669155b7b965c2c5fc6f97e3 (diff) | |
download | lingo-randomizer-f0555579cd462b27c71c486bd7456265cc827937.tar.gz lingo-randomizer-f0555579cd462b27c71c486bd7456265cc827937.tar.bz2 lingo-randomizer-f0555579cd462b27c71c486bd7456265cc827937.zip |
Starting to work
Diffstat (limited to 'randomizer/randomizer.gd')
-rw-r--r-- | randomizer/randomizer.gd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/randomizer/randomizer.gd b/randomizer/randomizer.gd new file mode 100644 index 0000000..ff558a3 --- /dev/null +++ b/randomizer/randomizer.gd | |||
@@ -0,0 +1,26 @@ | |||
1 | extends Node | ||
2 | |||
3 | const my_version = "0.1.0" | ||
4 | |||
5 | var SCRIPT_generator | ||
6 | |||
7 | var generator | ||
8 | |||
9 | signal finished_randomizing | ||
10 | signal randomizer_status | ||
11 | |||
12 | |||
13 | func start(gen_seed = ""): | ||
14 | generator = SCRIPT_generator.new($GeneratedPuzzles) | ||
15 | generator.connect("generator_status", self, "statusUpdate") | ||
16 | generator.generate(gen_seed) | ||
17 | |||
18 | emit_signal("finished_randomizing") | ||
19 | |||
20 | |||
21 | func statusUpdate(text): | ||
22 | emit_signal("randomizer_status", text) | ||
23 | |||
24 | |||
25 | func getSaveFileName(): | ||
26 | return "zzRN_%d" % generator.gen_seed | ||