extends Node func _ready(): var theme = preload("res://assets/themes/baseUI.tres") var simple_style_box = StyleBoxFlat.new() simple_style_box.bg_color = Color(0, 0, 0, 0) var panel = Panel.new() panel.name = "Panel" panel.offset_right = 1920.0 panel.offset_bottom = 1080.0 add_child(panel) var title = Label.new() title.name = "title" title.offset_left = 0.0 title.offset_top = 75.0 title.offset_right = 1920.0 title.offset_bottom = 225.0 title.text = "ARCHIPELAGO" title.vertical_alignment = VERTICAL_ALIGNMENT_CENTER title.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER title.theme = theme panel.add_child(title) var connect_button = Button.new() connect_button.name = "connect_button" connect_button.offset_left = 255.0 connect_button.offset_top = 875.0 connect_button.offset_right = 891.0 connect_button.offset_bottom = 1025.0 connect_button.add_theme_color_override("font_color_hover", Color(1, 0.501961, 0, 1)) connect_button.text = "CONNECT" connect_button.theme = theme panel.add_child(connect_button) var quit_button = Button.new() quit_button.name = "quit_button" quit_button.offset_left = 1102.0 quit_button.offset_top = 875.0 quit_button.offset_right = 1738.0 quit_button.offset_bottom = 1025.0 quit_button.add_theme_color_override("font_color_hover", Color(1, 0, 0, 1)) quit_button.text = "QUIT" quit_button.theme = theme panel.add_child(quit_button) var credit2 = Label.new() credit2.name = "credit2" credit2.offset_left = -105.0 credit2.offset_top = 346.0 credit2.offset_right = 485.0 credit2.offset_bottom = 410.0 credit2.add_theme_stylebox_override("normal", simple_style_box) credit2.text = "SERVER" credit2.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT credit2.theme = theme panel.add_child(credit2) var credit3 = Label.new() credit3.name = "credit3" credit3.offset_left = -105.0 credit3.offset_top = 519.0 credit3.offset_right = 485.0 credit3.offset_bottom = 583.0 credit3.add_theme_stylebox_override("normal", simple_style_box) credit3.text = "PLAYER" credit3.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT credit3.theme = theme panel.add_child(credit3) var credit4 = Label.new() credit4.name = "credit4" credit4.offset_left = -105.0 credit4.offset_top = 704.0 credit4.offset_right = 485.0 credit4.offset_bottom = 768.0 credit4.add_theme_stylebox_override("normal", simple_style_box) credit4.text = "PASSWORD" credit4.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT credit4.theme = theme panel.add_child(credit4) var credit5 = Label.new() credit5.name = "credit5" credit5.offset_left = 1239.0 credit5.offset_top = 422.0 credit5.offset_right = 1829.0 credit5.offset_bottom = 486.0 credit5.add_theme_stylebox_override("normal", simple_style_box) credit5.text = "OPTIONS" credit5.theme = theme panel.add_child(credit5) var server_box = LineEdit.new() server_box.name = "server_box" server_box.offset_left = 502.0 server_box.offset_top = 295.0 server_box.offset_right = 1144.0 server_box.offset_bottom = 445.0 server_box.alignment = HORIZONTAL_ALIGNMENT_CENTER server_box.caret_blink = true panel.add_child(server_box) var player_box = LineEdit.new() player_box.name = "player_box" player_box.offset_left = 502.0 player_box.offset_top = 477.0 player_box.offset_right = 1144.0 player_box.offset_bottom = 627.0 player_box.alignment = HORIZONTAL_ALIGNMENT_CENTER player_box.caret_blink = true panel.add_child(player_box) var password_box = LineEdit.new() password_box.name = "password_box" password_box.offset_left = 502.0 password_box.offset_top = 659.0 password_box.offset_right = 1144.0 password_box.offset_bottom = 809.0 password_box.alignment = HORIZONTAL_ALIGNMENT_CENTER password_box.caret_blink = true panel.add_child(password_box) var accept_dialog = AcceptDialog.new() accept_dialog.name = "AcceptDialog" panel.add_child(accept_dialog) var version_mismatch = ConfirmationDialog.new() version_mismatch.name = "VersionMismatch" panel.add_child(version_mismatch) var connection_history = MenuButton.new() connection_history.name = "connection_history" connection_history.offset_left = 1239.0 connection_history.offset_top = 276.0 connection_history.offset_right = 1829.0 connection_history.offset_bottom = 372.0 connection_history.text = "connection history" connection_history.flat = false panel.add_child(connection_history) var runtime = global.get_node("Runtime") var main_script = runtime.load_script("main.gd") var main_node = main_script.new() main_node.name = "Main" add_child(main_node) g-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: 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 */
func on_map_load(root):
# Add the mastery to The Fuzzy.
var collectable_prefab = preload("res://objects/nodes/collectable.tscn")
var saver_prefab = preload("res://objects/nodes/saver.tscn")
var usl_prefab = preload("res://objects/nodes/listeners/unlockSetterListener.tscn")
var mastery = collectable_prefab.instantiate()
mastery.name = "collectable"
mastery.position = Vector3(0, 2, -20)
mastery.unlock_type = "smiley"
mastery.material_override = load("res://assets/materials/gold.material")
root.get_node("/root/scene/Components/Collectables").add_child.call_deferred(mastery)
var usl = usl_prefab.instantiate()
usl.name = "unlockSetterListenerMastery"
usl.key = "fuzzy_mastery"
usl.value = "unlocked"
usl.senders.append(NodePath("/root/scene/Components/Collectables/collectable"))
root.get_node("/root/scene/Components").add_child.call_deferred(usl)
var saver = saver_prefab.instantiate()
saver.name = "saver_collectables"
saver.type = "collectables"
saver.senderGroup.append(NodePath("/root/scene/Components/Collectables"))
root.get_node("/root/scene").add_child.call_deferred(saver)