From ca6922595346b9a6ea35615f5da1951e8e7b1ff4 Mon Sep 17 00:00:00 2001 From: Bitl Date: Mon, 11 Nov 2019 18:42:02 -0700 Subject: [PATCH] almost done! --- .../NovetusFuncs/RobloxXMLLocalizer.cs | 57 ++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/NovetusLauncher/NovetusFuncs/RobloxXMLLocalizer.cs b/NovetusLauncher/NovetusFuncs/RobloxXMLLocalizer.cs index 492eb84..4805f33 100644 --- a/NovetusLauncher/NovetusFuncs/RobloxXMLLocalizer.cs +++ b/NovetusLauncher/NovetusFuncs/RobloxXMLLocalizer.cs @@ -9,8 +9,63 @@ using System.Windows.Forms; using System.Xml; using System.Xml.Linq; -public class RobloxXMLLocalizer +public static class RobloxXMLLocalizer { + public enum DLType + { + RBXL, + RBXM, + Hat, + Head, + Face, + TShirt, + Shirt, + Pants + } + + public static void LoadRBXFile(string path, DLType type) + { + OpenFileDialog openFileDialog1 = new OpenFileDialog() + { + FileName = "Select a ROBLOX level or model", + Filter = "ROBLOX Level (*.rbxl)|*.rbxl|ROBLOX Model (*.rbxm)|*.rbxm", + Title = "Open ROBLOX level or model" + }; + + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + switch (type) + { + case DLType.RBXL: + //do whatever with it here + break; + case DLType.RBXM: + //do whatever with it here + break; + case DLType.Hat: + //do whatever with it here + break; + case DLType.Head: + //do whatever with it here + break; + case DLType.Face: + //do whatever with it here + break; + case DLType.TShirt: + //do whatever with it here + break; + case DLType.Shirt: + //do whatever with it here + break; + case DLType.Pants: + //do whatever with it here + break; + default: + break; + } + } + } + public static void DownloadFromNodes(string filepath, AssetCacheDef assetdef, int idIndex, int extIndex, int outputPathIndex, int inGameDirIndex) { DownloadFromNodes(filepath, assetdef.Class, assetdef.Id[idIndex], assetdef.Ext[extIndex], assetdef.Dir[outputPathIndex], assetdef.GameDir[inGameDirIndex]);