Added script support.

This commit is contained in:
Bitl 2019-11-13 10:39:56 -07:00
parent 974aefb46a
commit 22c9309709
3 changed files with 48 additions and 0 deletions

View File

@ -34,10 +34,12 @@ public static class GlobalVars
public static readonly string DirFonts = "\\fonts"; public static readonly string DirFonts = "\\fonts";
public static readonly string DirSounds = "\\sounds"; public static readonly string DirSounds = "\\sounds";
public static readonly string DirTextures = "\\textures"; public static readonly string DirTextures = "\\textures";
public static readonly string DirScripts = "\\scripts";
public static readonly string FontsGameDir = "fonts/"; public static readonly string FontsGameDir = "fonts/";
public static readonly string SoundsGameDir = "sounds/"; public static readonly string SoundsGameDir = "sounds/";
public static readonly string TexturesGameDir = "textures/"; public static readonly string TexturesGameDir = "textures/";
public static readonly string ScriptsGameDir = "scripts/";
//customization //customization
public static readonly string CustomPlayerDir = DataPath + "\\charcustom"; public static readonly string CustomPlayerDir = DataPath + "\\charcustom";
public static readonly string hatdir = CustomPlayerDir + "\\hats"; public static readonly string hatdir = CustomPlayerDir + "\\hats";
@ -61,6 +63,7 @@ public static class GlobalVars
public static readonly string hatdirFonts = hatdir + DirFonts; public static readonly string hatdirFonts = hatdir + DirFonts;
public static readonly string hatdirTextures = hatdir + DirTextures; public static readonly string hatdirTextures = hatdir + DirTextures;
public static readonly string hatdirSounds = hatdir + DirSounds; public static readonly string hatdirSounds = hatdir + DirSounds;
public static readonly string hatdirScripts = hatdir + DirScripts;
public static readonly string facedirTextures = facedir + DirTextures; public static readonly string facedirTextures = facedir + DirTextures;
public static readonly string headdirFonts = headdir + DirFonts; public static readonly string headdirFonts = headdir + DirFonts;
public static readonly string headdirTextures = headdir + DirTextures; public static readonly string headdirTextures = headdir + DirTextures;
@ -71,6 +74,7 @@ public static class GlobalVars
public static readonly string hatGameDirFonts = hatGameDir + FontsGameDir; public static readonly string hatGameDirFonts = hatGameDir + FontsGameDir;
public static readonly string hatGameDirTextures = hatGameDir + TexturesGameDir; public static readonly string hatGameDirTextures = hatGameDir + TexturesGameDir;
public static readonly string hatGameDirSounds = hatGameDir + SoundsGameDir; public static readonly string hatGameDirSounds = hatGameDir + SoundsGameDir;
public static readonly string hatGameDirScripts = hatGameDir + ScriptsGameDir;
public static readonly string faceGameDirTextures = faceGameDir + TexturesGameDir; public static readonly string faceGameDirTextures = faceGameDir + TexturesGameDir;
public static readonly string headGameDirFonts = headGameDir + FontsGameDir; public static readonly string headGameDirFonts = headGameDir + FontsGameDir;
public static readonly string headGameDirTextures = headGameDir + TexturesGameDir; public static readonly string headGameDirTextures = headGameDir + TexturesGameDir;
@ -85,6 +89,7 @@ public static class GlobalVars
public static readonly string AssetCacheDirSounds = AssetCacheDir + DirSounds; public static readonly string AssetCacheDirSounds = AssetCacheDir + DirSounds;
public static readonly string AssetCacheDirTextures = AssetCacheDir + DirTextures; public static readonly string AssetCacheDirTextures = AssetCacheDir + DirTextures;
public static readonly string AssetCacheDirTexturesGUI = AssetCacheDirTextures + "\\gui"; public static readonly string AssetCacheDirTexturesGUI = AssetCacheDirTextures + "\\gui";
public static readonly string AssetCacheDirScripts = AssetCacheDir + DirScripts;
public static readonly string AssetCacheGameDir = SharedDataGameDir + "assetcache/"; public static readonly string AssetCacheGameDir = SharedDataGameDir + "assetcache/";
public static readonly string AssetCacheFontsGameDir = AssetCacheGameDir + FontsGameDir; public static readonly string AssetCacheFontsGameDir = AssetCacheGameDir + FontsGameDir;
@ -92,6 +97,7 @@ public static class GlobalVars
public static readonly string AssetCacheSoundsGameDir = AssetCacheGameDir + SoundsGameDir; public static readonly string AssetCacheSoundsGameDir = AssetCacheGameDir + SoundsGameDir;
public static readonly string AssetCacheTexturesGameDir = AssetCacheGameDir + TexturesGameDir; public static readonly string AssetCacheTexturesGameDir = AssetCacheGameDir + TexturesGameDir;
public static readonly string AssetCacheTexturesGUIGameDir = AssetCacheTexturesGameDir + "gui/"; public static readonly string AssetCacheTexturesGUIGameDir = AssetCacheTexturesGameDir + "gui/";
public static readonly string AssetCacheScriptsGameDir = AssetCacheGameDir + ScriptsGameDir;
//defs //defs
public static AssetCacheDef Fonts { get { return new AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, new string[] { AssetCacheDirFonts, AssetCacheDirTextures }, new string[] { AssetCacheFontsGameDir, AssetCacheTexturesGameDir }); } } public static AssetCacheDef Fonts { get { return new AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, new string[] { AssetCacheDirFonts, AssetCacheDirTextures }, new string[] { AssetCacheFontsGameDir, AssetCacheTexturesGameDir }); } }
@ -105,9 +111,13 @@ public static class GlobalVars
public static AssetCacheDef Shirt { get { return new AssetCacheDef("Shirt", new string[] { "ShirtTemplate" }, new string[] { ".png" }, new string[] { AssetCacheDirTextures }, new string[] { AssetCacheTexturesGameDir }); } } public static AssetCacheDef Shirt { get { return new AssetCacheDef("Shirt", new string[] { "ShirtTemplate" }, new string[] { ".png" }, new string[] { AssetCacheDirTextures }, new string[] { AssetCacheTexturesGameDir }); } }
public static AssetCacheDef ShirtGraphic { get { return new AssetCacheDef("ShirtGraphic", new string[] { "Graphic" }, new string[] { ".png" }, new string[] { AssetCacheDirTextures }, new string[] { AssetCacheTexturesGameDir }); } } public static AssetCacheDef ShirtGraphic { get { return new AssetCacheDef("ShirtGraphic", new string[] { "Graphic" }, new string[] { ".png" }, new string[] { AssetCacheDirTextures }, new string[] { AssetCacheTexturesGameDir }); } }
public static AssetCacheDef Pants { get { return new AssetCacheDef("Pants", new string[] { "PantsTemplate" }, new string[] { ".png" }, new string[] { AssetCacheDirTextures }, new string[] { AssetCacheTexturesGameDir }); } } public static AssetCacheDef Pants { get { return new AssetCacheDef("Pants", new string[] { "PantsTemplate" }, new string[] { ".png" }, new string[] { AssetCacheDirTextures }, new string[] { AssetCacheTexturesGameDir }); } }
public static AssetCacheDef Script { get { return new AssetCacheDef("Script", new string[] { "LinkedSource" }, new string[] { ".lua" }, new string[] { AssetCacheDirScripts }, new string[] { AssetCacheScriptsGameDir }); } }
public static AssetCacheDef LocalScript { get { return new AssetCacheDef("LocalScript", new string[] { "LinkedSource" }, new string[] { ".lua" }, new string[] { AssetCacheDirScripts }, new string[] { AssetCacheScriptsGameDir }); } }
//item defs below //item defs below
public static AssetCacheDef ItemHatFonts { get { return new AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, new string[] { hatdirFonts, hatdirTextures }, new string[] { hatGameDirFonts, hatGameDirTextures }); } } public static AssetCacheDef ItemHatFonts { get { return new AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, new string[] { hatdirFonts, hatdirTextures }, new string[] { hatGameDirFonts, hatGameDirTextures }); } }
public static AssetCacheDef ItemHatSound { get { return new AssetCacheDef("Sound", new string[] { "SoundId" }, new string[] { ".wav" }, new string[] { hatdirSounds }, new string[] { hatGameDirSounds }); } } public static AssetCacheDef ItemHatSound { get { return new AssetCacheDef("Sound", new string[] { "SoundId" }, new string[] { ".wav" }, new string[] { hatdirSounds }, new string[] { hatGameDirSounds }); } }
public static AssetCacheDef ItemHatScript { get { return new AssetCacheDef("Script", new string[] { "LinkedSource" }, new string[] { ".lua" }, new string[] { hatdirScripts }, new string[] { hatGameDirScripts }); } }
public static AssetCacheDef ItemHatLocalScript { get { return new AssetCacheDef("LocalScript", new string[] { "LinkedSource" }, new string[] { ".lua" }, new string[] { hatdirScripts }, new string[] { hatGameDirScripts }); } }
public static AssetCacheDef ItemHeadFonts { get { return new AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, new string[] { headdirFonts, headdirTextures }, new string[] { headGameDirFonts, headGameDirTextures }); } } public static AssetCacheDef ItemHeadFonts { get { return new AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, new string[] { headdirFonts, headdirTextures }, new string[] { headGameDirFonts, headGameDirTextures }); } }
public static AssetCacheDef ItemFaceTexture { get { return new AssetCacheDef("Decal", new string[] { "Texture" }, new string[] { ".png" }, new string[] { facedirTextures }, new string[] { faceGameDirTextures }); } } public static AssetCacheDef ItemFaceTexture { get { return new AssetCacheDef("Decal", new string[] { "Texture" }, new string[] { ".png" }, new string[] { facedirTextures }, new string[] { faceGameDirTextures }); } }
public static AssetCacheDef ItemShirtTexture { get { return new AssetCacheDef("Shirt", new string[] { "ShirtTemplate" }, new string[] { ".png" }, new string[] { shirtdirTextures }, new string[] { shirtGameDirTextures }); } } public static AssetCacheDef ItemShirtTexture { get { return new AssetCacheDef("Shirt", new string[] { "ShirtTemplate" }, new string[] { ".png" }, new string[] { shirtdirTextures }, new string[] { shirtGameDirTextures }); } }

