Skip to content
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

Code cleanup to address godot4 PR comments #484

Open
wants to merge 1 commit into
base: Development
Choose a base branch
from

Conversation

WildWeazel
Copy link
Member

Resolved some of the open comment threads by pruning dead or commented out code and renaming things. Civ3Map.LoadTileSet did not seem to serve any purpose anymore, as it did not return or modify anything outside of the method. I did not address the question of what purpose MovingSprite serves in Civ3Unit or what its values mean.

@WildWeazel WildWeazel requested a review from pcen December 30, 2024 22:28
@@ -48,51 +48,9 @@ public void TerrainAsTileMap() {
{
foreach (Tile tile in Civ3Tiles)
{
// If tile media file not loaded yet
if (TileIDLookup[tile.ExtraInfo.BaseTerrainFileID, 1] == 0) { LoadTileSet(tile.ExtraInfo.BaseTerrainFileID); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the remaining references to TileIDLookup also be removed? The lines that are now lines 51-52, just below this removed block, look odd now, setting the Map int[] to 0, and then looking it up via TileIDLookup which will now always be zero.

Granted I don't entirely remember the purpose of this section. It looks like it was added back in March of '21, to implement a legacy map base terrain viewer. But I suspect those lines can additionally be removed. The changes are working for me in-game (and the much-decreased amount of magic numbers is nice).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants