Skip to content

Commit

Permalink
Fix for prosody showing up in in-game hints
Browse files Browse the repository at this point in the history
  • Loading branch information
MattEqualsCoder committed Jan 3, 2023
1 parent 569a6f4 commit a34ac58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 3 additions & 7 deletions src/Randomizer.SMZ3/FileData/Patcher.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using Randomizer.Data.WorldData.Regions;
using Randomizer.Data.WorldData.Regions.Zelda;
Expand All @@ -30,10 +27,9 @@ public class Patcher
private readonly RomPatchFactory _romPatchFactory;
private readonly GameLinesConfig _gameLines;
private readonly IMetadataService _metadataService;
private StringTable _stringTable = new();
private List<(int offset, byte[] bytes)> _patches = new();
private Queue<byte>? _shuffledSoundtrack;
private bool _enableMultiworld;
private readonly StringTable _stringTable = new();
private readonly List<(int offset, byte[] bytes)> _patches = new();
private readonly bool _enableMultiworld;

public Patcher(World myWorld, List<World> allWorlds, string seedGuid, int seed, Random rnd, IMetadataService metadataService, GameLinesConfig gameLines)
{
Expand Down
4 changes: 3 additions & 1 deletion src/Randomizer.SMZ3/Generation/GameHintService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ private string GetLocationName(World hintPlayerWorld, Location location)

private string GetItemName(World hintPlayerWorld, Item item)
{
var itemName = _metadataService.Item(item.Type)?.NameWithArticle ?? item.Name;
var itemName = _metadataService.Item(item.Type)?.NameWithArticle;
if (itemName == null || itemName.Contains('<'))
itemName = item.Name;
return $"{itemName}{GetMultiworldSuffix(hintPlayerWorld, item)}";
}

Expand Down

0 comments on commit a34ac58

Please sign in to comment.