Assets/Scripts/Helpers/VectorHelper.cs | ●●●●● patch | view | raw | blame | history | |
Assets/Scripts/Inventory/ItemUIScript.cs | ●●●●● patch | view | raw | blame | history |
Assets/Scripts/Helpers/VectorHelper.cs
@@ -138,5 +138,14 @@ } return result; } public static string ToRangeString(this Vector2 vector) { if (vector.x == vector.y) { return $"{vector.x}"; } return $"{vector.x}-{vector.y}"; } } } Assets/Scripts/Inventory/ItemUIScript.cs
@@ -42,10 +42,8 @@ description += $"\n<b>Generation</b>"; foreach (var variant in variants) { if (variant.maxHeight > 0 || variant.minHeight > 0) { description += $"\nSpawns between Y: {variant.minHeight} - {variant.maxHeight}. Amount: {variant.dropRange}"; } description += $"\nLocation\tY: {variant.maxHeight} to {variant.minHeight}"; description += $"\n\tAmount: {variant.dropRange.ToRangeString()}"; } } gameObject.transform.Find("ItemTextDescription").GetComponent<TextMeshProUGUI>().text = description;