Browse Source

Merge branch 'master' of https://git.coder.horse/meidomustard/modifiedMM

habeebweeb 4 years ago
parent
commit
8362377684

+ 254 - 212
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Gui.cs

@@ -1,4 +1,5 @@
 using ExIni;
+using MyRoomCustom;
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -375,24 +376,30 @@ namespace CM3D2.MultipleMaids.Plugin
                 GUI.enabled = false;
             }
 
-            bool previousGUIState = GUI.enabled;
-            GUI.enabled = !modItemsOnly;
+            if (!modItemsOnly)
+            {
+                bool previousGUIState = GUI.enabled;
+                GUI.enabled = slotIndex > 1;
+                modItemsToggle = GUI.Toggle(new Rect(GetPix(156),
+                    GetPix(115),
+                    GetPix(50),
+                    GetPix(20)),
+                    modItemsToggle,
+                    "Mods",
+                    style3
+                );
+                GUI.enabled = previousGUIState;
+            }
 
-            modItemsToggle = GUI.Toggle(new Rect(GetPix(156),
-                GetPix(115),
-                GetPix(50),
-                GetPix(20)),
-                modItemsToggle,
-                "Mods",
-                style3
-            );
 
-            GUI.enabled = previousGUIState;
 
             int iconSize = GetPix(45);
             Rect position1;
             Rect viewRect;
