Issue#54 the names in static tiles now ignore anything between square brackets
parent
34cb47bdaa
commit
a9160b4ff6
|
@ -45,7 +45,7 @@ namespace stardew_access.Features
|
|||
|
||||
foreach (var location in data)
|
||||
{
|
||||
if (!Game1.currentLocation.Name.ToLower().Equals(location.Key.ToLower()))
|
||||
if (!Game1.currentLocation.name.Value.ToLower().Equals(location.Key.ToLower()))
|
||||
continue;
|
||||
|
||||
if (location.Value != null)
|
||||
|
@ -83,7 +83,21 @@ namespace stardew_access.Features
|
|||
}
|
||||
|
||||
if (isXPresent && isYPresent)
|
||||
return (tile.Key, CATEGORY.FromString(tileType.ToString().ToLower()));
|
||||
{
|
||||
string key = tile.Key;
|
||||
if (key.Contains('[') && key.Contains(']'))
|
||||
{
|
||||
int i1 = key.IndexOf('[');
|
||||
int i2 = key.LastIndexOf(']');
|
||||
|
||||
if (i1 < i2)
|
||||
{
|
||||
key = key.Remove(i1, ++i2 - i1);
|
||||
}
|
||||
}
|
||||
|
||||
return (key.Trim(), CATEGORY.FromString(tileType.ToString().ToLower()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue