mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-02-01 03:02:56 +08:00
chore: fix incorrect parameters for certain errors
This commit is contained in:
parent
c2e6bb53cd
commit
13e009b6fc
@ -78,8 +78,11 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
{
|
{
|
||||||
if (acp.type != param.type)
|
if (acp.type != param.type)
|
||||||
{
|
{
|
||||||
BuildReport.LogFatal("error.merge_animator.param_type_mismatch", param.name, acp.type,
|
BuildReport.LogFatal("error.merge_animator.param_type_mismatch", new[]
|
||||||
param.type);
|
{
|
||||||
|
param.name, acp.type.ToString(),
|
||||||
|
param.type.ToString()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
@ -291,9 +291,9 @@ namespace nadena.dev.modular_avatar.editor.ErrorReporting
|
|||||||
return new AvatarReportScope();
|
return new AvatarReportScope();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void Log(ReportLevel level, string code, params object[] objects)
|
internal static void Log(ReportLevel level, string code, object[] strings, params Object[] objects)
|
||||||
{
|
{
|
||||||
ErrorLog errorLog = new ErrorLog(level, code, objects);
|
ErrorLog errorLog = new ErrorLog(level, code, strings, objects);
|
||||||
|
|
||||||
var avatarReport = CurrentReport._currentAvatar;
|
var avatarReport = CurrentReport._currentAvatar;
|
||||||
if (avatarReport == null)
|
if (avatarReport == null)
|
||||||
@ -305,9 +305,9 @@ namespace nadena.dev.modular_avatar.editor.ErrorReporting
|
|||||||
avatarReport.logs.Add(errorLog);
|
avatarReport.logs.Add(errorLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void LogFatal(string code, params object[] objects)
|
internal static void LogFatal(string code, object[] strings, params Object[] objects)
|
||||||
{
|
{
|
||||||
Log(ReportLevel.Error, code, objects);
|
Log(ReportLevel.Error, code, strings, objects);
|
||||||
if (CurrentReport._currentAvatar != null)
|
if (CurrentReport._currentAvatar != null)
|
||||||
{
|
{
|
||||||
CurrentReport._currentAvatar.successful = false;
|
CurrentReport._currentAvatar.successful = false;
|
||||||
|
@ -72,8 +72,12 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
expParams.parameters = parameters.ToArray();
|
expParams.parameters = parameters.ToArray();
|
||||||
if (expParams.CalcTotalCost() > VRCExpressionParameters.MAX_PARAMETER_COST)
|
if (expParams.CalcTotalCost() > VRCExpressionParameters.MAX_PARAMETER_COST)
|
||||||
{
|
{
|
||||||
BuildReport.LogFatal("error.rename_params.too_many_synced_params", expParams.CalcTotalCost(),
|
BuildReport.LogFatal("error.rename_params.too_many_synced_params", new[]
|
||||||
VRCExpressionParameters.MAX_PARAMETER_COST);
|
{
|
||||||
|
"" + expParams.CalcTotalCost(),
|
||||||
|
"" + VRCExpressionParameters.MAX_PARAMETER_COST,
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
avatar.expressionParameters = expParams;
|
avatar.expressionParameters = expParams;
|
||||||
|
Loading…
Reference in New Issue
Block a user