feat: infiniteEndo & infiniteRegalAya #741

Merged
Sainan merged 1 commits from infinite-endo-and-platinum2 into main 2025-01-05 20:36:39 -08:00
Owner

Closes #670

Closes #670
coderabbitai[bot] commented 2025-01-05 19:48:11 -08:00 (Migrated from github.com)
Author
Owner

Walkthrough

The pull request introduces new configuration options for managing in-game resources, specifically "Infinite Endo" and "Infinite Regal Aya". These changes span multiple files across the application, including configuration files, services, controllers, and the web user interface. The modifications allow users to toggle infinite resources through a new checkbox in the server settings, which impacts how inventory, purchases, and upgrades are processed. The implementation ensures that when these infinite resource options are enabled, the corresponding resource deductions are bypassed, effectively providing unlimited resources for users. The changes are consistent across the configuration service, inventory service, purchase service, and client-side scripts, creating a cohesive enhancement to the application's resource management capabilities.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.
<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- walkthrough_start --> ## Walkthrough The pull request introduces new configuration options for managing in-game resources, specifically "Infinite Endo" and "Infinite Regal Aya". These changes span multiple files across the application, including configuration files, services, controllers, and the web user interface. The modifications allow users to toggle infinite resources through a new checkbox in the server settings, which impacts how inventory, purchases, and upgrades are processed. The implementation ensures that when these infinite resource options are enabled, the corresponding resource deductions are bypassed, effectively providing unlimited resources for users. The changes are consistent across the configuration service, inventory service, purchase service, and client-side scripts, creating a cohesive enhancement to the application's resource management capabilities. <!-- walkthrough_end --> <!-- internal state start --> <!-- FAHghAtBAEAqAWBLAztF0CGA7TBXALgPYQDmAplmQE4b5kAm0AxoQLasX4Bc0ADldEIAjAFZkm+RADcyqIQE9mhetQxChifADoMiaFAB8wY+CjGAxOegAFAErQAyrnYYq84wjJ9cAGx/QqMgBHXFl8aEl8HwZoACIAMzJaHkQseNTNMgBRLHpCaAAyNDSMulsyEgwfAEF5DFjoAHcMVGRcIVZNOkYFCPgvXGRqR10sbExctFREFSxJdJje/H7oLGchYYB2ABYARi1oAElw9BbkQiZEWhjGzXg+rwBxTQAJdoCyXkJkTUI3aHif0cvAwTDIAD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4wrybyqASL7yFLnyDUyA3ysScTPz6AaLzSVUGpoB/zAKipeQQLoyeLio+KoKfiTQhK4KEKxLkLULdzWk1B8LsLGJcKvL9ClLkAiLbz7yKKqK/hDKEpjL6gGK9SOsDTWL2LzKvAuLQLwLyTlNGIBLHLhL4LRLoxxLUl+sX8dYHLYKRKlQVQ1QOZISvZoS/Z6MVtICKlw42VUTOVzQMSl5OAVR6IFNttEBYN/tOkMB5AaYJZzSGZwNaYjKuj6hCjLUk8Noz4nCa9dkUzV43UMKLoqiVhBhhghzIswQ/UfFA0gRbS040qB0o0GJY1czZB1EsR/0LrlM3SvAerqM8g7RejjMIYuErMqyTsHNZlFABlwgG4Azd051tMDx+Iwyronldl3Ca4fAtCWlMSkhwgNqu5/0Swsbwy/xglRhCca4N16AkRV1UMuQ29slxzu0bMeFXDGh5z1jTlNjlyAU1o1z/MV9NzL8N9ji+YzjwjLi5KANBrtkiFFZsryq8rKrBwOZeJeiPwNDUbFRxYfzYhpqJqoq5qtbMBUBuyywBVn80VRxQBxwcYpxtQbxZwGqo1nwVwhkPwmrYylB9w1ANBAITwQILaoAlw5MAB9GYZAQOvgt5f4+gQO6C8mYCUCM8COAADldFVIwFdGUO2CSDIAoQwA9ETs9ETu2CYG2G2AoTIETrztdCEFVKLooVdHro9HiG2DjrAhgGfE0GDttTDqMQjoYEDsnDjqAA --> <!-- internal state end --> <!-- tips_start --> --- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <details> <summary>🪧 Tips</summary> ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit <commit_id>, please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` 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) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR. ([Beta](https://docs.coderabbit.ai/early-access#beta)) - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements. </details> <!-- tips_end -->
coderabbitai[bot] (Migrated from github.com) reviewed 2025-01-05 19:49:55 -08:00
coderabbitai[bot] (Migrated from github.com) left a comment
Author
Owner

Actionable comments posted: 0

🧹 Nitpick comments (2)
config.json.example (1)

20-21: Consider using false as default values in the example config for safer production.
Having "infiniteEndo" and "infiniteRegalAya" as true by default can be risky in a production environment. If this file is often copied as-is, you may inadvertently deploy with infinite resource settings enabled.

-  "infiniteEndo": true,
-  "infiniteRegalAya": true,
+  "infiniteEndo": false,
+  "infiniteRegalAya": false,
src/services/configService.ts (1)

