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

MSP_AllOffPatchのリファクタ #1

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

elleonard
Copy link
Contributor

https://tm.lucky-duet.com/viewtopic.php?f=116&t=9926 の書き込みを拝見しました。
ループ周りを整理して見通しを良くしてみましたが、いかがでしょうか。

@@ -7,6 +7,8 @@
* @plugindesc MultiSoundPlayerで設定したサウンドを終了時などに一括で解除します。
* @author 沫那環(Tamaki Awana)
*
* @base MultiSoundPlayer
Copy link
Contributor Author

Choose a reason for hiding this comment

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

MZプラグインは @base を指定することにより、プラグインの依存関係を明示できます。
これを書いておくと、このプラグイン単体で導入しようとした際にMZエディタに警告が表示されます。

* 指定したサウンドを削除する(元プラグインのUtility.delSoundを移植)
* @param {string|number} soundId サウンドID
*/
function deleteSound (soundId) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ここだけ自分用のインデント設定で書いてしまいましたが、元々4スペースか8スペースかで統一されていないようです。
あとで、お好みのインデントに調整していただければと思います。

ちなみに、VSCodeをお使いであれば、 Shift + Alt + F (Macの場合は Shift + Option + F)で自動フォーマットをかけてくれます。
エディタの設定でTab Sizeをお好みの幅に設定してから実行してみてください。

@t-awana
Copy link
Owner

t-awana commented Oct 20, 2020

すっきりと整ったコードのリファクタPRをありがとうございました。
@base指定のすっぼぬかしのフォローまでしてもらってしまい、恐れ多いです……。
JS初心者として、コメントもとても勉強になります! 本当にありがとうございました。 

@t-awana t-awana closed this Oct 20, 2020
@t-awana t-awana reopened this Oct 20, 2020
@t-awana
Copy link
Owner

t-awana commented Oct 20, 2020

(ミスってCloseしてしまった……!! 滝汗)

@t-awana t-awana merged commit a2bf01d into t-awana:master Oct 20, 2020
@elleonard elleonard deleted the refactor-msp-patch branch October 20, 2020 16:58
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