-            int bg2ItemCount = (!modItemsOnly && modItemsToggle) ? numberOfModItems : sortList.Count;
+            int bg2ItemCount = slotIndex == 1 ?
+                creativeSortList.Count :
+                (!modItemsOnly && modItemsToggle) ?
+                    numberOfModItems : sortList.Count;
             if (sceneLevel != 5)
             {
                 position1 = new Rect(GetPix(7),
@@ -418,9 +425,10 @@ namespace CM3D2.MultipleMaids.Plugin
 
             bg2ScrollPos = GUI.BeginScrollView(position1, bg2ScrollPos, viewRect);
             int bg2Index = 0;
-            foreach (SortItem sortItem in sortList)
+            List<SortItem> bg2List = slotIndex == 1 ? creativeSortList : sortList;
+            foreach (SortItem sortItem in bg2List)
             {
-                if (modItemsToggle && !sortItem.isMod)
+                if (slotIndex > 1 && modItemsToggle && !sortItem.isMod)
                 {
                     continue;
                 }
@@ -432,51 +440,62 @@ namespace CM3D2.MultipleMaids.Plugin
                 );
                 if (GUI.Button(position2, ""))
                 {
-                    string menu = sortItem.menu;
-                    byte[] modBuf = null;
-                    bool ready = true;
-                    if (sortItem.isOfficialMod)
+                    GameObject gameObject = null;
+                    if (slotIndex > 1)
                     {
-                        menu = sortItem.baseItem;
+                        string menu = sortItem.menu;
+                        byte[] modBuf = null;
+                        bool ready = true;
+                        if (sortItem.isOfficialMod)
+                        {
+                            menu = sortItem.baseMenu;
 
-                        using (FileStream fileStream = new FileStream(sortItem.menu, FileMode.Open))
+                            using (FileStream fileStream = new FileStream(sortItem.menu, FileMode.Open))
+                            {
+                                if (fileStream == null)
+                                {
+                                    ready = false;
+                                }
+                                else
+                                {
+                                    modBuf = new byte[fileStream.Length];
+                                    fileStream.Read(modBuf, 0, (int)fileStream.Length);
+                                }
+                            }
+                        }
+                        byte[] menuBuf = null;
+                        using (AFileBase afileBase = GameUty.FileOpen(menu, null))
                         {
-                            if (fileStream == null)
+                            if (ready = afileBase.IsValid())
                             {
-                                ready = false;
+                                menuBuf = afileBase.ReadAll();
                             }
-                            else
+                        }
+
+                        if (ready)
+                        {
+                            string[] meshInfo = ProcScriptBin(menuBuf);
+                            gameObject = ImportCM2.LoadSkinMesh_R(meshInfo[0], meshInfo, 1);
+                            gameObject.name = menu;
+                            if (sortItem.isOfficialMod)
                             {
-                                modBuf = new byte[fileStream.Length];
-                                fileStream.Read(modBuf, 0, (int)fileStream.Length);
+                                gameObject.name += $"#{Path.GetFileName(sortItem.menu)}";
+                                ProcModScriptBin(modBuf, gameObject);
                             }
                         }
                     }
-                    byte[] menuBuf = null;
-                    using (AFileBase afileBase = GameUty.FileOpen(menu, null))
+                    else
                     {
-                        if (ready = afileBase.IsValid())
-                        {
-                            menuBuf = afileBase.ReadAll();
-                        }
+                        // My Room Custom content
+                        PlacementData.Data data = PlacementData.GetData(int.Parse(sortItem.menu));
+                        gameObject = Instantiate(data.GetPrefab());
+                        gameObject.name = $"creative_{sortItem.baseMenu}";
                     }
 
-                    if (ready)
+                    if (gameObject != null)
                     {
-                        string[] meshInfo = ProcScriptBin(menuBuf);
-                        GameObject gameObject = ImportCM2.LoadSkinMesh_R(meshInfo[0], meshInfo, 1);
-                        gameObject.name = menu;
-                        if (sortItem.isOfficialMod)
-                        {
-                            gameObject.name += $"#{Path.GetFileName(sortItem.menu)}";
-                            ProcModScriptBin(modBuf, gameObject);
-                        }
                         doguBObject.Add(gameObject);
-                        Vector3 zero1 = Vector3.zero;
-                        Vector3 zero2 = Vector3.zero;
-                        zero1.z = 0.4f;
-                        gameObject.transform.localPosition = zero1;
-                        gameObject.transform.localRotation = Quaternion.Euler(zero2);
+                        gameObject.transform.position = new Vector3(0, 0, 0.4f);
                         doguCnt = doguBObject.Count - 1;
                         gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
                         gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
@@ -755,225 +774,248 @@ namespace CM3D2.MultipleMaids.Plugin
             sortList.Clear();
             bg2ScrollPos = new Vector2(0.0f, 0.0f);
 
-            if (itemDataList.Count == 0)
+            if (slotIndex == 0)
             {
-                #region menu files
-                HashSet<string> modMenus = null;
-                if (!modItemsOnly)
-                {
-                    modMenus = new HashSet<string>(GameUty.ModOnlysMenuFiles
-                        .Select(file => Path.GetFileName(file).ToLowerInvariant()));
-                }
-
-                string[] menuFiles = modItemsOnly ? GameUty.ModOnlysMenuFiles : GameUty.MenuFiles;
-                foreach (string menuFile in menuFiles)
+                return;
+            }
+            else if (slotIndex == 1)
+            {
+                if (creativeSortList.Count == 0)
                 {
-                    string fileName = Path.GetFileName(menuFile);
-                    byte[] buf;
-                    using (AFileBase aFileBase = GameUty.FileOpen(menuFile))
+                    PlacementData.CreateData();
+                    List<PlacementData.Data> creativeData = PlacementData.GetAllDatas(false);
+                    creativeData = creativeData.OrderBy(data => data.categoryID).ThenBy(data => data.ID).ToList();
+                    creativeSortList = new List<SortItem>(creativeData.Count);
+                    foreach (var data in creativeData)
                     {
-                        if (!aFileBase.IsValid())
+                        string asset = !string.IsNullOrEmpty(data.resourceName) ? data.resourceName : data.assetName;
+                        SortItem item = new SortItem()
                         {
-                            continue;
-                        }
-                        buf = aFileBase.ReadAll();
+                            menu = data.ID.ToString(),
+                            baseMenu = asset,
+                            isCreative = true,
+                            tex = data.GetThumbnail() as Texture2D
+                        };
+                        creativeSortList.Add(item);
                     }
-
-                    ItemData item = new ItemData()
-                    {
-                        menu = fileName,
-                        isMod = modItemsOnly ? true : modMenus.Contains(fileName)
-                    };
-                    BinaryReader binaryReader = new BinaryReader(new MemoryStream(buf), Encoding.UTF8);
-                    if (binaryReader.ReadString() != "CM3D2_MENU")
+                }
+            }
+            else
+            {
+                if (itemDataList.Count == 0)
+                {
+                    #region menu files
+                    HashSet<string> modMenus = null;
+                    if (!modItemsOnly)
                     {
-                        binaryReader.Close();
+                        modMenus = new HashSet<string>(GameUty.ModOnlysMenuFiles
+                            .Select(file => Path.GetFileName(file).ToLowerInvariant()));
                     }
-                    else
+
+                    string[] menuFiles = modItemsOnly ? GameUty.ModOnlysMenuFiles : GameUty.MenuFiles;
+                    foreach (string menuFile in menuFiles)
                     {
-                        try
+                        string fileName = Path.GetFileName(menuFile);
+                        byte[] buf;
+                        using (AFileBase aFileBase = GameUty.FileOpen(menuFile))
                         {
-                            binaryReader.ReadInt32();
-                            binaryReader.ReadString();
-                            item.name = binaryReader.ReadString();
-                            item.category = binaryReader.ReadString();
-                            binaryReader.ReadString();
-                            binaryReader.ReadInt32();
-                            bool run = true;
-                            do
+                            if (!aFileBase.IsValid())
                             {
-                                int size;
-                                do
-                                {
-                                    size = binaryReader.ReadByte();
-                                } while (size == 0);
+                                continue;
+                            }
+                            buf = aFileBase.ReadAll();
+                        }
 
-                                for (int index = 0; index < size; ++index)
+                        ItemData item = new ItemData()
+                        {
+                            menu = fileName,
+                            isMod = modItemsOnly ? true : modMenus.Contains(fileName)
+                        };
+                        BinaryReader binaryReader = new BinaryReader(new MemoryStream(buf), Encoding.UTF8);
+                        if (binaryReader.ReadString() != "CM3D2_MENU")
+                        {
+                            binaryReader.Close();
+                        }
+                        else
+                        {
+                            try
+                            {
+                                binaryReader.ReadInt32();
+                                binaryReader.ReadString();
+                                item.name = binaryReader.ReadString();
+                                item.category = binaryReader.ReadString();
+                                binaryReader.ReadString();
+                                binaryReader.ReadInt32();
+                                bool run = true;
+                                do
                                 {
-                                    string header = binaryReader.ReadString();
-                                    if (header == "icons" || header == "icon")
+                                    int size;
+                                    do
                                     {
-                                        run = false;
-                                        item.icon = binaryReader.ReadString();
-                                        break;
-                                    }
+                                        size = binaryReader.ReadByte();
+                                    } while (size == 0);
 
-                                    if (header == "priority")
+                                    for (int index = 0; index < size; ++index)
                                     {
-                                        int.TryParse(binaryReader.ReadString(), out item.priority);
-                                        break;
+                                        string header = binaryReader.ReadString();
+                                        if (header == "icons" || header == "icon")
+                                        {
+                                            run = false;
+                                            item.icon = binaryReader.ReadString();
+                                            break;
+                                        }
+
+                                        if (header == "priority")
+                                        {
+                                            int.TryParse(binaryReader.ReadString(), out item.priority);
+                                            break;
+                                        }
                                     }
-                                }
-                            } while (run);
+                                } while (run);
 
-                            itemDataList.Add(item);
-                        }
-                        catch { }
+                                itemDataList.Add(item);
+                            }
+                            catch { }
 
-                        binaryReader.Close();
+                            binaryReader.Close();
+                        }
                     }
-                }
-                #endregion
+                    #endregion
 
