Ensure the failed rtp gets removed from the list

This commit is contained in:
zontreck 2025-03-10 10:11:33 -07:00
parent 40f8eb4048
commit aad44f4c45
2 changed files with 11 additions and 2 deletions

View file

@ -149,6 +149,15 @@ public class RTPFactory
// Log the request
ChunkChecks.Add(chunk);
if (rtp.NumTriesRemaining <= 0)
{
// Send failure message to the player
ServerUtilities.SendMessageTo(rtp.player, Lang.Get($"{ServerUtilities.MOD_ID}:rtp-fail"));
// This check needs to be removed from the queue
RTPCache.Remove(rtp);
return; // We modified the list, so abort the loop.
}
}
}

View file

@ -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:06 AM MST",
"version": "1.0.6-dev.10",
"description": "A collection of server utilities\n\nBuild Date: 03-10-2025 @ 10:08 AM MST",
"version": "1.0.6-dev.11",
"dependencies": {
"game": ""
}