improve: Add Ergo Blast's Tenet Weapon shop #568

Merged
VampireKitten merged 2 commits from add-ergo-blast into main 2024-10-19 04:47:28 -07:00
VampireKitten commented 2024-10-18 14:33:27 -07:00 (Migrated from github.com)

Fixes #567. If anyone can find any missing shops, please tell me.

Fixes #567. If anyone can find any missing shops, please tell me.
coderabbitai[bot] commented 2024-10-18 14:33:33 -07:00 (Migrated from github.com)

Walkthrough

The pull request introduces an enhancement to the getVendorInfoController function by adding a new case for handling the vendor manifest located at "/Lotus/Types/Game/VendorManifests/Hubs/PerrinSequenceWeaponVendorManifest". This update allows the controller to return the HubsPerrinSequenceWeaponVendorManifest JSON data, thereby expanding the types of vendor information that can be retrieved based on query parameters. The structure of the existing switch statement in the controller remains unchanged, ensuring that the integration of the new case is seamless. Additionally, a new JSON file has been created to define the vendor manifest for the "Hubs Perrin Sequence Weapon Vendor," which includes detailed information about the vendor and the items available for purchase, such as pricing, attributes, and identifiers.

Assessment against linked issues

Objective Addressed Explanation
Handle vendor manifest for Ergo Glast
  • #565: The changes in this PR also involve updates to the getVendorInfoController function, specifically adding new vendor cases and JSON imports, which relates directly to the modifications made in the main PR regarding vendor manifests.

Suggested reviewers

  • Sainan

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 598fc6e0ee and e165832aef.