-                #region mod files
-                foreach (string modFile in Menu.GetModFiles())
-                {
-                    byte[] buf = null;
-                    try
+                    #region mod files
+                    foreach (string modFile in Menu.GetModFiles())
                     {
-                        using (FileStream fileStream = new FileStream(modFile, FileMode.Open))
+                        byte[] buf = null;
+                        try
                         {
-                            if (fileStream == null)
+                            using (FileStream fileStream = new FileStream(modFile, FileMode.Open))
                             {
-                                continue;
+                                if (fileStream == null)
+                                {
+                                    continue;
+                                }
+                                buf = new byte[fileStream.Length];
+                                fileStream.Read(buf, 0, (int)fileStream.Length);
                             }
-                            buf = new byte[fileStream.Length];
-                            fileStream.Read(buf, 0, (int)fileStream.Length);
                         }
-                    }
-                    catch { }
+                        catch { }
 
-                    if (buf == null)
-                    {
-                        continue;
-                    }
+                        if (buf == null)
+                        {
+                            continue;
+                        }
 
-                    ItemData item = new ItemData()
-                    {
-                        isMod = true,
-                        isOfficialMod = true,
-                        menu = modFile,
-                        priority = 1000
-                    };
+                        ItemData item = new ItemData()
+                        {
+                            isMod = true,
+                            isOfficialMod = true,
+                            menu = modFile,
+                            priority = 1000
+                        };
 
-                    BinaryReader binaryReader = new BinaryReader(new MemoryStream(buf), Encoding.UTF8);
-                    if (binaryReader.ReadString() != "CM3D2_MOD")
-                    {
-                        binaryReader.Close();
-                    }
-                    else
-                    {
-                        try
+                        BinaryReader binaryReader = new BinaryReader(new MemoryStream(buf), Encoding.UTF8);
+                        if (binaryReader.ReadString() != "CM3D2_MOD")
+                        {
+                            binaryReader.Close();
+                        }
+                        else
                         {
-                            binaryReader.ReadInt32();
-                            string iconName = binaryReader.ReadString();
-                            string baseItemPath = binaryReader.ReadString().Replace(":", " ");
-                            item.baseItem = Path.GetFileName(baseItemPath);
-                            item.name = binaryReader.ReadString();
-                            item.category = binaryReader.ReadString();
-                            binaryReader.ReadString();
-                            string mpnValue = binaryReader.ReadString();
-                            MPN mpn = MPN.null_mpn;
                             try
                             {
-                                mpn = (MPN)Enum.Parse(typeof(MPN), mpnValue, true);
-                            }
-                            catch
-                            {
-                                binaryReader.Close();
-                                continue;
-                            }
-                            if (mpn != MPN.null_mpn)
-                            {
+                                binaryReader.ReadInt32();
+                                string iconName = binaryReader.ReadString();
+                                string baseItemPath = binaryReader.ReadString().Replace(":", " ");
+                                item.baseItem = Path.GetFileName(baseItemPath);
+                                item.name = binaryReader.ReadString();
+                                item.category = binaryReader.ReadString();
                                 binaryReader.ReadString();
-                            }
-                            binaryReader.ReadString();
-                            int size = binaryReader.ReadInt32();
-                            for (int i = 0; i < size; i++)
-                            {
-                                string key = binaryReader.ReadString();
-                                int count = binaryReader.ReadInt32();
-                                byte[] data = binaryReader.ReadBytes(count);
-                                if (string.Equals(key, iconName, StringComparison.InvariantCultureIgnoreCase))
+                                string mpnValue = binaryReader.ReadString();
+                                MPN mpn = MPN.null_mpn;
+                                try
                                 {
-                                    Texture2D tex = new Texture2D(1, 1, TextureFormat.RGBA32, false);
-                                    tex.LoadImage(data);
-                                    item.tex = tex;
-                                    break;
+                                    mpn = (MPN)Enum.Parse(typeof(MPN), mpnValue, true);
+                                }
+                                catch
+                                {
+                                    binaryReader.Close();
+                                    continue;
                                 }
+                                if (mpn != MPN.null_mpn)
+                                {
+                                    binaryReader.ReadString();
+                                }
+                                binaryReader.ReadString();
+                                int size = binaryReader.ReadInt32();
+                                for (int i = 0; i < size; i++)
+                                {
+                                    string key = binaryReader.ReadString();
+                                    int count = binaryReader.ReadInt32();
+                                    byte[] data = binaryReader.ReadBytes(count);
+                                    if (string.Equals(key, iconName, StringComparison.InvariantCultureIgnoreCase))
+                                    {
+                                        Texture2D tex = new Texture2D(1, 1, TextureFormat.RGBA32, false);
+                                        tex.LoadImage(data);
+                                        item.tex = tex;
+                                        break;
+                                    }
+                                }
+                                itemDataList.Add(item);
                             }
-                            itemDataList.Add(item);
+                            catch { }
+                            binaryReader.Close();
                         }
-                        catch { }
-                        binaryReader.Close();
                     }
+                    #endregion
                 }
