Closed bob0005 closed 1 week 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 | Nov 12, 2024 2:28pm |
The pull request introduces significant changes to the TileManager
class, including a new method for determining produced resource types and modifications to the optimistic building process. A new React hook, useBuildings
, is added to facilitate the retrieval of building data, while the Buildings
component is refactored to utilize this hook. Additionally, unused components are removed from the useStructures
file, streamlining the codebase. The overall structure and functionality of the components are preserved while enhancing clarity and organization.
File | Change Summary |
---|---|
client/src/dojo/modelManager/TileManager.ts |
Restructured _optimisticBuilding , added _getProducedResourceType method, updated resource type handling. |
client/src/hooks/helpers/use-buildings.tsx |
Introduced useBuildings hook and Building interface, added getBuildings function for data retrieval. |
client/src/hooks/helpers/useStructures.tsx |
Removed unused components from destructuring in various functions, simplifying dependencies. |
client/src/ui/modules/entity-details/realm/Buildings.tsx |
Refactored Buildings component to use useBuildings , updated state management and rendering logic. |
Objective | Addressed | Explanation |
---|---|---|
Archery range on my Realm not appearing in this panel (#2068) | ✅ |
placeBuilding
method in the TileManager
, relevant to building type handling.TileManager
.In the realm where buildings rise,
With arrows pointing to the skies,
New hooks and types, a clearer view,
Optimistic dreams, now shining through.
With every change, our world expands,
A vibrant place, crafted by our hands! 🐇✨
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?
Failed to generate code suggestions for PR
Fixes #2068
Summary by CodeRabbit
Release Notes
New Features
useBuildings
, for dynamic retrieval of building data.Buildings
component to categorize and display buildings (economy, resource, military) with improved state management.Improvements
TileManager
for better clarity and maintainability.useStructures
by removing unused components.Bug Fixes
BuildingRow
for consistency with the new data structure.