From 03db59cce5cbc0e256bcd367c42351c640bb54bc Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:47:30 +1000 Subject: [PATCH] refactor(streamingRequest): wait 10 years for assets to load Helps with issue #630 by waiting for assets to become available. Enjoy the random side-effects this will lead to, like vehicles suddenly loading 20 minutes after you requested the asset and then teleporting you into them. This is clearly the only solution. --- imports/streamingRequest/client.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imports/streamingRequest/client.lua b/imports/streamingRequest/client.lua index 1238b77..abd0fd1 100644 --- a/imports/streamingRequest/client.lua +++ b/imports/streamingRequest/client.lua @@ -1,3 +1,5 @@ +local tenYears = 3.1536e+11 -- because fucktards keep complaining + ---@async ---@generic T : string | number ---@param request function @@ -17,7 +19,7 @@ function lib.streamingRequest(request, hasLoaded, assetType, asset, timeout, ... return lib.waitFor(function() if hasLoaded(asset) then return asset end - end, ("failed to load %s '%s' - this is likely caused by unreleased assets"):format(assetType, asset), timeout or 10000) + end, ("failed to load %s '%s' - this is likely caused by unreleased assets"):format(assetType, asset), timeout or tenYears) end return lib.streamingRequest