feat: [1094] 色変化(ncolor_data)の0フレーム時の色をキーコンフィグ画面に一部反映する仕様を追加#2117
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughWhen the key-config button is pressed, it now passes an init flag to ChangesKey-config color initialization from minimap arrow data
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@js/danoni_main.js`:
- Around line 9538-9541: The code assumes g_localKeyStorage and
g_baseColorGrs[...] exist before indexing; add guards so baseGroupNum uses
g_localKeyStorage.keyCtrlPtn only when g_localKeyStorage is defined and ensure
g_baseColorGrs[`color${keyCtrlPtn}_${baseGroupNum}`] and
g_keyObj[`color${keyCtrlPtn}_${g_keycons.colorGroupNum}`] are defined before
comparing/indexing them; update the condition around baseGroupNum, the
g_keyObj[...] access and the g_baseColorGrs[...] lookup to short-circuit if
either object or the computed color key is missing to avoid runtime crashes in
self/custom-key paths.
- Around line 9496-9513: The code assumes
g_detailObj.miniMapParams[g_stateObj.scoreId]._scoreObj.ncolorData.Arrow exists
and that val[1] is always a string; to fix, first guard access to
ncolorData/Arrow by defaulting arrowColorTmp to an empty array if those objects
are missing (use a safe lookup of
g_detailObj.miniMapParams[g_stateObj.scoreId]._scoreObj.ncolorData?.Arrow ||
[]), then when iterating arrowColors normalize val[1] by checking its type: if
typeof val[1] === 'string' and val[1].startsWith('g') handle group lookup as
before, otherwise coerce numeric selectors to numbers (e.g. parseInt or Number)
before using them as indices; also ensure initColors is sized/initialized for
tkObj.keyNum and use those normalized indices when calling makeColorGradation so
lookups in g_keyObj[`color${tkObj.keyCtrlPtn}`] and assignments to initColors
are safe.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1b22d79c-1130-4b25-af5c-e82ba0ae05da
📒 Files selected for processing (2)
js/danoni_main.jsjs/lib/danoni_constants.js
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
🔨 変更内容 / Details of Changes
1. 色変化(ncolor_data)の0フレーム時の色をキーコンフィグ画面に一部反映する仕様を追加
その場合はカラーグループに属する色に変わります(ncolor_dataの値を参照しません)。
⇒このため、一時的にカラーグループを変更した場合は実際の矢印色と異なる場合があります。
🔖 関連Issue, 変更理由 / Related Issues, Reason for Changes
https://discord.com/channels/698460971231870977/944491021918683196/1505405885944434828
📷 スクリーンショット / Screenshot
📝 その他コメント / Other Comments
同じレーンで複数色変化を指定した場合の順序保証はありません。