From 1b76d1f564f62217d285eaa3820876c07d62293c Mon Sep 17 00:00:00 2001
From: Star Rauchenberger <fefferburbia@gmail.com>
Date: Thu, 4 Jan 2024 11:53:12 -0500
Subject: Don't tick down traps when paused

---
 Archipelago/effects.gd | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/Archipelago/effects.gd b/Archipelago/effects.gd
index 5c3efe2..ae134bc 100644
--- a/Archipelago/effects.gd
+++ b/Archipelago/effects.gd
@@ -168,21 +168,22 @@ func _process_effects():
 
 		yield(get_tree().create_timer(1.0), "timeout")
 
-		if slowness_remaining > 0:
-			slowness_remaining -= 1
-
-			if slowness_remaining == 0:
-				var player = get_tree().get_root().get_node("Spatial/player")
-				player.walk_speed = orig_walk
-				player.run_speed = orig_run
-
-		if iceland_remaining > 0:
-			iceland_remaining -= 1
-
-			if iceland_remaining == 0:
-				get_tree().get_root().get_node("Spatial/player/pivot/camera").set_environment(
-					orig_env
-				)
+		if !get_tree().paused:
+			if slowness_remaining > 0:
+				slowness_remaining -= 1
+
+				if slowness_remaining == 0:
+					var player = get_tree().get_root().get_node("Spatial/player")
+					player.walk_speed = orig_walk
+					player.run_speed = orig_run
+
+			if iceland_remaining > 0:
+				iceland_remaining -= 1
+
+				if iceland_remaining == 0:
+					get_tree().get_root().get_node("Spatial/player/pivot/camera").set_environment(
+						orig_env
+					)
 
 	self.get_node("label").text = ""
 	effect_running = false
-- 
cgit 1.4.1