From cb2eca4fed1eb3692eaa13715f65ebcaf8472b64 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 25 Sep 2025 14:14:22 -0400 Subject: Client can be run from zipped apworld now --- apworld/client/run_from_apworld.tscn | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 apworld/client/run_from_apworld.tscn (limited to 'apworld/client/run_from_apworld.tscn') diff --git a/apworld/client/run_from_apworld.tscn b/apworld/client/run_from_apworld.tscn new file mode 100644 index 0000000..11373e0 --- /dev/null +++ b/apworld/client/run_from_apworld.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=11 format=2] + +[sub_resource id=2 type="GDScript"] +script/source = "extends Node2D + + +func _ready(): + var args = OS.get_cmdline_user_args() + var apworld_path = args[0] + + var zip_reader = ZIPReader.new() + zip_reader.open(apworld_path) + + var runtime_script = GDScript.new() + runtime_script.source_code = zip_reader.read_file(\"lingo2/client/apworld_runtime.gd\").get_string_from_utf8() + runtime_script.reload() + + zip_reader.close() + + var runtime = runtime_script.new(apworld_path) + runtime.name = \"Runtime\" + + global.add_child(runtime) + + runtime.load_script_as_scene.call_deferred(\"settings_screen.gd\", \"settings_screen\") + +" + +[node name="loader" type="Node2D"] +script = SubResource( 2 ) -- cgit 1.4.1