mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-10 13:51:53 +09:00
tooltip and smelter ui fixes
This commit is contained in:
@@ -44,21 +44,25 @@ class UISmelterBasic(val smelter: FixtureSmelterBasic) : UICanvas(
|
||||
// oreslot
|
||||
if (amount != null && gameItem != null) {
|
||||
if (clickedOn == 1) {
|
||||
getPlayerInventory().remove(gameItem.dynamicID, amount)
|
||||
|
||||
if (smelter.oreItem == null)
|
||||
if (smelter.oreItem == null) {
|
||||
getPlayerInventory().remove(gameItem.dynamicID, amount)
|
||||
smelter.oreItem = InventoryPair(gameItem.dynamicID, amount)
|
||||
else
|
||||
}
|
||||
else if (smelter.oreItem!!.itm == gameItem.dynamicID) {
|
||||
getPlayerInventory().remove(gameItem.dynamicID, amount)
|
||||
smelter.oreItem!!.qty += amount
|
||||
}
|
||||
}
|
||||
// firebox
|
||||
else if (clickedOn == 2) {
|
||||
getPlayerInventory().remove(gameItem.dynamicID, amount)
|
||||
|
||||
if (smelter.fireboxItem == null)
|
||||
if (smelter.fireboxItem == null) {
|
||||
getPlayerInventory().remove(gameItem.dynamicID, amount)
|
||||
smelter.fireboxItem = InventoryPair(gameItem.dynamicID, amount)
|
||||
else
|
||||
}
|
||||
else if (smelter.fireboxItem!!.itm == gameItem.dynamicID) {
|
||||
getPlayerInventory().remove(gameItem.dynamicID, amount)
|
||||
smelter.fireboxItem!!.qty += amount
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -145,10 +145,6 @@ class UIItemInventoryElemSimple(
|
||||
tooltipShowing[hash] = true
|
||||
// printdbg(this, tooltipShowing.entries)
|
||||
}
|
||||
else if (item == null || !mouseUp) {
|
||||
tooltipShowing[hash] = false
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -160,6 +156,10 @@ class UIItemInventoryElemSimple(
|
||||
|
||||
}
|
||||
|
||||
if (item == null || !mouseUp) {
|
||||
tooltipShowing[hash] = false
|
||||
}
|
||||
|
||||
// see IFs above?
|
||||
batch.color = Color.WHITE
|
||||
|
||||
|
||||
@@ -177,9 +177,10 @@ class UIItemInventoryElemWide(
|
||||
tooltipShowing[hash] = true
|
||||
// printdbg(this, tooltipShowing.entries)
|
||||
}
|
||||
else if (item == null || !mouseUp) {
|
||||
tooltipShowing[hash] = false
|
||||
}
|
||||
}
|
||||
|
||||
if (item == null || !mouseUp) {
|
||||
tooltipShowing[hash] = false
|
||||
}
|
||||
|
||||
// see IFs above?
|
||||
|
||||
Reference in New Issue
Block a user