Browse Source

Fix logic for converting MM 23.0+ myroom prop

MM 23.0+ serializes myroomcustom props in this format "MYR_#" where # is
the ID of the prop. Getting myroomcustom placement data with "MYR_#" as
the key does not make sense.
habeebweeb 4 years ago
parent
commit
6e2fc09aa3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Converter/Program.cs

+ 2 - 1
Converter/Program.cs

@@ -458,7 +458,8 @@ namespace COM3D2.MeidoPhotoStudio.Converter
                     else if (assetName.StartsWith("MYR_"))
                     else if (assetName.StartsWith("MYR_"))
                     {
                     {
                         // MM 23.0+ my room creative prop
                         // MM 23.0+ my room creative prop
-                        PlacementData.Data data = myrAssetNameToData[assetName];
+                        int assetID = int.Parse(assetName.Replace("MYR_", string.Empty));
+                        PlacementData.Data data = PlacementData.GetData(assetID);
                         string asset = string.IsNullOrEmpty(data.assetName) ? data.resourceName : data.assetName;
                         string asset = string.IsNullOrEmpty(data.assetName) ? data.resourceName : data.assetName;
 
 
                         assetName = $"{assetName}#{asset}";
                         assetName = $"{assetName}#{asset}";