Added missing Symbol to the game, Improved move and explore logic, added map refresh for tiles.
This commit is contained in:
@@ -34,8 +34,26 @@ public class ItemData
|
||||
return char.ToUpper(noUnderscore[0]) + noUnderscore.Substring(1);
|
||||
}
|
||||
|
||||
public static string GetReadableName(string input)
|
||||
{
|
||||
string noUnderscore = input.Replace("_", " ").ToLower();
|
||||
return char.ToUpper(noUnderscore[0]) + noUnderscore.Substring(1);
|
||||
}
|
||||
|
||||
public static string GetIndex(string readable)
|
||||
{
|
||||
return readable.ToLower().Replace(" ", "_");
|
||||
}
|
||||
|
||||
public string GetCraftingDisplay()
|
||||
{
|
||||
string result = "";
|
||||
result += GetReadableName() + ": \r";
|
||||
foreach (Ingredient ingredient in Inputs)
|
||||
{
|
||||
result += $"{GetReadableName(ingredient.Item)} ({ingredient.Amount}),\r";
|
||||
}
|
||||
result = result.Remove(result.Length - 2);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user