View File

@ -126,6 +126,17 @@ public static class RobloxXMLLocalizer
stringToUpdate = "Downloading RBXL Pants Textures..."; stringToUpdate = "Downloading RBXL Pants Textures...";
} }
DownloadFromNodes(path, GlobalVars.Pants); DownloadFromNodes(path, GlobalVars.Pants);
//scripts
if (!string.IsNullOrWhiteSpace(stringToUpdate))
{
stringToUpdate = "Downloading RBXL Linked Scripts...";
}
DownloadFromNodes(path, GlobalVars.Script);
if (!string.IsNullOrWhiteSpace(stringToUpdate))
{
stringToUpdate = "Downloading RBXL Linked LocalScripts...";
}
DownloadFromNodes(path, GlobalVars.LocalScript);
goto default; goto default;
case DLType.RBXM: case DLType.RBXM:
//meshes //meshes
@ -197,6 +208,17 @@ public static class RobloxXMLLocalizer
stringToUpdate = "Downloading RBXM Pants Textures..."; stringToUpdate = "Downloading RBXM Pants Textures...";
} }
DownloadFromNodes(path, GlobalVars.Pants); DownloadFromNodes(path, GlobalVars.Pants);
//scripts
if (!string.IsNullOrWhiteSpace(stringToUpdate))
{
stringToUpdate = "Downloading RBXM Linked Scripts...";
}
DownloadFromNodes(path, GlobalVars.Script);
if (!string.IsNullOrWhiteSpace(stringToUpdate))
{
stringToUpdate = "Downloading RBXM Linked LocalScripts...";
}
DownloadFromNodes(path, GlobalVars.LocalScript);
goto default; goto default;
case DLType.Hat: case DLType.Hat:
//meshes //meshes
@ -211,6 +233,17 @@ public static class RobloxXMLLocalizer
stringToUpdate = "Downloading Hat Sounds..."; stringToUpdate = "Downloading Hat Sounds...";
} }
DownloadFromNodes(path, GlobalVars.ItemHatSound); DownloadFromNodes(path, GlobalVars.ItemHatSound);
//scripts
if (!string.IsNullOrWhiteSpace(stringToUpdate))
{
stringToUpdate = "Downloading Hat Linked Scripts...";
}
DownloadFromNodes(path, GlobalVars.Script);
if (!string.IsNullOrWhiteSpace(stringToUpdate))
{
stringToUpdate = "Downloading Hat Linked LocalScripts...";
}
DownloadFromNodes(path, GlobalVars.LocalScript);
goto default; goto default;
case DLType.Head: case DLType.Head:
//meshes //meshes

View File

@ -90,6 +90,11 @@ namespace NovetusLauncher
{ {
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirTexturesGUI); System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirTexturesGUI);
} }
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirScripts))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirScripts);
}
} }
} }
} }