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

Update Presets to v5.0 #432

Merged
merged 8 commits into from
Jul 18, 2022
Merged

Update Presets to v5.0 #432

merged 8 commits into from
Jul 18, 2022

Conversation

StingMcRay
Copy link
Contributor

Program Only:

  • Removed Excluded Templates to be showed in the Preset Tree (AD need to be update before users notice this)
  • Made GUID into Presets file only (not used by Users, Canvas or Preset Tree).
  • Made GUID replace CSV File for DuxVitae's Tool. (file will not be included to the sources)
  • Added extra Icons for Duxvitae Tool.
  • Solved Performance issues (Translation on Anno 2205 and Anno 1800).
  • Made a text file for Missing IconFIleNames, to easier check the missing or not given ones.
  • made some coloring output lines, to distinguish the difference between normal text, errors and no error (only for Anno 1800 outputs).
  • Fixed assets Translations Override Tag (GUID) for missing Translations (Anno 1800).

Known Issues:
Some icons of Anno 2205 are missing (#408)
Scenario 2 Buildings can be missing, still working on a solution. Its a twisted linked Assets file
All Fields for Region's Mining Slot Buildings are missing (Anno 2205, No Buildblocker information in files, would not be fixed)

Thanks to DuxVitae for cooperation missing buildings/Guid's and for pointing/learn me to pinpoint chocks
Thanks to Banan for translating the new Menu's to Polish (Deepl was bugging)

* Add GU13 to GU14.3 Buildings (Anno 1800).
* Renewed all and Added icons for Anno 1800.
* Removed, Renewed and Added Icons for Anno 2205
* Added missing icons for Anno 1404 and Anno 2070
* Fixed Issue #389 (Missing Warehouses)
* Fixed issue #390 (wrongly icon salt works africa (Anno 1800).
* Fixed issue #390 (Blocked Area for Lobster Fishery)
* Fixed "Palace Wing - Gate" wrong measurements (Anno 1800).
* Added Missing Buildings for Anno 1404 and 2070
* Fixed Missing Translations (DLC's) for Anno 1404 and 2070
* Fixed translation Residence Building Names (Anno 2205)
* Updated / Redone color.json to version 1.0.3.0
* Updated treeLocalization.json (1.0.0.7)

Program Only:
* Removed Excluded Templates to be showed in the Preset Tree (AD need to be update before users notice this)
* Made GUID into Presets file only (not used by Users, Canvas or Preset Tree).
* Made GUID replace CSV File for DuxVitae's Tool.
* Added extra Icons for Duxvitae Tool.
* Solved Performance issues (Translation on Anno 2205 and Anno 1800).
* Made a text file for Missing IconFIleNames, to easier check the missing or not given ones.
* made some coloring output lines, to distinguish the difference between normal text, errors  and no error (only for Anno 1800 outputs).
* Fixed assets Translations Override Tag (GUID) for missing Translations (Anno 1800).

Known Issues:
Some icons of Anno 2205 are missing (#408)
Scenario 2 Buildings can be missing, still working on a solution. Its a twisted linked Assets file
All Fields for Region's Mining Slot Buildings are missing (Anno 2205, No Buildblocker information in files, would not be fixed)
@StingMcRay StingMcRay requested a review from FroggieFrog July 4, 2022 20:02
Request for whitesmoke colored Plaza Pavings
@FroggieFrog
Copy link
Collaborator

You are deleting/removing a lot of icons with this PR.
As to my knowledge this would "break" exisiting layouts. By break I mean the icons will be missing in the designer.

Are those icons replaced with other ones (new names)?
Maybe this requires some kind of mapping information for the designer like "This old icon is now this new icon. Try to load the new one."
Just so a user does not need to redo the layout.

try
{
XmlNode node = ifoDocument.FirstChild[BUILDBLOCKER]?.FirstChild;
XmlNode node = ifoDocument.FirstChild[BUILDBLOCKER]?.FirstChild;
building.BuildBlocker = new SerializableDictionary<int>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a need for an empty SerializableDictionary when the result is false?
Before this change the result could be false and the building.BuildBlocker was null. There is a failing test because of this change.
I don't know if the test has to change or if the new logic is wrong.

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 return should still be false (see lines 223 to 235), if the node is still null he returns false if it is not repairing the anno 2205 module x/z values, however i had to move it up to set the anno 2205 repair lines for that Module where and that i not could place else where as the Node would be null (no build blockers information in the ifo files) but i had to set this values and repair that module.

@StingMcRay
Copy link
Contributor Author

You are deleting/removing a lot of icons with this PR. As to my knowledge this would "break" exisiting layouts. By break I mean the icons will be missing in the designer.

Are those icons replaced with other ones (new names)? Maybe this requires some kind of mapping information for the designer like "This old icon is now this new icon. Try to load the new one." Just so a user does not need to redo the layout.

No, there would no problems with existing layouts, as i only removed not used ones and double ones (anno 2205) that had the same name, only with caps what was NOT in the presets.
For anno 1800, i had to remove the icons, as something went wrong on my PC, no icons are changed names or are missing, i check all buildings.. i have to check all ornamental, but as i have a backup directory for all icons (separated for all anno's) in case something like this happens

Copy link
Contributor Author

@StingMcRay StingMcRay left a comment

Choose a reason for hiding this comment

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

seams oke for me
I will take better looks on the tests next time, sorry i missed that

// This checker is made so it is a 100% sure same Identifiers in name and length of the string.
// i discovered that .Contains .startWith and .IsPartOff was not good enough to check this.
// (11-06-2022)
public static bool IsMatch(this string IdentifierToCheck, List<IBuildingInfo> buildingsToCheck)
Copy link
Collaborator

@FroggieFrog FroggieFrog Jul 15, 2022

Choose a reason for hiding this comment

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

Those 2 new methods (IsMatch and IsMatchString) are only used inside of PresetParser.
Is there a possible future use inside of AnnoDesigner?
If not, I would move them to PresetParser and adjust some of the naming to comply with the existing conventions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, i put it there to keep it nice in the programing stuff, so all those commands are in a single file...
But if you want me to make a hole new file for only those 2 then let me know...

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