46-47: Optional vs. mandatory config fields
If these flags are essential to functionality, consider removing the ? to make them required. This approach can avoid undefined-checking in other parts of the code.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69c65f3ce2 and d862a6ee4e.

📒 Files selected for processing (7)
  • config.json.example (1 hunks)
  • src/controllers/api/inventoryController.ts (1 hunks)
  • src/services/configService.ts (1 hunks)
  • src/services/inventoryService.ts (1 hunks)
  • src/services/purchaseService.ts (2 hunks)
  • static/webui/index.html (1 hunks)
  • static/webui/script.js (1 hunks)
🔇 Additional comments (6)
src/controllers/api/inventoryController.ts (1)

77-82: Confirm 999999999 as a sufficient sentinel value
Setting resources to 999999999 is a common placeholder, but consider potential overflow or UI issues if the application or database constraints are extremely large. Confirm consistency across your codebase for these “infinite” resource placeholders.

src/services/purchaseService.ts (2)

27-27: Direct config import
Importing config directly helps centralize your settings, but be mindful of potential circular dependencies if you expand the usage in the future. So far, it seems no cyclical issues are present.


156-156: Conditional prime token deduction
This logic correctly aligns with the infinite resource setting: prime tokens aren’t deducted if infiniteRegalAya is enabled. Verify that your UX acknowledges no cost in these scenarios.

src/services/inventoryService.ts (1)

911-916: Checks for infinite credits and endo appear correct.

The newly introduced conditionals ensure that costs for credits and endo are subtracted only when the corresponding infinite resource flags are disabled. This logic properly aligns with the PR's objective of granting infinite resources.

static/webui/script.js (1)

807-808: New configuration entries are added consistently.

Including "infiniteEndo" and "infiniteRegalAya" in uiConfigs is straightforward and follows the existing convention for toggling feature flags.

static/webui/index.html (1)

238-245: Addition of new checkboxes is clear and maintains consistency.

The new checkboxes for "Infinite Endo" and "Infinite Regal Aya" integrate smoothly within the existing settings. The naming is descriptive, and the IDs are consistent with the rest of the configuration items.

**Actionable comments posted: 0** <details> <summary>🧹 Nitpick comments (2)</summary><blockquote> <details> <summary>config.json.example (1)</summary><blockquote> `20-21`: **Consider using false as default values in the example config for safer production.** Having `"infiniteEndo"` and `"infiniteRegalAya"` as `true` by default can be risky in a production environment. If this file is often copied as-is, you may inadvertently deploy with infinite resource settings enabled. ```diff - "infiniteEndo": true, - "infiniteRegalAya": true, + "infiniteEndo": false, + "infiniteRegalAya": false, ``` </blockquote></details> <details> <summary>src/services/configService.ts (1)</summary><blockquote> `46-47`: **Optional vs. mandatory config fields** If these flags are essential to functionality, consider removing the `?` to make them required. This approach can avoid undefined-checking in other parts of the code. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: .coderabbit.yaml** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 69c65f3ce2d1f47f2285dfef80a47a7b87fa7d04 and d862a6ee4eae9a087084c449e8086b24c96660f4. </details> <details> <summary>📒 Files selected for processing (7)</summary> * `config.json.example` (1 hunks) * `src/controllers/api/inventoryController.ts` (1 hunks) * `src/services/configService.ts` (1 hunks) * `src/services/inventoryService.ts` (1 hunks) * `src/services/purchaseService.ts` (2 hunks) * `static/webui/index.html` (1 hunks) * `static/webui/script.js` (1 hunks) </details> <details> <summary>🔇 Additional comments (6)</summary><blockquote> <details> <summary>src/controllers/api/inventoryController.ts (1)</summary> `77-82`: **Confirm 999999999 as a sufficient sentinel value** Setting resources to 999999999 is a common placeholder, but consider potential overflow or UI issues if the application or database constraints are extremely large. Confirm consistency across your codebase for these “infinite” resource placeholders. </details> <details> <summary>src/services/purchaseService.ts (2)</summary> `27-27`: **Direct config import** Importing `config` directly helps centralize your settings, but be mindful of potential circular dependencies if you expand the usage in the future. So far, it seems no cyclical issues are present. --- `156-156`: **Conditional prime token deduction** This logic correctly aligns with the infinite resource setting: prime tokens aren’t deducted if `infiniteRegalAya` is enabled. Verify that your UX acknowledges no cost in these scenarios. </details> <details> <summary>src/services/inventoryService.ts (1)</summary> `911-916`: **Checks for infinite credits and endo appear correct.** The newly introduced conditionals ensure that costs for credits and endo are subtracted only when the corresponding infinite resource flags are disabled. This logic properly aligns with the PR's objective of granting infinite resources. </details> <details> <summary>static/webui/script.js (1)</summary> `807-808`: **New configuration entries are added consistently.** Including `"infiniteEndo"` and `"infiniteRegalAya"` in `uiConfigs` is straightforward and follows the existing convention for toggling feature flags. </details> <details> <summary>static/webui/index.html (1)</summary> `238-245`: **Addition of new checkboxes is clear and maintains consistency.** The new checkboxes for "Infinite Endo" and "Infinite Regal Aya" integrate smoothly within the existing settings. The naming is descriptive, and the IDs are consistent with the rest of the configuration items. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Sign in to join this conversation.
No description provided.