From d4552adc9ec0998725e663c47114e6836061ad2c Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Wed, 02 Apr 2025 14:52:46 +0000
Subject: [PATCH] #35 reworked ore generation

---
 Assets/Scripts/Inventory/ItemUIScript.cs |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/Assets/Scripts/Inventory/ItemUIScript.cs b/Assets/Scripts/Inventory/ItemUIScript.cs
index 3900ff7..4f9f49b 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,21 @@
                     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)
+                        {
+                            if (variant.maxHeight > 0 || variant.minHeight > 0)
+                            {
+                                description += $"\nSpawns between Y: {variant.minHeight} - {variant.maxHeight}. Amount: {variant.dropRange}";
+                            }
+                        }
+                    }
+                    gameObject.transform.Find("ItemTextDescription").GetComponent<TextMeshProUGUI>().text = description;
                     break;
             }
         }

--
Gitblit v1.9.3