about summary refs log tree commit diff stats
path: root/data/maps/the_parthenon/metadata.txtpb
blob: 8696c333da0cb7f6adf3ccf2b555349346c9e9cf (plain) (blame)
1
display_name: "The Parthenon"
tyle: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
[gd_scene load_steps=3 format=3 uid="uid://b5mj3cq2bcesd"]

[ext_resource type="Theme" uid="uid://7w454egydi41" path="res://assets/themes/baseUI.tres" id="1_mw3f1"]

[sub_resource id=2 type="GDScript"]
script/source = "extends Node2D

const CACHE_PATH = \"user://apworld_path.txt\"


func _ready():
	if FileAccess.file_exists(CACHE_PATH):
		var file = FileAccess.open(CACHE_PATH, FileAccess.READ)
		$Panel/HBoxContainer/LineEdit.text = file.get_as_text()
		file.close()


func _browse_pressed():
	$FileDialog.popup_centered()


func _file_selected(path):
	$Panel/HBoxContainer/LineEdit.text = path


func _start_pressed():
	var apworld_path = $Panel/HBoxContainer/LineEdit.text

	if not FileAccess.file_exists(apworld_path):
		$AcceptDialog.popup_centered()
		return

	var zip_reader = ZIPReader.new()
	zip_reader.open(apworld_path)

	var inner_path = \"lingo2/client/apworld_runtime.gd\"
	if not zip_reader.file_exists(inner_path):
		zip_reader.close()
		$AcceptDialog.popup_centered()
		return
	
	var cache_file = FileAccess.open(CACHE_PATH, FileAccess.WRITE)
	cache_file.store_string(apworld_path)
	cache_file.close()
	
	var runtime_script = GDScript.new()
	runtime_script.source_code = zip_reader.read_file(inner_path).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\")


func _quit_pressed():
	get_tree().change_scene_to_file(\"res://objects/scenes/menus/main_menu.tscn\")

"

[node name="Node2D" type="Node2D"]
script = SubResource( 2 )

[node name="Panel" type="Panel" parent="."]
anchors_preset = -1
offset_right = 1920.0
offset_bottom = 1080.0

[node name="Label" type="Label" parent="Panel"]
layout_mode = 1
anchors_preset = -1
offset_top = 75.0
offset_right = 1920.0
offset_bottom = 225.0
theme = ExtResource("1_mw3f1")
text = "archipelago"
horizontal_alignment = 1
vertical_alignment = 1

[node name="Label2" type="Label" parent="Panel"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
offset_left = 80.0
offset_top = 300.0
offset_right = -80.0
offset_bottom = 388.0
theme = ExtResource("1_mw3f1")
theme_override_font_sizes/font_size = 56
text = "Put the path to your lingo2.apworld in the below field and click start. Then, open the archipelago launcher and click \"Lingo 2 Client\"."
horizontal_alignment = 1
autowrap_mode = 3

[node name="HBoxContainer" type="HBoxContainer" parent="Panel"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
offset_left = 80.0
offset_top = 595.0
offset_right = -80.0
offset_bottom = 755.0
theme_override_constants/separation = 32

[node name="LineEdit" type="LineEdit" parent="Panel/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3

[node name="Button" type="Button" parent="Panel/HBoxContainer"]
layout_mode = 2
theme = ExtResource("1_mw3f1")
text = "browse"

[node name="StartButton" type="Button" parent="Panel"]
layout_mode = 1
anchors_preset = -1
offset_left = 255.0
offset_top = 875.0
offset_right = 891.0
offset_bottom = 1025.0
theme = ExtResource("1_mw3f1")
text = "start"

[node name="QuitButton" type="Button" parent="Panel"]
layout_mode = 1
anchors_preset = -1
offset_left = 1102.0
offset_top = 875.0
offset_right = 1738.0
offset_bottom = 1025.0
theme = ExtResource("1_mw3f1")
text = "back"

[node name="FileDialog" type="FileDialog" parent="."]
title = "Open a File"
size = Vector2i(512, 512)
ok_button_text = "Open"
file_mode = 0
access = 2
filters = PackedStringArray("*.apworld;Archipelago Worlds")
show_hidden_files = true
use_native_dialog = true

[node name="AcceptDialog" type="AcceptDialog" parent="."]
dialog_text = "Could not open Lingo 2 apworld. Please check that the path is correct."

[connection signal="pressed" from="Panel/HBoxContainer/Button" to="." method="_browse_pressed"]
[connection signal="pressed" from="Panel/StartButton" to="." method="_start_pressed"]
[connection signal="pressed" from="Panel/QuitButton" to="." method="_quit_pressed"]
[connection signal="file_selected" from="FileDialog" to="." method="_file_selected"]