diff options
-rw-r--r-- | Archipelago/client.gd | 33 | ||||
-rw-r--r-- | Archipelago/mypainting.gd | 113 | ||||
-rw-r--r-- | Archipelago/player.gd | 2 | ||||
-rw-r--r-- | CHANGELOG.md | 29 |
4 files changed, 115 insertions, 62 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index bc952b9..1966374 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -18,7 +18,7 @@ var enable_multiplayer = false | |||
18 | var track_player = false | 18 | var track_player = false |
19 | var connection_history = [] | 19 | var connection_history = [] |
20 | 20 | ||
21 | const my_version = "3.0.1" | 21 | const my_version = "3.1.0" |
22 | const ap_version = {"major": 0, "minor": 4, "build": 6, "class": "Version"} | 22 | const ap_version = {"major": 0, "minor": 4, "build": 6, "class": "Version"} |
23 | const color_items = [ | 23 | const color_items = [ |
24 | "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" | 24 | "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" |
@@ -116,6 +116,7 @@ var _cached_slowness = 0 | |||
116 | var _cached_iceland = 0 | 116 | var _cached_iceland = 0 |
117 | var _cached_atbash = 0 | 117 | var _cached_atbash = 0 |
118 | var _geronimo_skip = false | 118 | var _geronimo_skip = false |
119 | var _checked_paintings = [] | ||
119 | 120 | ||
120 | signal could_not_connect | 121 | signal could_not_connect |
121 | signal connect_status | 122 | signal connect_status |
@@ -366,6 +367,18 @@ func _on_data(): | |||
366 | 367 | ||
367 | requestSync() | 368 | requestSync() |
368 | 369 | ||
370 | sendMessage( | ||
371 | [ | ||
372 | { | ||
373 | "cmd": "Set", | ||
374 | "key": "Lingo_%d_Paintings" % [_slot], | ||
375 | "default": [], | ||
376 | "want_reply": true, | ||
377 | "operations": [{"operation": "default", "value": []}] | ||
378 | } | ||
379 | ] | ||
380 | ) | ||
381 | |||
369 | emit_signal("client_connected") | 382 | emit_signal("client_connected") |
370 | 383 | ||
371 | elif cmd == "ConnectionRefused": | 384 | elif cmd == "ConnectionRefused": |
@@ -483,6 +496,10 @@ func _on_data(): | |||
483 | # Return the player home. | 496 | # Return the player home. |
484 | get_tree().get_root().get_node("Spatial/player/pause_menu")._reload() | 497 | get_tree().get_root().get_node("Spatial/player/pause_menu")._reload() |
485 | 498 | ||
499 | elif cmd == "SetReply": | ||
500 | if message.has("key") and message["key"] == ("Lingo_%d_Paintings" % _slot): | ||
501 | _checked_paintings = message["value"] | ||
502 | |||
486 | 503 | ||
487 | func _process(_delta): | 504 | func _process(_delta): |
488 | if _should_process: | 505 | if _should_process: |
@@ -641,13 +658,14 @@ func sendLocation(loc_id): | |||
641 | _held_locations.append(loc_id) | 658 | _held_locations.append(loc_id) |
642 | 659 | ||
643 | 660 | ||
644 | func setValue(key, value): | 661 | func setValue(key, value, operation = "replace"): |
645 | sendMessage( | 662 | sendMessage( |
646 | [ | 663 | [ |
647 | { | 664 | { |
648 | "cmd": "Set", | 665 | "cmd": "Set", |
649 | "key": "Lingo_%d_%s" % [_slot, key], | 666 | "key": "Lingo_%d_%s" % [_slot, key], |
650 | "operations": [{"operation": "replace", "value": value}] | 667 | "want_reply": false, |
668 | "operations": [{"operation": operation, "value": value}] | ||
651 | } | 669 | } |
652 | ] | 670 | ] |
653 | ) | 671 | ) |
@@ -803,6 +821,15 @@ func geronimo(): | |||
803 | saveLocaldata() | 821 | saveLocaldata() |
804 | 822 | ||
805 | 823 | ||
824 | func checkPainting(painting_id): | ||
825 | if _checked_paintings.has(painting_id): | ||
826 | return | ||
827 | |||
828 | _checked_paintings.append(painting_id) | ||
829 | |||
830 | setValue("Paintings", [painting_id], "add") | ||
831 | |||
832 | |||
806 | func colorForItemType(flags): | 833 | func colorForItemType(flags): |
807 | var int_flags = int(flags) | 834 | var int_flags = int(flags) |
808 | if int_flags & 1: # progression | 835 | if int_flags & 1: # progression |
diff --git a/Archipelago/mypainting.gd b/Archipelago/mypainting.gd index 999b122..7aee434 100644 --- a/Archipelago/mypainting.gd +++ b/Archipelago/mypainting.gd | |||
@@ -30,66 +30,65 @@ func movePainting(): | |||
30 | 30 | ||
31 | 31 | ||
32 | func _looked_at(body, painting): | 32 | func _looked_at(body, painting): |
33 | if ( | 33 | if body.is_in_group("player") and (painting.get_name() == self.get_parent().get_name()): |
34 | target != null | 34 | var apclient = global.get_node("Archipelago") |
35 | and body.is_in_group("player") | 35 | apclient.checkPainting(painting.get_name()) |
36 | and (painting.get_name() == self.get_parent().get_name()) | ||
37 | ): | ||
38 | var target_dir = _dir_to_int(target.orientation) | ||
39 | var source_dir = _dir_to_int(orientation) | ||
40 | var rotate = target_dir - source_dir | ||
41 | if rotate < 0: | ||
42 | rotate += 4 | ||
43 | rotate *= 90 | ||
44 | 36 | ||
45 | var target_painting = target.get_parent() | 37 | if target != null: |
38 | var target_dir = _dir_to_int(target.orientation) | ||
39 | var source_dir = _dir_to_int(orientation) | ||
40 | var rotate = target_dir - source_dir | ||
41 | if rotate < 0: | ||
42 | rotate += 4 | ||
43 | rotate *= 90 | ||
46 | 44 | ||
47 | # this is ACW | 45 | var target_painting = target.get_parent() |
48 | if rotate == 0: | ||
49 | body.translation.x = ( | ||
50 | target_painting.translation.x + (body.translation.x - painting.translation.x) | ||
51 | ) | ||
52 | body.translation.y = ( | ||
53 | target_painting.translation.y + (body.translation.y - painting.translation.y) | ||
54 | ) | ||
55 | body.translation.z = ( | ||
56 | target_painting.translation.z + (body.translation.z - painting.translation.z) | ||
57 | ) | ||
58 | elif rotate == 180: | ||
59 | body.translation.x = ( | ||
60 | target_painting.translation.x - (body.translation.x - painting.translation.x) | ||
61 | ) | ||
62 | body.translation.y = ( | ||
63 | target_painting.translation.y + (body.translation.y - painting.translation.y) | ||
64 | ) | ||
65 | body.translation.z = ( | ||
66 | target_painting.translation.z - (body.translation.z - painting.translation.z) | ||
67 | ) | ||
68 | body.rotate_y(PI) | ||
69 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), PI) | ||
70 | elif rotate == 90: | ||
71 | var diff_x = body.translation.x - painting.translation.x | ||
72 | var diff_y = body.translation.y - painting.translation.y | ||
73 | var diff_z = body.translation.z - painting.translation.z | ||
74 | body.translation.x = target_painting.translation.x + diff_z | ||
75 | body.translation.y = target_painting.translation.y + diff_y | ||
76 | body.translation.z = target_painting.translation.z - diff_x | ||
77 | body.rotate_y(PI / 2) | ||
78 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), PI / 2) | ||
79 | elif rotate == 270: | ||
80 | var diff_x = body.translation.x - painting.translation.x | ||
81 | var diff_y = body.translation.y - painting.translation.y | ||
82 | var diff_z = body.translation.z - painting.translation.z | ||
83 | body.translation.x = target_painting.translation.x - diff_z | ||
84 | body.translation.y = target_painting.translation.y + diff_y | ||
85 | body.translation.z = target_painting.translation.z + diff_x | ||
86 | body.rotate_y(3 * PI / 2) | ||
87 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), 3 * PI / 2) | ||
88 | 46 | ||
89 | var apclient = global.get_node("Archipelago") | 47 | # this is ACW |
90 | if !apclient._pilgrimage_allows_paintings: | 48 | if rotate == 0: |
91 | global.sunwarp = 1 | 49 | body.translation.x = ( |
92 | body.get_node("pivot/camera/sunwarp_background").visible = false | 50 | target_painting.translation.x + (body.translation.x - painting.translation.x) |
51 | ) | ||
52 | body.translation.y = ( | ||
53 | target_painting.translation.y + (body.translation.y - painting.translation.y) | ||
54 | ) | ||
55 | body.translation.z = ( | ||
56 | target_painting.translation.z + (body.translation.z - painting.translation.z) | ||
57 | ) | ||
58 | elif rotate == 180: | ||
59 | body.translation.x = ( | ||
60 | target_painting.translation.x - (body.translation.x - painting.translation.x) | ||
61 | ) | ||
62 | body.translation.y = ( | ||
63 | target_painting.translation.y + (body.translation.y - painting.translation.y) | ||
64 | ) | ||
65 | body.translation.z = ( | ||
66 | target_painting.translation.z - (body.translation.z - painting.translation.z) | ||
67 | ) | ||
68 | body.rotate_y(PI) | ||
69 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), PI) | ||
70 | elif rotate == 90: | ||
71 | var diff_x = body.translation.x - painting.translation.x | ||
72 | var diff_y = body.translation.y - painting.translation.y | ||
73 | var diff_z = body.translation.z - painting.translation.z | ||
74 | body.translation.x = target_painting.translation.x + diff_z | ||
75 | body.translation.y = target_painting.translation.y + diff_y | ||
76 | body.translation.z = target_painting.translation.z - diff_x | ||
77 | body.rotate_y(PI / 2) | ||
78 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), PI / 2) | ||
79 | elif rotate == 270: | ||
80 | var diff_x = body.translation.x - painting.translation.x | ||
81 | var diff_y = body.translation.y - painting.translation.y | ||
82 | var diff_z = body.translation.z - painting.translation.z | ||
83 | body.translation.x = target_painting.translation.x - diff_z | ||
84 | body.translation.y = target_painting.translation.y + diff_y | ||
85 | body.translation.z = target_painting.translation.z + diff_x | ||
86 | body.rotate_y(3 * PI / 2) | ||
87 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), 3 * PI / 2) | ||
88 | |||
89 | if !apclient._pilgrimage_allows_paintings: | ||
90 | global.sunwarp = 1 | ||
91 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
93 | 92 | ||
94 | 93 | ||
95 | func _dir_to_int(dir): | 94 | func _dir_to_int(dir): |
diff --git a/Archipelago/player.gd b/Archipelago/player.gd index 49d907d..52d743a 100644 --- a/Archipelago/player.gd +++ b/Archipelago/player.gd | |||
@@ -44,8 +44,6 @@ func _solvingEnd(): | |||
44 | 44 | ||
45 | 45 | ||
46 | func _unhandled_input(event): | 46 | func _unhandled_input(event): |
47 | ._unhandled_input(event) | ||
48 | |||
49 | if event is InputEventKey: | 47 | if event is InputEventKey: |
50 | if event.pressed and event.scancode == KEY_P: | 48 | if event.pressed and event.scancode == KEY_P: |
51 | var effects_node = get_tree().get_root().get_node("Spatial/AP_Effects") | 49 | var effects_node = get_tree().get_root().get_node("Spatial/AP_Effects") |
diff --git a/CHANGELOG.md b/CHANGELOG.md index de47cb0..6918722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -1,5 +1,34 @@ | |||
1 | # lingo-archipelago Releases | 1 | # lingo-archipelago Releases |
2 | 2 | ||
3 | ## v3.1.0 - 2024-06-06 | ||
4 | |||
5 | - The client now sends information on what paintings you've checked if you're | ||
6 | playing painting shuffle, which can be used to populate the subway map in | ||
7 | v0.10.0 and later of the tracker. | ||
8 | |||
9 | Download: | ||
10 | [lingo-archipelago-v3.1.0.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v3.1.0.zip)<br/> | ||
11 | Source: [v3.1.0](https://code.fourisland.com/lingo-archipelago/tag/?h=v3.1.0) | ||
12 | |||
13 | ## v3.0.3 - 2024-06-02 | ||
14 | |||
15 | - Fixed issue with mouse sensitivity being doubled. | ||
16 | |||
17 | Download: | ||
18 | [lingo-archipelago-v3.0.3.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v3.0.3.zip)<br/> | ||
19 | Source: [v3.0.3](https://code.fourisland.com/lingo-archipelago/tag/?h=v3.0.3) | ||
20 | |||
21 | ## v3.0.2 - 2024-05-30 | ||
22 | |||
23 | - Fixed a crash that could happen if the local data got corrupted. | ||
24 | - Added compatibility for | ||
25 | [non universally unique datapackage IDs](https://github.com/ArchipelagoMW/Archipelago/issues/3394). | ||
26 | - Removed the arrows pointing at The Fearless when confusify world is enabled. | ||
27 | |||
28 | Download: | ||
29 | [lingo-archipelago-v3.0.2.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v3.0.2.zip)<br/> | ||
30 | Source: [v3.0.2](https://code.fourisland.com/lingo-archipelago/tag/?h=v3.0.2) | ||
31 | |||
3 | ## v3.0.1 - 2024-04-22 | 32 | ## v3.0.1 - 2024-04-22 |
4 | 33 | ||
5 | - Fixed issue where Progressive Hallway Room did not work properly on worlds | 34 | - Fixed issue where Progressive Hallway Room did not work properly on worlds |