-                #endregion
-            }
 
-            if (slotIndex == 0)
-            {
-                return;
-            }
-
-            foreach (ItemData itemData in itemDataList)
-            {
-                if (itemData.category == slotArray[slotIndex] && itemData.priority > 0)
+                foreach (ItemData itemData in itemDataList)
                 {
-                    sortList.Add(new SortItem()
+                    if (itemData.category == slotArray[slotIndex] && itemData.priority > 0)
                     {
-                        category = itemData.category,
-                        priority = itemData.priority,
-                        name = itemData.name,
-                        icon = itemData.icon,
-                        menu = itemData.menu,
-                        tex = itemData.tex,
-                        isMod = itemData.isMod,
-                        isOfficialMod = itemData.isOfficialMod,
-                        baseItem = itemData.baseItem
-                    });
+                        sortList.Add(new SortItem()
+                        {
+                            category = itemData.category,
+                            priority = itemData.priority,
+                            name = itemData.name,
+                            icon = itemData.icon,
+                            menu = itemData.menu,
+                            tex = itemData.tex,
+                            isMod = itemData.isMod,
+                            isOfficialMod = itemData.isOfficialMod,
+                            baseMenu = itemData.baseItem
+                        });
+                    }
                 }
-            }
 
-            IOrderedEnumerable<SortItem> sortedItemList = sortList
-                .OrderBy(item => item.priority)
-                .ThenBy(item => item.name);
+                IOrderedEnumerable<SortItem> sortedItemList = sortList
+                    .OrderBy(item => item.priority)
+                    .ThenBy(item => item.name);
 
