|
@@ -76,7 +76,9 @@ public static class MMSceneConverter
|
|
var dataSegments = data.Split('_');
|
|
var dataSegments = data.Split('_');
|
|
var strArray2 = dataSegments[1].Split(';');
|
|
var strArray2 = dataSegments[1].Split(';');
|
|
|
|
|
|
- var meidoCount = environment ? MeidoPhotoStudio.Plugin.MeidoPhotoStudio.kankyoMagic : strArray2.Length;
|
|
|
|
|
|
+ var meidoCount = environment
|
|
|
|
+ ? MeidoPhotoStudio.Plugin.MeidoPhotoStudio.kankyoMagic
|
|
|
|
+ : strArray2.Length;
|
|
|
|
|
|
return new()
|
|
return new()
|
|
{
|
|
{
|
|
@@ -165,7 +167,7 @@ public static class MMSceneConverter
|
|
writer.Write(isFreeLook);
|
|
writer.Write(isFreeLook);
|
|
|
|
|
|
var offsetTarget = isFreeLook
|
|
var offsetTarget = isFreeLook
|
|
- ? new(float.Parse(freeLookData[2]), 1f, float.Parse(freeLookData[1]))
|
|
|
|
|
|
+ ? new Vector3(float.Parse(freeLookData[2]), 1f, float.Parse(freeLookData[1]))
|
|
: new Vector3(0f, 1f, 0f);
|
|
: new Vector3(0f, 1f, 0f);
|
|
|
|
|
|
writer.Write(offsetTarget);
|
|
writer.Write(offsetTarget);
|
|
@@ -181,6 +183,7 @@ public static class MMSceneConverter
|
|
|
|
|
|
// face
|
|
// face
|
|
var faceValues = maidData[63].Split(',');
|
|
var faceValues = maidData[63].Split(',');
|
|
|
|
+
|
|
writer.Write(faceValues.Length);
|
|
writer.Write(faceValues.Length);
|
|
|
|
|
|
for (var i = 0; i < faceValues.Length; i++)
|
|
for (var i = 0; i < faceValues.Length; i++)
|
|
@@ -195,7 +198,7 @@ public static class MMSceneConverter
|
|
// MeidoSerializer -> Body version
|
|
// MeidoSerializer -> Body version
|
|
writer.WriteVersion(1);
|
|
writer.WriteVersion(1);
|
|
|
|
|
|
- var sixtyFourFlag = maidData.Length == 64;
|
|
|
|
|
|
+ var sixtyFourFlag = maidData.Length is 64;
|
|
|
|
|
|
writer.Write(sixtyFourFlag);
|
|
writer.Write(sixtyFourFlag);
|
|
|
|
|
|
@@ -211,7 +214,9 @@ public static class MMSceneConverter
|
|
writer.Write(ConversionUtility.ParseEulerAngle(maidData[j]));
|
|
writer.Write(ConversionUtility.ParseEulerAngle(maidData[j]));
|
|
}
|
|
}
|
|
|
|
|
|
- var rotationIndices = sixtyFourFlag ? BodyRotationIndices64 : BodyRotationIndices;
|
|
|
|
|
|
+ var rotationIndices = sixtyFourFlag
|
|
|
|
+ ? BodyRotationIndices64
|
|
|
|
+ : BodyRotationIndices;
|
|
|
|
|
|
// body rotations
|
|
// body rotations
|
|
foreach (var index in rotationIndices)
|
|
foreach (var index in rotationIndices)
|
|
@@ -220,7 +225,7 @@ public static class MMSceneConverter
|
|
var data = maidData[index];
|
|
var data = maidData[index];
|
|
|
|
|
|
// check special case for ClavicleL
|
|
// check special case for ClavicleL
|
|
- if (index == ClavicleLIndex)
|
|
|
|
|
|
+ if (index is ClavicleLIndex)
|
|
{
|
|
{
|
|
/*
|
|
/*
|
|
* Versions of MM possibly serialized ClavicleL improperly.
|
|
* Versions of MM possibly serialized ClavicleL improperly.
|
|
@@ -269,7 +274,7 @@ public static class MMSceneConverter
|
|
var kousokuUpperMenu = string.Empty;
|
|
var kousokuUpperMenu = string.Empty;
|
|
var kousokuLowerMenu = string.Empty;
|
|
var kousokuLowerMenu = string.Empty;
|
|
|
|
|
|
- var sixtyFourFlag = maidData.Length == 64;
|
|
|
|
|
|
+ var sixtyFourFlag = maidData.Length is 64;
|
|
|
|
|
|
if (!sixtyFourFlag)
|
|
if (!sixtyFourFlag)
|
|
{
|
|
{
|
|
@@ -279,12 +284,12 @@ public static class MMSceneConverter
|
|
{
|
|
{
|
|
var actualIndex = mpnIndex - 9;
|
|
var actualIndex = mpnIndex - 9;
|
|
|
|
|
|
- if (mpnIndex == 12)
|
|
|
|
|
|
+ if (mpnIndex is 12)
|
|
{
|
|
{
|
|
kousokuUpperMenu = MMConstants.MpnAttachProps[actualIndex];
|
|
kousokuUpperMenu = MMConstants.MpnAttachProps[actualIndex];
|
|
kousokuLowerMenu = MMConstants.MpnAttachProps[actualIndex - 1];
|
|
kousokuLowerMenu = MMConstants.MpnAttachProps[actualIndex - 1];
|
|
}
|
|
}
|
|
- else if (mpnIndex == 13)
|
|
|
|
|
|
+ else if (mpnIndex is 13)
|
|
{
|
|
{
|
|
kousokuUpperMenu = MMConstants.MpnAttachProps[actualIndex + 1];
|
|
kousokuUpperMenu = MMConstants.MpnAttachProps[actualIndex + 1];
|
|
kousokuLowerMenu = MMConstants.MpnAttachProps[actualIndex];
|
|
kousokuLowerMenu = MMConstants.MpnAttachProps[actualIndex];
|
|
@@ -296,7 +301,7 @@ public static class MMSceneConverter
|
|
|
|
|
|
var kousokuMenu = MMConstants.MpnAttachProps[actualIndex];
|
|
var kousokuMenu = MMConstants.MpnAttachProps[actualIndex];
|
|
|
|
|
|
- if (MMConstants.MpnAttachProps[actualIndex][7] == 'u')
|
|
|
|
|
|
+ if (MMConstants.MpnAttachProps[actualIndex][7] is 'u')
|
|
kousokuUpperMenu = kousokuMenu;
|
|
kousokuUpperMenu = kousokuMenu;
|
|
else
|
|
else
|
|
kousokuLowerMenu = kousokuMenu;
|
|
kousokuLowerMenu = kousokuMenu;
|
|
@@ -321,11 +326,10 @@ public static class MMSceneConverter
|
|
|
|
|
|
static void ConvertGravity(string[] data, BinaryWriter writer)
|
|
static void ConvertGravity(string[] data, BinaryWriter writer)
|
|
{
|
|
{
|
|
- var softG = new Vector3(
|
|
|
|
- float.Parse(data[12]), float.Parse(data[13]), float.Parse(data[14])
|
|
|
|
- );
|
|
|
|
|
|
+ var softG = new Vector3(float.Parse(data[12]), float.Parse(data[13]), float.Parse(data[14]));
|
|
|
|
|
|
var hairGravityActive = softG != MMConstants.DefaultSoftG;
|
|
var hairGravityActive = softG != MMConstants.DefaultSoftG;
|
|
|
|
+
|
|
writer.Write(hairGravityActive);
|
|
writer.Write(hairGravityActive);
|
|
// an approximation for hair gravity position
|
|
// an approximation for hair gravity position
|
|
writer.Write(softG * 90f);
|
|
writer.Write(softG * 90f);
|
|
@@ -350,7 +354,7 @@ public static class MMSceneConverter
|
|
|
|
|
|
if (strArray3.Length > 16)
|
|
if (strArray3.Length > 16)
|
|
{
|
|
{
|
|
- showingMessage = int.Parse(strArray3[34]) == 1;
|
|
|
|
|
|
+ showingMessage = int.Parse(strArray3[34]) is 1;
|
|
name = strArray3[35];
|
|
name = strArray3[35];
|
|
message = strArray3[36].Replace(newLine, "\n");
|
|
message = strArray3[36].Replace(newLine, "\n");
|
|
// MM does not serialize message font size
|
|
// MM does not serialize message font size
|
|
@@ -382,15 +386,13 @@ public static class MMSceneConverter
|
|
|
|
|
|
if (strArray3.Length > 16)
|
|
if (strArray3.Length > 16)
|
|
{
|
|
{
|
|
- cameraTargetPos = new(
|
|
|
|
- float.Parse(strArray3[27]), float.Parse(strArray3[28]), float.Parse(strArray3[29])
|
|
|
|
- );
|
|
|
|
|
|
+ cameraTargetPos = new(float.Parse(strArray3[27]), float.Parse(strArray3[28]), float.Parse(strArray3[29]));
|
|
|
|
|
|
cameraDistance = float.Parse(strArray3[30]);
|
|
cameraDistance = float.Parse(strArray3[30]);
|
|
|
|
|
|
cameraRotation = Quaternion.Euler(
|
|
cameraRotation = Quaternion.Euler(
|
|
- float.Parse(strArray3[31]), float.Parse(strArray3[32]), float.Parse(strArray3[33])
|
|
|
|
- );
|
|
|
|
|
|
+ float.Parse(strArray3[31]), float.Parse(strArray3[32]), float.Parse(strArray3[33])
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
Serialization.Get<CameraInfo>().Serialize(
|
|
Serialization.Get<CameraInfo>().Serialize(
|
|
@@ -455,7 +457,7 @@ public static class MMSceneConverter
|
|
|
|
|
|
for (var i = 0; i < 3; i++)
|
|
for (var i = 0; i < 3; i++)
|
|
{
|
|
{
|
|
- if (i == lightType || i == 0 && lightType == 3)
|
|
|
|
|
|
+ if (i == lightType || i is 0 && lightType is 3)
|
|
lightPropertySerializer.Serialize(lightProperty, writer);
|
|
lightPropertySerializer.Serialize(lightProperty, writer);
|
|
else
|
|
else
|
|
lightPropertySerializer.Serialize(DefaultLightProperty, writer);
|
|
lightPropertySerializer.Serialize(DefaultLightProperty, writer);
|
|
@@ -467,9 +469,9 @@ public static class MMSceneConverter
|
|
|
|
|
|
writer.Write(lightPosition);
|
|
writer.Write(lightPosition);
|
|
// light type. 3 is colour mode which uses directional light type.
|
|
// light type. 3 is colour mode which uses directional light type.
|
|
- writer.Write(lightType == 3 ? 0 : lightType);
|
|
|
|
|
|
+ writer.Write(lightType is 3 ? 0 : lightType);
|
|
// colour mode
|
|
// colour mode
|
|
- writer.Write(lightType == 3);
|
|
|
|
|
|
+ writer.Write(lightType is 3);
|
|
// MM lights cannot be disabled
|
|
// MM lights cannot be disabled
|
|
writer.Write(false);
|
|
writer.Write(false);
|
|
}
|
|
}
|
|
@@ -499,17 +501,15 @@ public static class MMSceneConverter
|
|
|
|
|
|
var lightProperty = new LightProperty
|
|
var lightProperty = new LightProperty
|
|
{
|
|
{
|
|
- Rotation = Quaternion.Euler(
|
|
|
|
- float.Parse(lightProperties[4]), float.Parse(lightProperties[5]), 18f
|
|
|
|
- ),
|
|
|
|
|
|
+ Rotation = Quaternion.Euler(float.Parse(lightProperties[4]), float.Parse(lightProperties[5]), 18f),
|
|
Intensity = float.Parse(lightProperties[6]),
|
|
Intensity = float.Parse(lightProperties[6]),
|
|
SpotAngle = spotAngle,
|
|
SpotAngle = spotAngle,
|
|
Range = spotAngle / 5f,
|
|
Range = spotAngle / 5f,
|
|
// MM does not save shadow strength for other lights
|
|
// MM does not save shadow strength for other lights
|
|
ShadowStrength = 0.098f,
|
|
ShadowStrength = 0.098f,
|
|
LightColour = new(
|
|
LightColour = new(
|
|
- float.Parse(lightProperties[1]), float.Parse(lightProperties[2]),
|
|
|
|
- float.Parse(lightProperties[3]), 1f
|
|
|
|
|
|
+ float.Parse(lightProperties[1]), float.Parse(lightProperties[2]), float.Parse(lightProperties[3]),
|
|
|
|
+ 1f
|
|
),
|
|
),
|
|
};
|
|
};
|
|
|
|
|
|
@@ -527,7 +527,7 @@ public static class MMSceneConverter
|
|
|
|
|
|
writer.Write(lightPosition);
|
|
writer.Write(lightPosition);
|
|
// light type. 3 is colour mode which uses directional light type.
|
|
// light type. 3 is colour mode which uses directional light type.
|
|
- writer.Write(lightType == 3 ? 0 : lightType);
|
|
|
|
|
|
+ writer.Write(lightType is 3 ? 0 : lightType);
|
|
// colour mode only applies to the main light
|
|
// colour mode only applies to the main light
|
|
writer.Write(false);
|
|
writer.Write(false);
|
|
// MM lights cannot be disabled
|
|
// MM lights cannot be disabled
|
|
@@ -550,24 +550,21 @@ public static class MMSceneConverter
|
|
writer.Write(BloomEffectManager.header);
|
|
writer.Write(BloomEffectManager.header);
|
|
writer.WriteVersion(1);
|
|
writer.WriteVersion(1);
|
|
|
|
|
|
- writer.Write(int.Parse(effectData[1]) == 1); // active
|
|
|
|
|
|
+ writer.Write(int.Parse(effectData[1]) is 1); // active
|
|
writer.Write(float.Parse(effectData[2]) / 5.7f * 100f); // intensity
|
|
writer.Write(float.Parse(effectData[2]) / 5.7f * 100f); // intensity
|
|
writer.Write((int)float.Parse(effectData[3])); // blur iterations
|
|
writer.Write((int)float.Parse(effectData[3])); // blur iterations
|
|
|
|
|
|
writer.WriteColour(
|
|
writer.WriteColour(
|
|
- new(
|
|
|
|
- 1f - float.Parse(effectData[4]), 1f - float.Parse(effectData[5]), 1f - float.Parse(effectData[6]),
|
|
|
|
- 1f
|
|
|
|
- )
|
|
|
|
- ); // bloom threshold colour
|
|
|
|
|
|
+ new(1f - float.Parse(effectData[4]), 1f - float.Parse(effectData[5]), 1f - float.Parse(effectData[6]), 1f)
|
|
|
|
+ ); // bloom threshold colour
|
|
|
|
|
|
- writer.Write(int.Parse(effectData[7]) == 1); // hdr
|
|
|
|
|
|
+ writer.Write(int.Parse(effectData[7]) is 1); // hdr
|
|
|
|
|
|
// vignetting
|
|
// vignetting
|
|
writer.Write(VignetteEffectManager.header);
|
|
writer.Write(VignetteEffectManager.header);
|
|
writer.WriteVersion(1);
|
|
writer.WriteVersion(1);
|
|
|
|
|
|
- writer.Write(int.Parse(effectData[8]) == 1); // active
|
|
|
|
|
|
+ writer.Write(int.Parse(effectData[8]) is 1); // active
|
|
writer.Write(float.Parse(effectData[9])); // intensity
|
|
writer.Write(float.Parse(effectData[9])); // intensity
|
|
writer.Write(float.Parse(effectData[10])); // blur
|
|
writer.Write(float.Parse(effectData[10])); // blur
|
|
writer.Write(float.Parse(effectData[11])); // blur spread
|
|
writer.Write(float.Parse(effectData[11])); // blur spread
|
|
@@ -585,7 +582,7 @@ public static class MMSceneConverter
|
|
writer.Write(SepiaToneEffectManger.header);
|
|
writer.Write(SepiaToneEffectManger.header);
|
|
writer.WriteVersion(1);
|
|
writer.WriteVersion(1);
|
|
|
|
|
|
- writer.Write(int.Parse(effectData[29]) == 1);
|
|
|
|
|
|
+ writer.Write(int.Parse(effectData[29]) is 1);
|
|
|
|
|
|
if (effectData.Length > 15)
|
|
if (effectData.Length > 15)
|
|
{
|
|
{
|
|
@@ -593,18 +590,18 @@ public static class MMSceneConverter
|
|
writer.Write(DepthOfFieldEffectManager.header);
|
|
writer.Write(DepthOfFieldEffectManager.header);
|
|
writer.WriteVersion(1);
|
|
writer.WriteVersion(1);
|
|
|
|
|
|
- writer.Write(int.Parse(effectData[15]) == 1); // active
|
|
|
|
|
|
+ writer.Write(int.Parse(effectData[15]) is 1); // active
|
|
writer.Write(float.Parse(effectData[16])); // focal length
|
|
writer.Write(float.Parse(effectData[16])); // focal length
|
|
writer.Write(float.Parse(effectData[17])); // focal size
|
|
writer.Write(float.Parse(effectData[17])); // focal size
|
|
writer.Write(float.Parse(effectData[18])); // aperture
|
|
writer.Write(float.Parse(effectData[18])); // aperture
|
|
writer.Write(float.Parse(effectData[19])); // max blur size
|
|
writer.Write(float.Parse(effectData[19])); // max blur size
|
|
- writer.Write(int.Parse(effectData[20]) == 1); // visualize focus
|
|
|
|
|
|
+ writer.Write(int.Parse(effectData[20]) is 1); // visualize focus
|
|
|
|
|
|
// fog
|
|
// fog
|
|
writer.Write(FogEffectManager.header);
|
|
writer.Write(FogEffectManager.header);
|
|
writer.WriteVersion(1);
|
|
writer.WriteVersion(1);
|
|
|
|
|
|
- writer.Write(int.Parse(effectData[21]) == 1); // active
|
|
|
|
|
|
+ writer.Write(int.Parse(effectData[21]) is 1); // active
|
|
writer.Write(float.Parse(effectData[22])); // fog distance
|
|
writer.Write(float.Parse(effectData[22])); // fog distance
|
|
writer.Write(float.Parse(effectData[23])); // density
|
|
writer.Write(float.Parse(effectData[23])); // density
|
|
writer.Write(float.Parse(effectData[24])); // height scale
|
|
writer.Write(float.Parse(effectData[24])); // height scale
|
|
@@ -612,10 +609,8 @@ public static class MMSceneConverter
|
|
|
|
|
|
// fog colour
|
|
// fog colour
|
|
writer.WriteColour(
|
|
writer.WriteColour(
|
|
- new(
|
|
|
|
- float.Parse(effectData[26]), float.Parse(effectData[27]), float.Parse(effectData[28]), 1f
|
|
|
|
- )
|
|
|
|
- );
|
|
|
|
|
|
+ new(float.Parse(effectData[26]), float.Parse(effectData[27]), float.Parse(effectData[28]), 1f)
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
writer.Write(EffectManager.footer);
|
|
writer.Write(EffectManager.footer);
|
|
@@ -684,13 +679,13 @@ public static class MMSceneConverter
|
|
TransformDTO = new()
|
|
TransformDTO = new()
|
|
{
|
|
{
|
|
Position = new(
|
|
Position = new(
|
|
- float.Parse(strArray3[41]), float.Parse(strArray3[42]), float.Parse(strArray3[43])
|
|
|
|
- ),
|
|
|
|
|
|
+ float.Parse(strArray3[41]), float.Parse(strArray3[42]), float.Parse(strArray3[43])
|
|
|
|
+ ),
|
|
Rotation = Quaternion.Euler(
|
|
Rotation = Quaternion.Euler(
|
|
- float.Parse(strArray3[38]), float.Parse(strArray3[39]), float.Parse(strArray3[40])
|
|
|
|
- ),
|
|
|
|
|
|
+ float.Parse(strArray3[38]), float.Parse(strArray3[39]), float.Parse(strArray3[40])
|
|
|
|
+ ),
|
|
LocalScale =
|
|
LocalScale =
|
|
- new(float.Parse(strArray3[44]), float.Parse(strArray3[45]), float.Parse(strArray3[46])),
|
|
|
|
|
|
+ new(float.Parse(strArray3[44]), float.Parse(strArray3[45]), float.Parse(strArray3[46])),
|
|
},
|
|
},
|
|
AttachPointInfo = AttachPointInfo.Empty,
|
|
AttachPointInfo = AttachPointInfo.Empty,
|
|
PropInfo = AssetToPropInfo(strArray3[37]),
|
|
PropInfo = AssetToPropInfo(strArray3[37]),
|
|
@@ -716,16 +711,16 @@ public static class MMSceneConverter
|
|
TransformDTO = new()
|
|
TransformDTO = new()
|
|
{
|
|
{
|
|
Position = new(
|
|
Position = new(
|
|
- float.Parse(assetParts[4]), float.Parse(assetParts[5]), float.Parse(assetParts[6])
|
|
|
|
- ),
|
|
|
|
|
|
+ float.Parse(assetParts[4]), float.Parse(assetParts[5]), float.Parse(assetParts[6])
|
|
|
|
+ ),
|
|
Rotation = Quaternion.Euler(
|
|
Rotation = Quaternion.Euler(
|
|
- float.Parse(assetParts[1]), float.Parse(assetParts[2]), float.Parse(assetParts[3])
|
|
|
|
- ),
|
|
|
|
|
|
+ float.Parse(assetParts[1]), float.Parse(assetParts[2]), float.Parse(assetParts[3])
|
|
|
|
+ ),
|
|
LocalScale =
|
|
LocalScale =
|
|
- new(float.Parse(assetParts[7]), float.Parse(assetParts[8]), float.Parse(assetParts[9])),
|
|
|
|
|
|
+ new(float.Parse(assetParts[7]), float.Parse(assetParts[8]), float.Parse(assetParts[9])),
|
|
},
|
|
},
|
|
AttachPointInfo = AttachPointInfo.Empty,
|
|
AttachPointInfo = AttachPointInfo.Empty,
|
|
- ShadowCasting = propInfo.Type == PropInfo.PropType.Mod,
|
|
|
|
|
|
+ ShadowCasting = propInfo.Type is PropInfo.PropType.Mod,
|
|
};
|
|
};
|
|
|
|
|
|
propSerializer.Serialize(propDto, writer);
|
|
propSerializer.Serialize(propDto, writer);
|
|
@@ -778,7 +773,10 @@ public static class MMSceneConverter
|
|
{
|
|
{
|
|
// MM's dumb way of using one data structure to store both a human readable name and asset name
|
|
// MM's dumb way of using one data structure to store both a human readable name and asset name
|
|
// ex. 'Pancakes #odogu_pancake'
|
|
// ex. 'Pancakes #odogu_pancake'
|
|
- return new(PropInfo.PropType.Odogu) { Filename = asset.Split('#')[1] };
|
|
|
|
|
|
+ return new(PropInfo.PropType.Odogu)
|
|
|
|
+ {
|
|
|
|
+ Filename = asset.Split('#')[1]
|
|
|
|
+ };
|
|
}
|
|
}
|
|
|
|
|
|
// modifiedMM official COM3D2 mod prop
|
|
// modifiedMM official COM3D2 mod prop
|
|
@@ -799,29 +797,42 @@ public static class MMSceneConverter
|
|
|
|
|
|
// hand items are treated as game props (Odogu) in MPS
|
|
// hand items are treated as game props (Odogu) in MPS
|
|
if (asset.StartsWith("handitem", StringComparison.OrdinalIgnoreCase)
|
|
if (asset.StartsWith("handitem", StringComparison.OrdinalIgnoreCase)
|
|
- || asset.StartsWith("kousoku", StringComparison.OrdinalIgnoreCase)
|
|
|
|
- )
|
|
|
|
|
|
+ || asset.StartsWith("kousoku", StringComparison.OrdinalIgnoreCase)
|
|
|
|
+ )
|
|
propType = PropInfo.PropType.Odogu;
|
|
propType = PropInfo.PropType.Odogu;
|
|
|
|
|
|
- return new(propType) { Filename = asset };
|
|
|
|
|
|
+ return new(propType)
|
|
|
|
+ {
|
|
|
|
+ Filename = asset
|
|
|
|
+ };
|
|
}
|
|
}
|
|
|
|
|
|
if (asset.StartsWith(bgOdoguPrefix, StringComparison.OrdinalIgnoreCase))
|
|
if (asset.StartsWith(bgOdoguPrefix, StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
{
|
|
// MM prepends BG to certain prop asset names. Don't know why.
|
|
// MM prepends BG to certain prop asset names. Don't know why.
|
|
- return new(PropInfo.PropType.Odogu) { Filename = asset.Substring(2) };
|
|
|
|
|
|
+ return new(PropInfo.PropType.Odogu)
|
|
|
|
+ {
|
|
|
|
+ Filename = asset.Substring(2)
|
|
|
|
+ };
|
|
}
|
|
}
|
|
|
|
|
|
if (asset.StartsWith(bgAsPropPrefix))
|
|
if (asset.StartsWith(bgAsPropPrefix))
|
|
{
|
|
{
|
|
// game bg as prop
|
|
// game bg as prop
|
|
- return new(PropInfo.PropType.Bg) { Filename = asset.Substring(3) };
|
|
|
|
|
|
+ return new(PropInfo.PropType.Bg)
|
|
|
|
+ {
|
|
|
|
+ Filename = asset.Substring(3)
|
|
|
|
+ };
|
|
}
|
|
}
|
|
|
|
|
|
- return new(PropInfo.PropType.Odogu) { Filename = asset };
|
|
|
|
|
|
+ return new(PropInfo.PropType.Odogu)
|
|
|
|
+ {
|
|
|
|
+ Filename = asset
|
|
|
|
+ };
|
|
}
|
|
}
|
|
|
|
|
|
// MM uses '_' as a separator for different parts of serialized data so it converts all '_' to spaces
|
|
// MM uses '_' as a separator for different parts of serialized data so it converts all '_' to spaces
|
|
- static string ConvertSpaces(string @string) => @string.Replace(' ', '_');
|
|
|
|
|
|
+ static string ConvertSpaces(string @string) =>
|
|
|
|
+ @string.Replace(' ', '_');
|
|
}
|
|
}
|
|
}
|
|
}
|