diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-03-29 00:11:18 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-03-29 00:11:18 -0400 |
commit | 138ab8e0b86e1737cd4656769a14de07b78c3c30 (patch) | |
tree | eb8122a95f7895d3bb4af9d685d9377416539678 /Archipelago | |
parent | 01c1f08379d22b36f3eaedfa355c6e49ef3fa820 (diff) | |
download | lingo-archipelago-138ab8e0b86e1737cd4656769a14de07b78c3c30.tar.gz lingo-archipelago-138ab8e0b86e1737cd4656769a14de07b78c3c30.tar.bz2 lingo-archipelago-138ab8e0b86e1737cd4656769a14de07b78c3c30.zip |
AFD notnerb
Diffstat (limited to 'Archipelago')
-rw-r--r-- | Archipelago/load.gd | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 3e11b8b..dc4049e 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
@@ -25,6 +25,11 @@ func _load(): | |||
25 | var apclient = global.get_node("Archipelago") | 25 | var apclient = global.get_node("Archipelago") |
26 | var panels_parent = self.get_node("Panels") | 26 | var panels_parent = self.get_node("Panels") |
27 | 27 | ||
28 | var date = Time.get_date_dict_from_system() | ||
29 | var april_fools = false | ||
30 | if date["month"] == 4 && date["day"] == 1: | ||
31 | april_fools = true | ||
32 | |||
28 | # Add a wall-blocked raycast to the player. | 33 | # Add a wall-blocked raycast to the player. |
29 | var wallcast = RayCast.new() | 34 | var wallcast = RayCast.new() |
30 | wallcast.name = "wallcast" | 35 | wallcast.name = "wallcast" |
@@ -406,6 +411,8 @@ func _load(): | |||
406 | if not classes.has(painting): | 411 | if not classes.has(painting): |
407 | var i = rng.randi_range(0, all_paintings.size() - 1) | 412 | var i = rng.randi_range(0, all_paintings.size() - 1) |
408 | var chosen = all_paintings[i] | 413 | var chosen = all_paintings[i] |
414 | if april_fools: | ||
415 | chosen = "bg_notnerb" | ||
409 | classes[painting] = chosen | 416 | classes[painting] = chosen |
410 | all_paintings.remove(i) | 417 | all_paintings.remove(i) |
411 | 418 | ||
@@ -430,6 +437,9 @@ func _load(): | |||
430 | var j = rng.randi_range(0, all_paintings.size() - 1) | 437 | var j = rng.randi_range(0, all_paintings.size() - 1) |
431 | remaining.append(all_paintings[j]) | 438 | remaining.append(all_paintings[j]) |
432 | all_paintings.remove(j) | 439 | all_paintings.remove(j) |
440 | |||
441 | if april_fools: | ||
442 | remaining = ["bg_notnerb"] | ||
433 | 443 | ||
434 | for painting in gamedata.paintings.keys(): | 444 | for painting in gamedata.paintings.keys(): |
435 | if randomized.has(painting): | 445 | if randomized.has(painting): |
@@ -581,6 +591,14 @@ func _load(): | |||
581 | # Hook up Geronimo handler. | 591 | # Hook up Geronimo handler. |
582 | $player.connect("player_jumped", apclient, "geronimo") | 592 | $player.connect("player_jumped", apclient, "geronimo") |
583 | 593 | ||
594 | if april_fools: | ||
595 | # Change the appearance of every painting. | ||
596 | var notnerb_painting = load("res://nodes/paintings/bg_notnerb.tscn").instance() | ||
597 | for child in $Decorations/Paintings.get_children(): | ||
598 | if child.get_node_or_null("GridMap") != null: | ||
599 | child.get_node("GridMap").queue_free() | ||
600 | child.add_child(notnerb_painting.get_node("GridMap").duplicate(true)) | ||
601 | |||
584 | # Hook up the scene to be able to handle connection failures. | 602 | # Hook up the scene to be able to handle connection failures. |
585 | apclient.connect("could_not_connect", self, "archipelago_disconnected") | 603 | apclient.connect("could_not_connect", self, "archipelago_disconnected") |
586 | 604 | ||