From 74d85c57e12071988e0ee9d9067e856435a923b9 Mon Sep 17 00:00:00 2001 From: zontreck Date: Mon, 10 Mar 2025 10:22:58 -0700 Subject: [PATCH] Patch an infinite loop --- AriasServerUtils/RTPFactory.cs | 2 ++ AriasServerUtils/assets/ariasserverutils/lang/en.json | 1 + AriasServerUtils/modinfo.json | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AriasServerUtils/RTPFactory.cs b/AriasServerUtils/RTPFactory.cs index 45cf750..abddf7a 100644 --- a/AriasServerUtils/RTPFactory.cs +++ b/AriasServerUtils/RTPFactory.cs @@ -132,6 +132,7 @@ public class RTPFactory // Generate a new position var position = rtp.MakeNewPosition(); + ServerUtilities.SendMessageTo(rtp.player, Lang.Get($"{ServerUtilities.MOD_ID}:rtp-progress")); // Get the world handle, then get chunk size var worldManager = ServerUtilities.API.WorldManager; @@ -178,6 +179,7 @@ public class RTPFactory if (pos == null) { // Let this get checked again + RTPCache.Remove(data); } else { diff --git a/AriasServerUtils/assets/ariasserverutils/lang/en.json b/AriasServerUtils/assets/ariasserverutils/lang/en.json index cda0fee..2efe4df 100644 --- a/AriasServerUtils/assets/ariasserverutils/lang/en.json +++ b/AriasServerUtils/assets/ariasserverutils/lang/en.json @@ -34,6 +34,7 @@ "back": "You've been taken back to your last position", "rtp-search": "Searching for a random position...", + "rtp-progress": "Still searchinf for a random position...", "rtp": "You have been teleported [{0}] blocks away!", "rtp-found": "Found a valid landing position after {0} tries.", "rtp-fail": "Giving up on RTP search. No valid position could be found. Try again later", diff --git a/AriasServerUtils/modinfo.json b/AriasServerUtils/modinfo.json index 3352e71..fbc64b5 100644 --- a/AriasServerUtils/modinfo.json +++ b/AriasServerUtils/modinfo.json @@ -3,8 +3,8 @@ "modid": "ariasserverutils", "name": "Aria's Server Utilities", "authors": ["zontreck"], - "description": "A collection of server utilities\n\nBuild Date: 03-10-2025 @ 10:08 AM MST", - "version": "1.0.6-dev.11", + "description": "A collection of server utilities\n\nBuild Date: 03-10-2025 @ 10:22 AM MST", + "version": "1.0.6-dev.12", "dependencies": { "game": "" }