|
@@ -61,7 +61,7 @@ public class MMConverter : IConverter
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
catch (Exception e)
|
|
{
|
|
{
|
|
- if (Plugin.Instance == null)
|
|
|
|
|
|
+ if (!Plugin.Instance)
|
|
return;
|
|
return;
|
|
|
|
|
|
Plugin.Instance.Logger.LogError($"Could not convert {Path.GetFileName(filePath)} scene because {e}");
|
|
Plugin.Instance.Logger.LogError($"Could not convert {Path.GetFileName(filePath)} scene because {e}");
|
|
@@ -104,7 +104,7 @@ public class MMConverter : IConverter
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
catch (Exception e)
|
|
{
|
|
{
|
|
- if (Plugin.Instance != null)
|
|
|
|
|
|
+ if (Plugin.Instance)
|
|
Plugin.Instance.Logger.LogWarning(
|
|
Plugin.Instance.Logger.LogWarning(
|
|
$"Could not {(e is IOException ? "read" : "parse")} ini file {filePath}"
|
|
$"Could not {(e is IOException ? "read" : "parse")} ini file {filePath}"
|
|
);
|
|
);
|
|
@@ -115,7 +115,7 @@ public class MMConverter : IConverter
|
|
if (iniFile.HasSection("scene"))
|
|
if (iniFile.HasSection("scene"))
|
|
return iniFile.GetSection("scene");
|
|
return iniFile.GetSection("scene");
|
|
|
|
|
|
- if (Plugin.Instance != null)
|
|
|
|
|
|
+ if (Plugin.Instance)
|
|
Plugin.Instance.Logger.LogWarning(
|
|
Plugin.Instance.Logger.LogWarning(
|
|
$"{filePath} is not a valid MM config because '[scene]' section is missing"
|
|
$"{filePath} is not a valid MM config because '[scene]' section is missing"
|
|
);
|
|
);
|