Skip to content

Commit

Permalink
Don't trust it to maintain the unicode characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Fenyx4 committed Jul 31, 2021
1 parent 7908a60 commit b2f95cb
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions U4DosRandomizer/WorldMapGenerateMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,13 @@ public override void Load(string path, int mapSeed, int mapGeneratorSeed, int ot

private void ApplyRegions(UltimaData ultimaData, Random random)
{
var runicMap = new Dictionary<string, char>()
{
{ "TH", '\u00C4' }, //Ä
{ "EE", '\u00C1' }, //Á
{ "EA", '\u00C0' } //À
};

Regions = new List<Region>();

var forests = FindBodies(tile => tile.GetTile() == TileInfo.Forest).OrderByDescending(b => b.Count());
Expand All @@ -501,7 +508,7 @@ private void ApplyRegions(UltimaData ultimaData, Random random)
Regions.Add(new Region
{
Name = "The Deep Forest",
RunicName = "Äe DÁp Forest",
RunicName = $"{runicMap["TH"]}e D{runicMap["EE"]}p Forest",
Tiles = forestEnumerator.Current,
Center = GetCenterOfRegion(forestEnumerator.Current)
});
Expand Down Expand Up @@ -564,7 +571,7 @@ private void ApplyRegions(UltimaData ultimaData, Random random)
Regions.Add(new Region
{
Name = "Isle of Deeds",
RunicName = "Isle of DÁds",
RunicName = $"Isle of D{runicMap["EE"]}ds",
Tiles = islandEnumerator.Current,
Center = GetCenterOfRegion(islandEnumerator.Current)
});
Expand All @@ -588,7 +595,7 @@ private void ApplyRegions(UltimaData ultimaData, Random random)
Regions.Add(new Region
{
Name = "The High Stepes",
RunicName = "Äe High Stepes",
RunicName = $"{runicMap["TH"]}e High Stepes",
Tiles = plainsEnumerator.Current,
Center = GetCenterOfRegion(plainsEnumerator.Current)
});
Expand All @@ -611,7 +618,7 @@ private void ApplyRegions(UltimaData ultimaData, Random random)
Regions.Add(new Region
{
Name = "Fens of the Dead",
RunicName = "Fens of the DÀd",
RunicName = $"Fens of the D{runicMap["EA"]}d",
Tiles = swampsEnumerator.Current,
Center = GetCenterOfRegion(swampsEnumerator.Current)
});
Expand Down

0 comments on commit b2f95cb

Please sign in to comment.