📒 Files selected for processing (1)
  • static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json

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 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 an enhancement to the `getVendorInfoController` function by adding a new case for handling the vendor manifest located at `"/Lotus/Types/Game/VendorManifests/Hubs/PerrinSequenceWeaponVendorManifest"`. This update allows the controller to return the `HubsPerrinSequenceWeaponVendorManifest` JSON data, thereby expanding the types of vendor information that can be retrieved based on query parameters. The structure of the existing switch statement in the controller remains unchanged, ensuring that the integration of the new case is seamless. Additionally, a new JSON file has been created to define the vendor manifest for the "Hubs Perrin Sequence Weapon Vendor," which includes detailed information about the vendor and the items available for purchase, such as pricing, attributes, and identifiers. ## Assessment against linked issues | Objective | Addressed | Explanation | |---------------------------------------------------|-----------|-----------------------------------------------------------------------------| | Handle vendor manifest for Ergo Glast | ✅ | | ## Possibly related PRs - #565: The changes in this PR also involve updates to the `getVendorInfoController` function, specifically adding new vendor cases and JSON imports, which relates directly to the modifications made in the main PR regarding vendor manifests. ## Suggested reviewers - Sainan <!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai --> <!-- ``` src/controllers/api/getVendorInfoController.ts: """ ## Consolidated summary of changes The `getVendorInfoController` function has been updated to include a new case for handling the vendor manifest associated with the path `"/Lotus/Types/Game/VendorManifests/Hubs/PerrinSequenceWeaponVendorManifest"`. This addition allows the controller to respond with the `HubsPerrinSequenceWeaponVendorManifest` JSON data, thereby enhancing the range of vendor data that can be retrieved based on the query parameter. The overall structure of the switch statement remains unchanged, with the new case integrated seamlessly among the existing cases. ## Alterations to the declarations of exported or public entities - Variable added: `HubsPerrinSequenceWeaponVendorManifest` in `src/controllers/api/getVendorInfoController.ts` """ --- static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json: """ ## Consolidated summary of changes A new JSON file has been introduced that defines a vendor manifest for the "Hubs Perrin Sequence Weapon Vendor." The structure includes a unique identifier for the vendor, a type name indicating the vendor's category, and an item manifest that lists various store items available for purchase. Each item in the manifest contains details such as the store item path, pricing information (including item count, item type, and product category), and additional attributes like bin location, quantity multiplier, expiry date, purchase quantity limit, and whether multiple purchases are allowed. Each item also has a random seed for localization tagging and a unique identifier. The vendor manifest includes a property text hash, a random seed type, a weapon upgrade value attenuation exponent, and a general expiry date for the vendor's offerings. ## Alterations to the declarations of exported or public entities - New JSON structure added: `VendorInfo` in `static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json` ``` --> <!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: pr objectives by coderabbit.ai --> <!-- ## PR Summary The pull request titled "Add Ergo Blast's Tenet Weapon shop" was submitted by the user VampireKitten and is identified by the number 568. The primary purpose of this PR is to address issue #567, which pertains to the absence of a vendor manifest for Ergo Glast. The description indicates that the author is open to feedback regarding any additional missing shops that may need to be included. The PR can be accessed through the provided URL: [https://github.com/spaceninjaserver/SpaceNinjaServer/pull/568](https://github.com/spaceninjaserver/SpaceNinjaServer/pull/568). ## Objectives from Linked Issues The linked issue #567 is titled "Ergo Glast has no Vendor Manifest." The issue highlights the need for a vendor manifest associated with Ergo Glast, specifically referencing the path `/Lotus/Types/Game/VendorManifests/Hubs/PerrinSequenceWeaponVendorManifest`. The user responsible for this issue mentions that they will retrieve the necessary information soon and are currently in the process of rotating through the relay to identify any additional missing vendor manifests. The objective is to ensure that the vendor manifest for Ergo Glast is created and integrated, thereby enhancing the functionality related to vendor interactions within the game. ## Comments Summary In the comments on the PR, user VampireKitten suggests organizing the switch cases in a more structured manner, such as alphabetically by vendor path or grouping related vendors together, to improve readability and facilitate easier navigation in the future. In response, VampireKitten humorously notes that they had already implemented such organization. Another user, Sainan, comments on the urgency of the `Expiry`, indicating that it is quite soon. VampireKitten acknowledges this oversight, admitting to forgetting to change the expiry date for this particular vendor, despite having done so for another vendor, Palladino. This exchange highlights the collaborative nature of the PR review process, where contributors provide feedback and address issues in real-time. --> <!-- end of auto-generated comment: pr objectives by coderabbit.ai --> --- <details> <summary>📜 Recent review details</summary> **Configuration used: .coderabbit.yaml** **Review profile: CHILL** <details> <summary>📥 Commits</summary> Files that changed from the base of the PR and between 598fc6e0eed8781b7414e848d1e2b84ba8781e37 and e165832aef1420fd97c9ef4a459a54b57ef9b0b9. </details> <details> <summary>📒 Files selected for processing (1)</summary> * static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json (1 hunks) </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary> * static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json </details> </details><!-- commit_ids_reviewed_start --> <!-- 598fc6e0eed8781b7414e848d1e2b84ba8781e37 --> <!-- e165832aef1420fd97c9ef4a459a54b57ef9b0b9 --> <!-- commit_ids_reviewed_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 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://coderabbit.ai/docs) 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 2024-10-18 14:35:23 -07:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json (1)

7-122: LGTM! Consider parameterizing common values.

The ItemManifest structure is consistent and well-defined. Each item has appropriate attributes for pricing, purchase limits, and identification.

Consider parameterizing common values like the price (40 GranumBucks) and expiry date. This would make it easier to update these values globally in the future if needed.

src/controllers/api/getVendorInfoController.ts (1)

63-65: LGTM: New case correctly handles the Perrin Sequence Weapon Vendor Manifest.

The new case for handling the Perrin Sequence Weapon Vendor Manifest is correctly implemented and follows the existing pattern in the switch statement.

Consider organizing the switch cases in a more structured manner, such as alphabetically by vendor path or grouping related vendors together. This would improve readability and make it easier to locate specific cases in the future.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1a029ebb4b and 598fc6e0ee.

