make online clothing localization work on all links
This commit is contained in:
parent
52beaabfb9
commit
fd41aa47b1
|
|
@ -1144,14 +1144,14 @@ public class GlobalFuncs
|
|||
GlobalVars.PantsTextureID = GetItemTextureID(GlobalVars.UserCustomization.Pants, "Pants", new AssetCacheDefBasic("Pants", new string[] { "PantsTemplate" }));
|
||||
GlobalVars.FaceTextureID = GetItemTextureID(GlobalVars.UserCustomization.Face, "Face", new AssetCacheDefBasic("Decal", new string[] { "Texture" }));
|
||||
|
||||
GlobalVars.TShirtTextureLocal = GetItemTextureLocalPath(GlobalVars.TShirtTextureID);
|
||||
GlobalVars.ShirtTextureLocal = GetItemTextureLocalPath(GlobalVars.ShirtTextureID);
|
||||
GlobalVars.PantsTextureLocal = GetItemTextureLocalPath(GlobalVars.PantsTextureID);
|
||||
GlobalVars.FaceTextureLocal = GetItemTextureLocalPath(GlobalVars.FaceTextureID);
|
||||
GlobalVars.TShirtTextureLocal = GetItemTextureLocalPath(GlobalVars.TShirtTextureID, "TShirt");
|
||||
GlobalVars.ShirtTextureLocal = GetItemTextureLocalPath(GlobalVars.ShirtTextureID, "Shirt");
|
||||
GlobalVars.PantsTextureLocal = GetItemTextureLocalPath(GlobalVars.PantsTextureID, "Pants");
|
||||
GlobalVars.FaceTextureLocal = GetItemTextureLocalPath(GlobalVars.FaceTextureID, "Face");
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetItemTextureLocalPath(string item)
|
||||
public static string GetItemTextureLocalPath(string item, string nameprefix)
|
||||
{
|
||||
//don't bother, we're offline.
|
||||
if (GlobalVars.ExternalIP.Equals("localhost"))
|
||||
|
|
@ -1160,11 +1160,18 @@ public class GlobalFuncs
|
|||
if (!GlobalVars.SelectedClientInfo.CommandLineArgs.Contains("%localizeonlineclothing%"))
|
||||
return "";
|
||||
|
||||
string peram = "id=";
|
||||
string id = item.After(peram);
|
||||
if (item.Contains(peram))
|
||||
if (item.Contains("http://") || item.Contains("https://"))
|
||||
{
|
||||
Downloader download = new Downloader(item, id + ".png", "", GlobalPaths.AssetCacheDirTextures);
|
||||
string peram = "id=";
|
||||
string fullname = nameprefix + "Temp.png";
|
||||
|
||||
if (item.Contains(peram))
|
||||
{
|
||||
string id = item.After(peram);
|
||||
fullname = id + ".png";
|
||||
}
|
||||
|
||||
Downloader download = new Downloader(item, fullname, "", GlobalPaths.AssetCacheDirTextures);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -1195,8 +1202,7 @@ public class GlobalFuncs
|
|||
if (!GlobalVars.SelectedClientInfo.CommandLineArgs.Contains("%localizeonlineclothing%"))
|
||||
return "";
|
||||
|
||||
string peram = "id=";
|
||||
if (item.Contains(peram))
|
||||
if (item.Contains("http://") || item.Contains("https://"))
|
||||
{
|
||||
Downloader download = new Downloader(item, name + "Temp.rbxm", "", GlobalPaths.AssetCacheDirFonts);
|
||||
|
||||
|
|
@ -1215,10 +1221,7 @@ public class GlobalFuncs
|
|||
doc = XDocument.Load(xmlReader);
|
||||
}
|
||||
|
||||
string id = item.After(peram);
|
||||
string baseURL = item.Before(id);
|
||||
|
||||
return RobloxXML.GetURLInNodes(doc, assetCacheDef.Class, assetCacheDef.Id[0], baseURL);
|
||||
return RobloxXML.GetURLInNodes(doc, assetCacheDef.Class, assetCacheDef.Id[0], item);
|
||||
}
|
||||
#if URI || LAUNCHER || CMD || BASICLAUNCHER
|
||||
catch (Exception ex)
|
||||
|
|
@ -2010,10 +2013,9 @@ public class GlobalFuncs
|
|||
|
||||
if (!info.AlreadyHasSecurity)
|
||||
{
|
||||
Match match = Regex.Match(GlobalVars.UserConfiguration.PlayerTripcode, "[^a-zA-Z0-9]");
|
||||
if (match != Match.Empty || string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.PlayerTripcode))
|
||||
if (Regex.Match(GlobalVars.UserConfiguration.PlayerTripcode, "[^a-zA-Z0-9]") != Match.Empty ||
|
||||
string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.PlayerTripcode))
|
||||
{
|
||||
MessageBox.Show(match.Captures.Count.ToString());
|
||||
#if URI
|
||||
if (label != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ New Features:
|
|||
- The Asset SDK Asset Localizer is now known as the Asset Fixer!
|
||||
- Added the ability to "fix" all asset URLs by changing them to a URL of your choice!
|
||||
- Added T-Shirt support to 2007E/2007E-Shaders.
|
||||
- T-Shirts loaded with Roblox Asset URLs/Redirects are not supported due to 2 issues with 2007e: Roblox Asset URLs/Redirects do not work properly in 2007E if it's a texture and using anything to get the current texture value for a ShirtGraphic or Decal returns a "bad cast" error.
|
||||
- As a result, T-Shirts loaded with Roblox Asset URLs/Redirects will not load in 2007e.
|
||||
- T-Shirts with Roblox Asset URLs/Redirects are not supported due to 2 issues with 2007e: Roblox Asset URLs/Redirects do not work properly in 2007E if it's a texture and using anything to get the current texture value for a ShirtGraphic or Decal returns a "bad cast" error.
|
||||
- As a result, T-Shirts with Roblox Asset URLs/Redirects will not load in 2007e.
|
||||
- Added ClientScript Variables:
|
||||
- %tshirttexid%, %shirttexid%, %pantstexid%, %facetexid% - Returns the texture URL for the respective online clothing type. Returns nothing if the URL is invalid, the item isn't using Online Clothing, or %localizeonlineclothing% is not defined in the script.
|
||||
- %tshirttexidlocal%, %shirttexidlocal%, %pantstexidlocal%, %facetexlocal%" - Returns the texture rbxasset URL for the respective online clothing type. Returns nothing if the URL is invalid, the item isn't using Online Clothing, or %localizeonlineclothing% is not defined in the script. Only the client who downloads the clothing would be able to see it.
|
||||
- %localizeonlineclothing% - Grabs texture IDS for the %texid% variables and localizes the texture for the %texidlocal% variables. This WILL increase load times of your client depending on how many items are being downloaded.
|
||||
|
||||
Enhancements:
|
||||
- Added an additional warning about certain GUI elements being disabled in later clients when No3D is selected.
|
||||
|
|
@ -14,10 +18,6 @@ Enhancements:
|
|||
- The server browser no longer requires a server to be the same exact version as the current running version of Novetus.
|
||||
- The server browser now displays versions in red if they're not the same exact version.
|
||||
- The master server security warning will now show up once for every Novetus session.
|
||||
- Added ClientScript Variables:
|
||||
- %tshirttexid%, %shirttexid%, %pantstexid%, %facetexid% - Returns the texture URL for the respective online clothing type. Returns nothing if the URL is invalid, the item isn't using Online Clothing, or %localizeonlineclothing% is not defined in the script.
|
||||
- %tshirttexidlocal%, %shirttexidlocal%, %pantstexidlocal%, %facetexlocal%" - Returns the texture rbxasset URL for the respective online clothing type. Returns nothing if the URL is invalid, the item isn't using Online Clothing, or %localizeonlineclothing% is not defined in the script. Only the client who downloads the clothing would be able to see it.
|
||||
- %localizeonlineclothing% - Grabs texture IDS for the %texid% variables and localizes the texture for the %texidlocal% variables. This WILL increase load times of your client depending on how many items are being downloaded.
|
||||
|
||||
Fixes:
|
||||
- Fixed the URL Override box in the Asset SDK not being functional.
|
||||
|
|
|
|||
Loading…
Reference in New Issue