diff options
Diffstat (limited to 'apworld/client/run_from_source.tscn')
-rw-r--r-- | apworld/client/run_from_source.tscn | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/apworld/client/run_from_source.tscn b/apworld/client/run_from_source.tscn new file mode 100644 index 0000000..b710677 --- /dev/null +++ b/apworld/client/run_from_source.tscn | |||
@@ -0,0 +1,23 @@ | |||
1 | [gd_scene load_steps=11 format=2] | ||
2 | |||
3 | [sub_resource id=2 type="GDScript"] | ||
4 | script/source = "extends Node2D | ||
5 | |||
6 | |||
7 | func _ready(): | ||
8 | var args = OS.get_cmdline_user_args() | ||
9 | var source_path = args[0] | ||
10 | |||
11 | var runtime_script = ResourceLoader.load(\"%s/source_runtime.gd\" % source_path) | ||
12 | var runtime = runtime_script.new(source_path) | ||
13 | runtime.name = \"Runtime\" | ||
14 | |||
15 | global.add_child(runtime) | ||
16 | |||
17 | var settings_screen = runtime.load_path(\"settings_screen.tscn\") | ||
18 | get_tree().change_scene_to_packed(settings_screen) | ||
19 | |||
20 | " | ||
21 | |||
22 | [node name="loader" type="Node2D"] | ||
23 | script = SubResource( 2 ) | ||