BibliothecaDAO / eternum

onchain eternal game
https://alpha-eternum.realms.world
MIT License
46 stars 34 forks source link

change hyperstructure completion amounts #1082

Closed aymericdelab closed 3 months ago

aymericdelab commented 3 months ago

PR Type

Enhancement


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
resources.ts
Reduce resource amounts for hyperstructure creation and construction

sdk/packages/eternum/src/constants/resources.ts
  • Reduced the amount of resources required for hyperstructure creation
    and construction.
  • Adjusted the amounts for various resources such as Wood, Stone, Coal,
    Copper, and others.
  • +23/-23 

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    vercel[bot] commented 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
    github-actions[bot] commented 3 months ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review: 2 ๐Ÿ”ต๐Ÿ”ตโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก Key issues to review

    None
    github-actions[bot] commented 3 months ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    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 reflected
    in 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]: 8 Why: 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, consider
    abstracting 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]: 7 Why: 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 the
    objects 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]: 6 Why: 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