about summary refs log tree commit diff stats
path: root/data/maps/the_lionized/rooms
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/the_lionized/rooms')
-rw-r--r--data/maps/the_lionized/rooms/Puzzle Room.txtpb3
1 files changed, 2 insertions, 1 deletions
diff --git a/data/maps/the_lionized/rooms/Puzzle Room.txtpb b/data/maps/the_lionized/rooms/Puzzle Room.txtpb index 22b72ac..e96d441 100644 --- a/data/maps/the_lionized/rooms/Puzzle Room.txtpb +++ b/data/maps/the_lionized/rooms/Puzzle Room.txtpb
@@ -58,5 +58,6 @@ panels {
58ports { 58ports {
59 name: "ENTRY" 59 name: "ENTRY"
60 path: "Components/Warps/worldport" 60 path: "Components/Warps/worldport"
61 orientation: "south" 61 destination { x: 0 y: 0 z: 6.5 }
62 rotation: 0
62} 63}
Star Rauchenberger <fefferburbia@gmail.com> 2023-04-20 23:14:53 -0400 committer Star Rauchenberger <fefferburbia@gmail.com> 2023-04-20 23:14:53 -0400 Returning to main menu now disconnects' href='/lingo-archipelago/commit/Archipelago/settings_screen.gd?h=v0.12.3&id=a7c26b74bbdafc93f8a2441f692647a7e55a47ed'>a7c26b7 ^
d2b6ecc ^
617e31f ^
0fcd3a8 ^


357e2f6 ^
679bba3 ^
437438a ^
0fcd3a8 ^





679bba3 ^
1969ba5 ^








679bba3 ^
617e31f ^




















357e2f6 ^








679bba3 ^
a80fefd ^

679bba3 ^


a80fefd ^
679bba3 ^
cc45280 ^


86a87b8 ^

cc45280 ^



357e2f6 ^
cc45280 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107







                                                      



                                                                                             

                                                                   

                                                                                              

                                                      
 




                                                                                       



                                                                                 
                                                                                     

                                                                                     
                                                                               
                                                                               
                                                                                     
 


                                                                             
                                                                    
 
                                              





                                                                                    
 








                                                                                 
 




















                                                                                                        








                                                        
                            

                                                     


                                                       
                                                     
                                                                               


                                           

                                                              



                                                               
                                     
                              
extends Spatial


func _ready():
	# Undo the load screen removing our cursor
	get_tree().get_root().set_disable_input(false)
	Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)

	# Increase the WebSocket input buffer size so that we can download large
	# data packages.
	ProjectSettings.set_setting("network/limits/websocket_client/max_in_buffer_kb", 8192)

	# Create the global AP client, if it doesn't already exist.
	if not global.has_node("Archipelago"):
		var apclient_script = ResourceLoader.load("user://maps/Archipelago/client.gd")
		var apclient_instance = apclient_script.new()
		apclient_instance.name = "Archipelago"
		global.add_child(apclient_instance)

		var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd")
		var apdata_instance = apdata.new()
		apdata_instance.name = "Gamedata"
		apclient_instance.add_child(apdata_instance)

		# Let's also inject any scripts we need to inject now.
		installScriptExtension("user://maps/Archipelago/doorControl.gd")
		installScriptExtension("user://maps/Archipelago/load.gd")
		installScriptExtension("user://maps/Archipelago/painting_eye.gd")
		installScriptExtension("user://maps/Archipelago/painting_scenery.gd")
		installScriptExtension("user://maps/Archipelago/panelLevelSwitch.gd")
		installScriptExtension("user://maps/Archipelago/panelEnd.gd")
		installScriptExtension("user://maps/Archipelago/panelInput.gd")
		installScriptExtension("user://maps/Archipelago/pause_menu.gd")
		installScriptExtension("user://maps/Archipelago/worldTransporter.gd")

	var apclient = global.get_node("Archipelago")
	apclient.connect("client_connected", self, "connectionSuccessful")
	apclient.connect("could_not_connect", self, "connectionUnsuccessful")
	apclient.connect("connect_status", self, "connectionStatus")

	# Populate textboxes with AP settings.
	self.get_node("Panel/server_box").text = apclient.ap_server
	self.get_node("Panel/player_box").text = apclient.ap_user
	self.get_node("Panel/password_box").text = apclient.ap_pass

	# Show client version.
	self.get_node("Panel/title").text = "ARCHIPELAGO (%s)" % apclient.my_version

	# Increase font size in text boxes.
	var field_font = DynamicFont.new()
	field_font.font_data = load("res://fonts/CutiveMono_Regular.ttf")
	field_font.size = 36

	self.get_node("Panel/server_box").add_font_override("font", field_font)
	self.get_node("Panel/player_box").add_font_override("font", field_font)
	self.get_node("Panel/password_box").add_font_override("font", field_font)


# Adapted from https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/game/ModLoader.gd
func installScriptExtension(childScriptPath: String):
	var childScript = ResourceLoader.load(childScriptPath)

	# Force Godot to compile the script now.
	# We need to do this here to ensure that the inheritance chain is
	# properly set up, and multiple mods can chain-extend the same
	# class multiple times.
	# This is also needed to make Godot instantiate the extended class
	# when creating singletons.
	# The actual instance is thrown away.
	childScript.new()

	var parentScript = childScript.get_base_script()
	var parentScriptPath = parentScript.resource_path
	global._print(
		"ModLoader: Installing script extension: %s <- %s" % [parentScriptPath, childScriptPath]
	)
	childScript.take_over_path(parentScriptPath)


func connectionStatus(message):
	var popup = self.get_node("Panel/AcceptDialog")
	popup.window_title = "Connecting to Archipelago"
	popup.dialog_text = message
	popup.popup_exclusive = true
	popup.get_ok().visible = false
	popup.popup_centered()


func connectionSuccessful():
	var apclient = global.get_node("Archipelago")

	# Switch to LL1
	Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
	global.map = "level1"
	global.save_file = apclient.getSaveFileName()
	var _discard = get_tree().change_scene("res://scenes/load_screen.tscn")


func connectionUnsuccessful(error_message):
	self.get_node("Panel/connect_button").disabled = false

	var popup = self.get_node("Panel/AcceptDialog")
	popup.window_title = "Could not connect to Archipelago"
	popup.dialog_text = error_message
	popup.popup_exclusive = true
	popup.get_ok().visible = true
	popup.popup_centered()