From ba6217fb7f8eca208a7ef4f2daba63e891065ca6 Mon Sep 17 00:00:00 2001 From: Rampastring Date: Thu, 24 Oct 2024 18:08:16 +0300 Subject: [PATCH] Write HouseType indexes starting from 0 also in RA2YR mode --- src/TSMapEditor/Initialization/MapWriter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TSMapEditor/Initialization/MapWriter.cs b/src/TSMapEditor/Initialization/MapWriter.cs index b4150968..314f4843 100644 --- a/src/TSMapEditor/Initialization/MapWriter.cs +++ b/src/TSMapEditor/Initialization/MapWriter.cs @@ -389,7 +389,7 @@ public static void WriteHouseTypes(IMap map, IniFile mapIni) { HouseType houseType = houseTypes[i]; houseTypesSection.SetStringValue( - houseType.Index > -1 ? houseType.Index.ToString(CultureInfo.InvariantCulture) : i.ToString(CultureInfo.InvariantCulture), + i.ToString(CultureInfo.InvariantCulture), houseType.ININame); mapIni.RemoveSection(houseType.ININame); @@ -428,7 +428,7 @@ public static void WriteHouses(IMap map, IniFile mapIni) for (int i = 0; i < map.Houses.Count; i++) { House house = map.Houses[i]; - housesSection.SetStringValue(house.ID > -1 ? house.ID.ToString() : i.ToString(), house.ININame); + housesSection.SetStringValue(house.ID > -1 ? house.ID.ToString(CultureInfo.InvariantCulture) : i.ToString(CultureInfo.InvariantCulture), house.ININame); // When countries are not in use, the section is already removed by WriteHouseTypes if (Constants.IsRA2YR)