From 7f3445b7271a33a16190036873ad8618bcf5bc17 Mon Sep 17 00:00:00 2001 From: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Date: Fri, 20 Aug 2021 15:10:39 +0200 Subject: [PATCH] Added a text message when selecting an item in battle that can't be used The message says: This item can't be used in Battle. --- P3D/Screens/Inventory/NewInventoryScreen.vb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/P3D/Screens/Inventory/NewInventoryScreen.vb b/P3D/Screens/Inventory/NewInventoryScreen.vb index 9933b96b0..31d65e3d5 100644 --- a/P3D/Screens/Inventory/NewInventoryScreen.vb +++ b/P3D/Screens/Inventory/NewInventoryScreen.vb @@ -815,11 +815,16 @@ Public Class NewInventoryScreen End If If Controls.Accept() AndAlso _items.Length > 0 Then - _infoItemOptionSelection = 0 - _isInfoShowing = True + Dim cItem As Item = Item.GetItemByID(_items(ItemIndex + PageIndex * 10).ItemID) SoundManager.PlaySound("select") - SetInfoSettings() - SetItemOptions() + If cItem.CanBeUsedInBattle = True Then + _infoItemOptionSelection = 0 + _isInfoShowing = True + SetInfoSettings() + SetItemOptions() + Else + TextBox.Show("This item can't~be used in Battle.") + End If End If If Controls.Dismiss() Then