about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-03-29 00:11:18 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-03-29 10:19:22 -0400
commitd5af5a849cf90067d60c4671b2cb01cdc9a73682 (patch)
tree2d65a251866e956ce3536098fba1f7ac84b71916 /Archipelago
parent00a65635d7aee086a2a8cdd077d5335112104d0f (diff)
downloadlingo-archipelago-d5af5a849cf90067d60c4671b2cb01cdc9a73682.tar.gz
lingo-archipelago-d5af5a849cf90067d60c4671b2cb01cdc9a73682.tar.bz2
lingo-archipelago-d5af5a849cf90067d60c4671b2cb01cdc9a73682.zip
AFD notnerb
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/load.gd18
1 files changed, 18 insertions, 0 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 09c357c..7550fba 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):
@@ -558,6 +568,14 @@ func _load():
558 multiplayer_node.ghost_mode = true 568 multiplayer_node.ghost_mode = true
559 add_child(multiplayer_node) 569 add_child(multiplayer_node)
560 570
571 if april_fools:
572 # Change the appearance of every painting.
573 var notnerb_painting = load("res://nodes/paintings/bg_notnerb.tscn").instance()
574 for child in $Decorations/Paintings.get_children():
575 if child.get_node_or_null("GridMap") != null:
576 child.get_node("GridMap").queue_free()
577 child.add_child(notnerb_painting.get_node("GridMap").duplicate(true))
578
561 # Hook up the scene to be able to handle connection failures. 579 # Hook up the scene to be able to handle connection failures.
562 apclient.connect("could_not_connect", self, "archipelago_disconnected") 580 apclient.connect("could_not_connect", self, "archipelago_disconnected")
563 581