This PR adds the implementation for dynamically determining the type of tile (HouseTile, StaticTile, DynamicTile) when creating a new tile object. The motivation is to correctly identify and assign specific tile types, which enhances code readability and maintainability. The change also ensures that houses have associated HouseTile objects for better data integrity. No additional dependencies are required for this change.
Tiles are being created without properly distinguishing between house, static, and dynamic types.
Expected
House tiles should be identified and instantiated as HouseTile objects, and other tiles should be correctly instantiated as StaticTile or DynamicTile based on the cached tile data.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested
The changes have been tested by:
[x] Running scenarios where house, static, and dynamic tiles are created to ensure proper instantiation.
[x] Verifying the correct behavior in the game client when interacting with house tiles.
Checklist
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I checked the PR checks reports
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
Description
This PR adds the implementation for dynamically determining the type of tile (HouseTile, StaticTile, DynamicTile) when creating a new tile object. The motivation is to correctly identify and assign specific tile types, which enhances code readability and maintainability. The change also ensures that houses have associated HouseTile objects for better data integrity. No additional dependencies are required for this change.
Fixes this crash: crash house.txt
Behaviour
Actual
Tiles are being created without properly distinguishing between house, static, and dynamic types.
Expected
House tiles should be identified and instantiated as HouseTile objects, and other tiles should be correctly instantiated as StaticTile or DynamicTile based on the cached tile data.
Type of change
How Has This Been Tested
The changes have been tested by:
Checklist