Skip to content

Conversation

@stavrosfa
Copy link
Contributor

Configure a FileDataIniParser to allow and override duplicate keys in .ini files, for cases like the Tank.ini that has a duplicate key DEAD in its sound effects.

Closes #856

I also commented out part of Civ3UnitSprite class that used a FileDataIniParser as the class itself seems to no longer be in use. Potentially we can completely remove it.

… ini files, for cases like the Tank.ini where it has a duplicate key DEAD in its sound effects
if (fileIniDataParser != null) return fileIniDataParser;

FileIniDataParser parser = new FileIniDataParser();
parser.Parser.Configuration.AllowDuplicateKeys = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you leave a comment explaining why we would set these?

public Civ3UnitSprite(Civ3UnitSprite civ3UnitSprite) {
}

/*
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd just delete any of this that isn't used. We can always bring it back from version control if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The whole file is unused, should I just delete it as a whole?

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.

INI duplicate entry issue

2 participants