mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 16:24:45 +02:00
Fix item usage when 0 remaining
This commit is contained in:
parent
ca410ee53b
commit
75378268c0
@ -253,7 +253,15 @@ Public MustInherit Class Item
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public Function RemoveItem() As String
|
Public Function RemoveItem() As String
|
||||||
Core.Player.Inventory.RemoveItem(Me.ID, 1)
|
Core.Player.Inventory.RemoveItem(Me.ID, 1)
|
||||||
If Core.Player.Inventory.GetItemAmount(Me.ID) = 0 Then
|
Dim s As Screen = Core.CurrentScreen
|
||||||
|
While Not s.PreScreen Is Nothing And s.Identification <> Screen.Identifications.InventoryScreen
|
||||||
|
s = s.PreScreen
|
||||||
|
End While
|
||||||
|
|
||||||
|
If s.Identification = Screen.Identifications.InventoryScreen Then
|
||||||
|
CType(s, NewInventoryScreen).LoadItems()
|
||||||
|
End If
|
||||||
|
If Core.Player.Inventory.GetItemAmount(Me.ID) <= 0 Then
|
||||||
Return "*There are no~" & Me.PluralName & " left."
|
Return "*There are no~" & Me.PluralName & " left."
|
||||||
End If
|
End If
|
||||||
Return ""
|
Return ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user