mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
wire debugger tooltip fix/electronic components now need floor OR wall to spawn
This commit is contained in:
@@ -9,9 +9,12 @@ import net.torvald.terrarum.gameactors.BlockMarkerActor
|
||||
import net.torvald.terrarum.gameitems.GameItem
|
||||
import net.torvald.terrarum.gameitems.ItemID
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIItemInventoryCellCommonRes
|
||||
|
||||
class WireGraphDebugger(originalID: ItemID) : GameItem(originalID) {
|
||||
|
||||
@Transient private val tooltipHash = System.nanoTime()
|
||||
|
||||
override var baseToolSize: Double? = PickaxeCore.BASE_MASS_AND_SIZE
|
||||
override var inventoryCategory = Category.TOOL
|
||||
override val canBeDynamic = false
|
||||
@@ -62,9 +65,11 @@ class WireGraphDebugger(originalID: ItemID) : GameItem(originalID) {
|
||||
}
|
||||
|
||||
if (sb.isNotEmpty()) {
|
||||
UIItemInventoryCellCommonRes.tooltipShowing[tooltipHash] = true
|
||||
(Terrarum.ingame!! as TerrarumIngame).setTooltipMessage(sb.toString())
|
||||
}
|
||||
else {
|
||||
UIItemInventoryCellCommonRes.tooltipShowing[tooltipHash] = false
|
||||
(Terrarum.ingame!! as TerrarumIngame).setTooltipMessage(null)
|
||||
}
|
||||
}
|
||||
@@ -73,5 +78,6 @@ class WireGraphDebugger(originalID: ItemID) : GameItem(originalID) {
|
||||
(Terrarum.ingame!! as TerrarumIngame).selectedWireRenderClass = ""
|
||||
(Terrarum.ingame!! as TerrarumIngame).setTooltipMessage(null)
|
||||
blockMarker.isVisible = false
|
||||
UIItemInventoryCellCommonRes.tooltipShowing.remove(tooltipHash)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user