-            List<SortItem> sortItemList = new List<SortItem>();
+                List<SortItem> sortItemList = new List<SortItem>();
 
-            string previousMenu = "";
-            foreach (SortItem item in sortedItemList)
-            {
-                try
+                string previousMenu = "";
+                foreach (SortItem item in sortedItemList)
                 {
-                    if (item.menu != previousMenu)
+                    try
                     {
-                        if (!modItemsOnly && item.isMod) numberOfModItems++;
-                        if (item.tex == null)
+                        if (item.menu != previousMenu)
                         {
-                            byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, item.icon, false).data;
-                            Texture2D texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
-                            texture2D.LoadImage(data);
-                            item.tex = texture2D;
+                            if (!modItemsOnly && item.isMod) numberOfModItems++;
+                            if (item.tex == null)
+                            {
+                                byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, item.icon, false).data;
+                                Texture2D texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
+                                texture2D.LoadImage(data);
+                                item.tex = texture2D;
+                            }
+                            previousMenu = item.menu;
+                            sortItemList.Add(item);
                         }
-                        previousMenu = item.menu;
-                        sortItemList.Add(item);
                     }
+                    catch { }
                 }
-                catch { }
+                sortList = sortItemList;
             }
-
-            sortList = sortItemList;
         }
 
         private void BGSelectWindow(int winID)

+ 7 - 5
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Init.cs

