-
Notifications
You must be signed in to change notification settings - Fork 32
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
fix: index error with roster causing raid/purge issues #501
Conversation
📝 WalkthroughWalkthroughIn this change within the Roster constructor of the Suggested labels
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
scripts/scr_roster/scr_roster.gml (2)
347-351
: Praise be to the Omnissiah! The logic circuit has been optimized.The introduction of
_ship_index
variable improves code clarity and prevents potential array index errors by properly mapping the loop counter to actual ship indices. This modification aligns with the sacred patterns of proper array traversal.Consider further optimization by applying this sacred pattern:
- var _ship_index; - for (var s=0;s<array_length(_ships);s++){ - _ship_index = _ships[s]; - if (obj_ini.ship_carrying[_ship_index]>0){ - new_ship_button(obj_ini.ship[_ship_index],_ship_index); + for (var _ship_index of _ships){ + if (obj_ini.ship_carrying[_ship_index]>0){ + new_ship_button(obj_ini.ship[_ship_index],_ship_index);This modification employs the more efficient
for...of
loop construct, reducing cognitive overhead and potential for indexing errors while maintaining the Machine Spirit's intended functionality.
747-749
: By the grace of the Machine God, an unimplemented feature has been detected.The TODO comment indicates that the STC bonus for ranged vehicle weapons remains unimplemented. This missing functionality could impact vehicle combat effectiveness.
Would you like me to generate an implementation for the STC bonus system for ranged vehicle weapons? The Omnissiah's wisdom guides us in such matters.
Description of changes
Reasons for changes
Related links
How have you tested your changes?