From 4f1ed3919b0ee3f89dbcbacf49990888a7d9274a Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Thu, 03 Apr 2025 21:02:03 +0000
Subject: [PATCH] #42 still bugged
---
Assets/Scripts/Inventory/ItemUIScript.cs | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/Assets/Scripts/Inventory/ItemUIScript.cs b/Assets/Scripts/Inventory/ItemUIScript.cs
index 3900ff7..a4ad058 100644
--- a/Assets/Scripts/Inventory/ItemUIScript.cs
+++ b/Assets/Scripts/Inventory/ItemUIScript.cs
@@ -1,4 +1,5 @@
using Assets.Scripts.Helpers;
+using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
@@ -33,7 +34,19 @@
UIHelper.UpdateItemMaxCountText(gameObject.transform.Find("ItemQuantity").GetComponent<TextMeshProUGUI>(), inventorySlot.quantity, inventorySlot.item.maxStackSize);
break;
case ItemUIType.ItemDescription:
- gameObject.transform.Find("ItemTextDescription").GetComponent<TextMeshProUGUI>().text = inventorySlot.item.itemDescription;
+ string description = $"<b>Description</b>\n{inventorySlot.item.itemDescription}\n";
+
+ GenerateableDatabase.Instance.TryGetGenerateables(inventorySlot.item.itemId, out var variants);
+ if (variants != null)
+ {
+ description += $"\n<b>Generation</b>";
+ foreach (var variant in variants)
+ {
+ description += $"\nLocation\tY: {variant.maxHeight} to {variant.minHeight}";
+ description += $"\n\tAmount: {variant.dropRange.ToRangeString()}";
+ }
+ }
+ gameObject.transform.Find("ItemTextDescription").GetComponent<TextMeshProUGUI>().text = description;
break;
}
}
--
Gitblit v1.10.0