Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ability to allow type mismatch between ProvidedParameters #407

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

nekobako
Copy link
Contributor

ProvidedParameter をマージする際、ParameterType が違ったら互いの ParameterType を見て自動的に解決するかどうかを指定できるようにします。

こちらで使用する機能です。
bdunderscore/modular-avatar#1174 (comment)

/// <summary>
/// If true, mismatched parameter types will be merged automatically
/// </summary>
public bool AllowTypeMismatch { get; set; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExpandTypeOnConflict のほうが動作がわかりやすいかも?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

そうですね、変更しました!

Comment on lines 266 to 268
if (oldP.ParameterType == newP.ParameterType ||
oldP.ParameterType != null && newP.ParameterType == null ||
oldP.ParameterType != null && newP.IsAnimatorOnly)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この辺の&&||の混合が少しわかりづらいので()で囲みましょう

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しましたmm

Copy link
Owner

@bdunderscore bdunderscore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます!

@bdunderscore bdunderscore merged commit 5c8eb19 into bdunderscore:main Sep 23, 2024
6 checks passed
@nekobako
Copy link
Contributor Author

CHANGELOG が AllowTypeMismatch のままだった・・・

@nekobako nekobako deleted the allow-type-mismatch branch September 23, 2024 00:37
@bdunderscore
Copy link
Owner

CHANGELOGを修正しました 👍

@nekobako
Copy link
Contributor Author

ありがとうございます!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants