Closed aymericdelab closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jul 5, 2024 10:27am |
โฑ๏ธ Estimated effort to review: 2 ๐ต๐ตโชโชโช |
๐งช No relevant tests |
๐ No security concerns identified |
โก Key issues to review None |
Category | Suggestion | Score |
Possible issue |
Verify and update dependent calculations due to significant resource amount changes___ **Given the significant reduction in resource amounts, ensure that this change is reflectedin any dependent calculations or functionalities to avoid under-provisioning or logic errors in the application.** [sdk/packages/eternum/src/constants/resources.ts [737]](https://github.com/BibliothecaDAO/eternum/pull/1082/files#diff-03877f9a7de964bc35d454531a120cf998aca1a8b8ebd1d0471d35393c38ac4aR737-R737) ```diff -{ resource: ResourcesIds.Wood, amount: 500 }, +{ resource: ResourcesIds.Wood, amount: 500 }, // Ensure related calculations are updated ``` Suggestion importance[1-10]: 8Why: This is a valid suggestion as the significant reduction in resource amounts could impact dependent calculations or functionalities, and ensuring these are updated is crucial to avoid potential issues. | 8 |
Enhancement |
Abstract resource costs management to enhance maintainability and scalability___ **To improve the maintainability and scalability of managing resource costs, considerabstracting these values into a separate configuration file or a database where they can be modified without requiring code changes.** [sdk/packages/eternum/src/constants/resources.ts [756]](https://github.com/BibliothecaDAO/eternum/pull/1082/files#diff-03877f9a7de964bc35d454531a120cf998aca1a8b8ebd1d0471d35393c38ac4aR756-R756) ```diff -{ resource: ResourcesIds.Adamantine, amount: 100 }, +// Suggested to manage these values externally ``` Suggestion importance[1-10]: 7Why: Abstracting resource costs into a separate configuration file or database is a good practice for maintainability and scalability, though it is not immediately critical. | 7 |
Best practice |
Use type definitions to enforce data structure and reduce bugs___ **For better code clarity and error prevention, consider using a type definition for theobjects in the HYPERSTRUCTURE_CONSTRUCTION_COSTS array. This will enforce the structure and types of the properties, reducing the risk of bugs.** [sdk/packages/eternum/src/constants/resources.ts [758]](https://github.com/BibliothecaDAO/eternum/pull/1082/files#diff-03877f9a7de964bc35d454531a120cf998aca1a8b8ebd1d0471d35393c38ac4aR758-R758) ```diff -{ resource: ResourcesIds.Dragonhide, amount: 50 }, +{ resource: ResourcesIds.Dragonhide, amount: 50 } // Ensure type definitions are used ``` Suggestion importance[1-10]: 6Why: Using type definitions is a best practice that can improve code clarity and reduce bugs, but the suggestion does not provide a concrete implementation, making it less impactful. | 6 |
PR Type
Enhancement
Description
Changes walkthrough ๐
resources.ts
Reduce resource amounts for hyperstructure creation and construction
sdk/packages/eternum/src/constants/resources.ts
and construction.
Copper, and others.