📒 Files selected for processing (2)
  • src/controllers/api/getVendorInfoController.ts (2 hunks)
  • static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json (1 hunks)
🧰 Additional context used
🔇 Additional comments (6)
static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json (4)

1-6: LGTM! Verify the expiry date.

The overall structure of the vendor manifest looks good. The TypeName correctly matches the path mentioned in the PR objectives (/Lotus/Types/Game/VendorManifests/Hubs/PerrinSequenceWeaponVendorManifest).

Please confirm if the expiry date (July 19, 2024) set on line 129 is intentional or if it should be adjusted.

Also applies to: 124-131


8-98: LGTM! Verify weapon selection and pricing.

The manifest includes a good variety of weapons, which is appropriate for the Perrin Sequence Weapon Vendor. The consistent pricing and purchase conditions across items are noted.

Please confirm if:

  1. The selection of weapons is complete and accurate for this vendor.
  2. The uniform pricing of 40 GranumBucks for all weapons is intentional.

124-126: Please clarify the purpose of additional vendor properties.

The manifest includes some additional properties that may affect the vendor's behavior:

  1. PropertyTextHash
  2. RandomSeedType
  3. WeaponUpgradeValueAttenuationExponent

Could you please provide more information on the purpose and impact of these properties, especially the WeaponUpgradeValueAttenuationExponent? This will help ensure they are set correctly for the intended vendor behavior.


1-133: Summary: Vendor manifest looks good, awaiting clarifications.

Overall, the Hubs Perrin Sequence Weapon Vendor Manifest is well-structured and contains the necessary information. The manifest includes a variety of weapons with consistent pricing and purchase conditions.

To finalize this review, please address the following:

  1. Verify the expiry date for the vendor and items.
  2. Confirm the weapon selection and pricing strategy.
  3. Provide clarification on the additional vendor properties.
  4. Consider the suggestion to parameterize common values for easier future updates.

Once these points are addressed, the manifest should be ready for integration.

src/controllers/api/getVendorInfoController.ts (2)

18-18: LGTM: Import statement is consistent and follows existing patterns.

The new import for HubsPerrinSequenceWeaponVendorManifest is correctly added and follows the established naming conventions and import patterns in the file.


Line range hint 1-138: Summary: Successfully added support for Ergo Glast's Tenet Weapon shop.

The changes in this file effectively implement support for the Perrin Sequence Weapon Vendor Manifest, addressing the main objective of the PR. The implementation is consistent with existing patterns and doesn't introduce any apparent issues.

To ensure the completeness of the implementation, please run the following script to check if there are any other references to Ergo Glast or Perrin Sequence that might need updating:

This will help identify any other places in the codebase that might need to be updated to fully support the new vendor.

