Skip to content

Commit

Permalink
Fix : Missing Farmer Residance (#327)
Browse files Browse the repository at this point in the history
Add Zero Farm Fields Checker, to remove (0) Farm FIles in tree

Co-authored-by: Sting Mcray <[email protected]>
  • Loading branch information
StingMcRay and StingMcRay authored May 31, 2021
1 parent 01850aa commit 5320594
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion PresetParser/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class Program
/// </summary>
public static IList<FarmField> farmFieldList1800 = new List<FarmField>();
// Removed IncludeBuildingsTemplate "CultureModule" (to must to handle and thus are replaced with the Zoo Module and Museum Module
private static readonly List<string> IncludeBuildingsTemplateNames1800 = new List<string> { "ResidenceBuilding7", "FarmBuilding", "FreeAreaBuilding", "FactoryBuilding7", "HeavyFactoryBuilding",
private static readonly List<string> IncludeBuildingsTemplateNames1800 = new List<string> { "ResidenceBuilding", "ResidenceBuilding7", "FarmBuilding", "FreeAreaBuilding", "FactoryBuilding7", "HeavyFactoryBuilding",
"SlotFactoryBuilding7", "Farmfield", "OilPumpBuilding", "PublicServiceBuilding", "CityInstitutionBuilding", "CultureBuilding", "Market", "Warehouse", "PowerplantBuilding",
"HarborOffice", "HarborWarehouse7", "HarborDepot","Shipyard","HarborBuildingAttacker", "RepairCrane", "HarborLandingStage7", "VisitorPier", "WorkforceConnector", "Guildhouse", "OrnamentalBuilding",
"CultureModule","Palace","BuffFactory", "BuildPermitBuilding", "BuildPermitModules", "OrnamentalModule", "IrrigationPropagationSource", "ResearchCenter", "Dockland", "HarborOrnament",
Expand Down Expand Up @@ -1802,6 +1802,12 @@ private static void ParseBuilding1800(List<IBuildingInfo> buildings, XmlNode bui
{
isFieldInfoFound = true;
fieldAmountValue = curFieldInfo.FieldAmount;
if (Convert.ToInt32(fieldAmountValue) <= 0)
{
// ERROR ? Farm without field amount found
Console.WriteLine("-- > Farm field Skipped, Zero Field counter");
return;
}
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Presets/presets.json

Large diffs are not rendered by default.

0 comments on commit 5320594

Please sign in to comment.