From fc4730b721af1b80a7e16b18d928d5e56fa8d217 Mon Sep 17 00:00:00 2001 From: Bitl Date: Fri, 6 Jan 2023 16:21:00 -0700 Subject: [PATCH] updated asset redirection script --- changelog.txt | 8 ++++++++ defaultaddons/novetusexts/webproxy/Asset.cs | 10 ++-------- scripts/batch/github_sync.bat | 2 +- scripts/launcher/info.ini | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/changelog.txt b/changelog.txt index c286554..858aeac 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,11 @@ +1.3 Snapshot v22.8406.29069.1 +Enhancements: +- Changed the design of the Console to be more user friendly. +- Further improved web proxy and Console reliability. + +Fixes: +- Fixed a bug involving cleraing the Console. +---------------------------------------------------------------------------- 1.3 Snapshot v22.8406.21589.1 Enhancements: - Added the following functionality to the Web Proxy: diff --git a/defaultaddons/novetusexts/webproxy/Asset.cs b/defaultaddons/novetusexts/webproxy/Asset.cs index ee8e3a8..e527c2b 100644 --- a/defaultaddons/novetusexts/webproxy/Asset.cs +++ b/defaultaddons/novetusexts/webproxy/Asset.cs @@ -27,7 +27,6 @@ public class Asset : IWebProxyExtension long id; if (!long.TryParse(NetFuncs.FindQueryString(query, "id"), out id)) { - Util.ConsolePrint(Name() + ": Redirecting " + query, 3); e.Redirect("https://assetdelivery.roblox.com/v1/asset/" + query); } else @@ -36,18 +35,13 @@ public class Asset : IWebProxyExtension if (PathList.Count > 0) { - Util.ConsolePrint(Name() + ": Local assets for " + id.ToString() + " found. Redirecting " + query, 3); + Util.ConsolePrint(Name() + ": Local asset for " + id.ToString() + " found. Using local asset.", 3); string First = PathList[0]; byte[] numArray = await Task.Run(() => File.ReadAllBytes(First)); - e.Ok(numArray, (IEnumerable) new List() - { - new HttpHeader("Content-Length", ((long) numArray.Length).ToString()), - new HttpHeader("Cache-Control", "no-cache") - }); + e.Ok(numArray, NetFuncs.GenerateHeaders(((long) numArray.Length).ToString())); } else { - Util.ConsolePrint(Name() + ": No local assets for " + id.ToString() + ". Redirecting " + query, 5); e.Redirect("https://assetdelivery.roblox.com/v1/asset/" + query); } } diff --git a/scripts/batch/github_sync.bat b/scripts/batch/github_sync.bat index 52fb69f..08530fa 100644 --- a/scripts/batch/github_sync.bat +++ b/scripts/batch/github_sync.bat @@ -1,6 +1,6 @@ @ECHO OFF -SET debug=1 +SET debug=0 SET basedir=%CD%\scripts SET gamescriptdir=%basedir%\game diff --git a/scripts/launcher/info.ini b/scripts/launcher/info.ini index e90a3fa..ff02e34 100644 --- a/scripts/launcher/info.ini +++ b/scripts/launcher/info.ini @@ -9,5 +9,5 @@ ExtendedVersionEditChangelog=True //ExtendedVersionTemplate=%version% v11.2022.%extended-revision%%lite% ExtendedVersionTemplate=%version% Snapshot v22.%build%.%revision%.%extended-revision% ExtendedVersionRevision=1 -InitialBootup=True +InitialBootup=False IsLite=False