**Actionable comments posted: 0** <details> <summary>🧹 Outside diff range and nitpick comments (2)</summary><blockquote> <details> <summary>static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json (1)</summary><blockquote> `7-122`: **LGTM! Consider parameterizing common values.** The ItemManifest structure is consistent and well-defined. Each item has appropriate attributes for pricing, purchase limits, and identification. Consider parameterizing common values like the price (40 GranumBucks) and expiry date. This would make it easier to update these values globally in the future if needed. </blockquote></details> <details> <summary>src/controllers/api/getVendorInfoController.ts (1)</summary><blockquote> `63-65`: **LGTM: New case correctly handles the Perrin Sequence Weapon Vendor Manifest.** The new case for handling the Perrin Sequence Weapon Vendor Manifest is correctly implemented and follows the existing pattern in the switch statement. Consider organizing the switch cases in a more structured manner, such as alphabetically by vendor path or grouping related vendors together. This would improve readability and make it easier to locate specific cases in the future. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: .coderabbit.yaml** **Review profile: CHILL** <details> <summary>📥 Commits</summary> Files that changed from the base of the PR and between 1a029ebb4bbe714f809d36f2888daa192db4f2b7 and 598fc6e0eed8781b7414e848d1e2b84ba8781e37. </details> <details> <summary>📒 Files selected for processing (2)</summary> * src/controllers/api/getVendorInfoController.ts (2 hunks) * static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> </details> <details> <summary>🔇 Additional comments (6)</summary><blockquote> <details> <summary>static/fixed_responses/getVendorInfo/HubsPerrinSequenceWeaponVendorManifest.json (4)</summary><blockquote> `1-6`: **LGTM! Verify the expiry date.** The overall structure of the vendor manifest looks good. The `TypeName` correctly matches the path mentioned in the PR objectives (`/Lotus/Types/Game/VendorManifests/Hubs/PerrinSequenceWeaponVendorManifest`). Please confirm if the expiry date (July 19, 2024) set on line 129 is intentional or if it should be adjusted. Also applies to: 124-131 --- `8-98`: **LGTM! Verify weapon selection and pricing.** The manifest includes a good variety of weapons, which is appropriate for the Perrin Sequence Weapon Vendor. The consistent pricing and purchase conditions across items are noted. Please confirm if: 1. The selection of weapons is complete and accurate for this vendor. 2. The uniform pricing of 40 GranumBucks for all weapons is intentional. --- `124-126`: **Please clarify the purpose of additional vendor properties.** The manifest includes some additional properties that may affect the vendor's behavior: 1. `PropertyTextHash` 2. `RandomSeedType` 3. `WeaponUpgradeValueAttenuationExponent` Could you please provide more information on the purpose and impact of these properties, especially the `WeaponUpgradeValueAttenuationExponent`? This will help ensure they are set correctly for the intended vendor behavior. --- `1-133`: **Summary: Vendor manifest looks good, awaiting clarifications.** Overall, the Hubs Perrin Sequence Weapon Vendor Manifest is well-structured and contains the necessary information. The manifest includes a variety of weapons with consistent pricing and purchase conditions. To finalize this review, please address the following: 1. Verify the expiry date for the vendor and items. 2. Confirm the weapon selection and pricing strategy. 3. Provide clarification on the additional vendor properties. 4. Consider the suggestion to parameterize common values for easier future updates. Once these points are addressed, the manifest should be ready for integration. </blockquote></details> <details> <summary>src/controllers/api/getVendorInfoController.ts (2)</summary><blockquote> `18-18`: **LGTM: Import statement is consistent and follows existing patterns.** The new import for `HubsPerrinSequenceWeaponVendorManifest` is correctly added and follows the established naming conventions and import patterns in the file. --- Line range hint `1-138`: **Summary: Successfully added support for Ergo Glast's Tenet Weapon shop.** The changes in this file effectively implement support for the Perrin Sequence Weapon Vendor Manifest, addressing the main objective of the PR. The implementation is consistent with existing patterns and doesn't introduce any apparent issues. To ensure the completeness of the implementation, please run the following script to check if there are any other references to Ergo Glast or Perrin Sequence that might need updating: This will help identify any other places in the codebase that might need to be updated to fully support the new vendor. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
VampireKitten commented 2024-10-18 14:39:28 -07:00 (Migrated from github.com)

Consider organizing the switch cases in a more structured manner, such as alphabetically by vendor path or grouping related vendors together. This would improve readability and make it easier to locate specific cases in the future.

Wow, it's almost like I had already done that...

>Consider organizing the switch cases in a more structured manner, such as alphabetically by vendor path or grouping related vendors together. This would improve readability and make it easier to locate specific cases in the future. Wow, it's almost like I had already done that...

Looks like the Expiry is quite soon

Looks like the `Expiry` is quite soon
VampireKitten commented 2024-10-18 15:10:50 -07:00 (Migrated from github.com)

Iiiiiii forgot to change the expiry, didn't I. I changed it for Palladino, completely forgot here.

Iiiiiii forgot to change the expiry, didn't I. I changed it for Palladino, completely forgot here.
Sainan approved these changes 2024-10-18 15:14:32 -07:00
Sign in to join this conversation.
No description provided.