-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: wrong initial position of hexception #1188
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this pull request improve the handling of positions and scene transitions in the game. The use of the LocationManager and Position class makes the code more consistent and easier to maintain. The separation of map and hex location URL generation is a good practice. Overall, these changes should lead to more reliable position handling and smoother scene transitions.
Thanks for using MentatBot. Give comments a 👍 or 👎 to help me improve!
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
linter |
PR Type
Bug fix, Enhancement
Description
SceneManager
to handle undefined initial scene and removedhexCoords
parameter fromswitchScene
method.setup
methods inHexagonScene
and its subclasses to removehexCoords
parameter and useLocationManager
for coordinates.WorldmapScene
and various UI components by using new methods in thePosition
class.LocationManager
methods.Changes walkthrough 📝
1 files
GameRenderer.ts
Minor formatting improvement in `handleURLChange` method
client/src/three/GameRenderer.ts
handleURLChange
method.9 files
SceneManager.ts
Refactor SceneManager to handle undefined initial scene
client/src/three/SceneManager.ts
currentScene
initialization toundefined
.hexCoords
parameter fromswitchScene
method.LocationManager.ts
Ensure non-nullable return values in LocationManager methods
client/src/three/helpers/LocationManager.ts
getCol
andgetRow
methods to non-nullable.HexagonScene.ts
Simplify setup method in HexagonScene
client/src/three/scenes/HexagonScene.ts
hexCoords
parameter fromsetup
method.Hexception.ts
Refactor Hexception setup to use LocationManager coordinates
client/src/three/scenes/Hexception.ts
setup
method to retrieve coordinates fromLocationManager
.Worldmap.ts
Improve URL handling and biome retrieval in WorldmapScene
client/src/three/scenes/Worldmap.ts
onHexagonDoubleClick
to change URL and dispatch event.Position
class.Position.ts
Add method for hex location URLs in Position class
client/src/types/Position.ts
toHexLocationUrl
method for generating hex location URLs.ArmyManagementCard.tsx
Use toMapLocationUrl for URL generation in ArmyManagementCard
client/src/ui/components/military/ArmyManagementCard.tsx
toMapLocationUrl
method.TopMiddleNavigation.tsx
Use Position class methods for URL generation in TopMiddleNavigation
client/src/ui/modules/navigation/TopMiddleNavigation.tsx
toHexLocationUrl
andtoMapLocationUrl
methods.
Steps.tsx
Use toHexLocationUrl for URL generation in onboarding steps
client/src/ui/modules/onboarding/Steps.tsx
toHexLocationUrl
method.