@@ -1300,6 +1300,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         {
                             using (CsvParser csvParser = new CsvParser())
                             {
+                                csvParser.Open(file);
                                 for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y)
                                 {
                                     if (csvParser.IsCellToExistData(0, cell_y))
@@ -1324,16 +1325,17 @@ namespace CM3D2.MultipleMaids.Plugin
 
             using (AFileBase file = GameUty.FileSystem.FileOpen("desk_item_detail.nei"))
             {
-                using (CsvParser csv = new CsvParser())
+                using (CsvParser csvParser = new CsvParser())
                 {
-                    for (int index = 1; index < csv.max_cell_y; ++index)
+                    csvParser.Open(file);
+                    for (int index = 1; index < csvParser.max_cell_y; ++index)
                     {
-                        if (csv.IsCellToExistData(0, index))
+                        if (csvParser.IsCellToExistData(0, index))
                         {
-                            int cellAsInteger = csv.GetCellAsInteger(0, index);
+                            int cellAsInteger = csvParser.GetCellAsInteger(0, index);
                             if (enabled_id_list.Contains(cellAsInteger))
                             {
-                                ItemData2 itemData2 = new ItemData2(csv, index);
+                                ItemData2 itemData2 = new ItemData2(csvParser, index);
                                 if (itemData2.asset_name != "")
                                 {
                                     stringList12.Add($"{itemData2.name}{twentySpaces}#{itemData2.asset_name}");

+ 12 - 1
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

@@ -3301,7 +3301,18 @@ namespace CM3D2.MultipleMaids.Plugin
                             {
                                 bool flag2 = false;
                                 bool flag3 = false;
-                                if (str1.StartsWith("BG_"))
+                                if (str1.StartsWith("creative_"))
+                                {
+                                    string asset = str1.Replace("creative_", "");
+                                    Object original2 = GameMain.Instance.BgMgr.CreateAssetBundle(asset);
+                                    if (original2 == null)
+                                    {
+                                        original2 = Resources.Load($"SceneCreativeRoom/Debug/Prefab/{asset}");
+                                    }
+                                    original1 = Instantiate(original2) as GameObject;
+                                    doguBObject.Add(original1);
+                                }
+                                else if (str1.StartsWith("BG_"))
                                 {
                                     Object original2 = GameMain.Instance.BgMgr.CreateAssetBundle(str1.Replace("BG_", ""));
                                     if (original2 == null)

+ 16 - 5
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.cs

@@ -12,10 +12,12 @@ using UnityInjector.Attributes;
 
 namespace CM3D2.MultipleMaids.Plugin
 {
-    [PluginName("Multiple maids")]
-    [PluginVersion("22.2")]
+    [PluginName(PluginName)]
+    [PluginVersion(PluginVersion)]
     public partial class MultipleMaids : PluginBase
     {
+        private const string PluginName = "Multiple Maids";
+        private const string PluginVersion = "23.0.0";
         private bool allowUpdate;
         private readonly Vector3[] armL = new Vector3[maxMaidCnt];
         private bool atFlg;
@@ -475,6 +477,7 @@ namespace CM3D2.MultipleMaids.Plugin
             ["headset"] = "ヘッドドレス",
             ["megane"] = "メガネ",
             ["mizugi"] = "水着",
+            ["myroomcustom"] = "自室カスタム",
             ["onepiece"] = "ワンピース",
             ["panz"] = "パンツ",
             ["shoes"] = "靴",
@@ -772,6 +775,7 @@ namespace CM3D2.MultipleMaids.Plugin
 
         private int copyIndex;
         private int countS;
+        private List<SortItem> creativeSortList = new List<SortItem>();
         private float cubeSize = 0.12f;
 
         private readonly string[] dance12Array = new string[190]
@@ -4866,9 +4870,9 @@ namespace CM3D2.MultipleMaids.Plugin
         private float skirtyure3;
         private float skirtyure4;
 
-        private readonly string[] slotArray = new string[27]
+        private readonly string[] slotArray = new string[28]
         {
-                "", "acchat", "headset", "wear", "skirt", "onepiece", "mizugi", "bra", "panz", "stkg", "shoes", "acckami", "megane",
+                "", "myroomcustom", "acchat", "headset", "wear", "skirt", "onepiece", "mizugi", "bra", "panz", "stkg", "shoes", "acckami", "megane",
                 "acchead", "acchana", "accmimi", "glove", "acckubi", "acckubiwa", "acckamisub", "accnip", "accude", "accheso", "accashi",
                 "accsenaka", "accshippo", "accxxx"
         };
@@ -5605,6 +5609,12 @@ namespace CM3D2.MultipleMaids.Plugin
                 }
             }
         }
+
+        private static string PluginString()
+        {
+            return $"{PluginName} {PluginVersion}";
+        }
+
         private enum modKey
         {
             Shift,
@@ -5631,11 +5641,12 @@ namespace CM3D2.MultipleMaids.Plugin
         {
             public string category = String.Empty;
             public string menu = string.Empty;
+            public string baseMenu = string.Empty;
             public string name = string.Empty;
             public string icon = string.Empty;
+            public bool isCreative = false;
             public bool isOfficialMod = false;
             public bool isMod = false;
-            public string baseItem = string.Empty;
             public int priority;
             public Texture2D tex;
         }