Don't display "slot charging" help if player has no exopack
This commit is contained in:
parent
dc50a79b20
commit
15f53ea124
@ -16,6 +16,7 @@ import net.minecraftforge.client.event.ContainerScreenEvent.Render.Background
|
|||||||
import net.minecraftforge.client.event.ContainerScreenEvent.Render.Foreground
|
import net.minecraftforge.client.event.ContainerScreenEvent.Render.Foreground
|
||||||
import net.minecraftforge.common.MinecraftForge
|
import net.minecraftforge.common.MinecraftForge
|
||||||
import org.lwjgl.opengl.GL11
|
import org.lwjgl.opengl.GL11
|
||||||
|
import ru.dbotthepony.mc.otm.capability.matteryPlayer
|
||||||
import ru.dbotthepony.mc.otm.client.moveMousePosScaled
|
import ru.dbotthepony.mc.otm.client.moveMousePosScaled
|
||||||
import ru.dbotthepony.mc.otm.client.render.translation
|
import ru.dbotthepony.mc.otm.client.render.translation
|
||||||
import ru.dbotthepony.mc.otm.client.screen.panels.*
|
import ru.dbotthepony.mc.otm.client.screen.panels.*
|
||||||
@ -152,7 +153,10 @@ abstract class MatteryScreen<T : MatteryMenu>(menu: T, inventory: Inventory, tit
|
|||||||
if (menu.playerInventorySlots.isNotEmpty() && menu.autoCreateInventoryFrame) {
|
if (menu.playerInventorySlots.isNotEmpty() && menu.autoCreateInventoryFrame) {
|
||||||
if (menu.playerExoSuitSlots.isEmpty()) {
|
if (menu.playerExoSuitSlots.isEmpty()) {
|
||||||
inventoryFrame = FramePanel<MatteryScreen<*>>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH, INVENTORY_FRAME_HEIGHT, inventory.displayName).also(this::addPanel)
|
inventoryFrame = FramePanel<MatteryScreen<*>>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH, INVENTORY_FRAME_HEIGHT, inventory.displayName).also(this::addPanel)
|
||||||
inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().tooltips.add(TranslatableComponent("otm.gui.help.slot_charging"))
|
inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().also {
|
||||||
|
if (menu.ply.matteryPlayer?.hasExoPack == true)
|
||||||
|
it.tooltips.add(TranslatableComponent("otm.gui.help.slot_charging"))
|
||||||
|
}
|
||||||
|
|
||||||
val hotbarStrip = EditablePanel(this, inventoryFrame, height = AbstractSlotPanel.SIZE)
|
val hotbarStrip = EditablePanel(this, inventoryFrame, height = AbstractSlotPanel.SIZE)
|
||||||
hotbarStrip.dock = Dock.BOTTOM
|
hotbarStrip.dock = Dock.BOTTOM
|
||||||
@ -176,7 +180,10 @@ abstract class MatteryScreen<T : MatteryMenu>(menu: T, inventory: Inventory, tit
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
inventoryFrame = FramePanel<MatteryScreen<*>>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH_EXTENDED, BASE_INVENTORY_FRAME_HEIGHT + AbstractSlotPanel.SIZE * inventoryRows, inventory.displayName).also(this::addPanel)
|
inventoryFrame = FramePanel<MatteryScreen<*>>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH_EXTENDED, BASE_INVENTORY_FRAME_HEIGHT + AbstractSlotPanel.SIZE * inventoryRows, inventory.displayName).also(this::addPanel)
|
||||||
inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().tooltips.add(TranslatableComponent("otm.gui.help.slot_charging"))
|
inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().also {
|
||||||
|
if (menu.ply.matteryPlayer?.hasExoPack == true)
|
||||||
|
it.tooltips.add(TranslatableComponent("otm.gui.help.slot_charging"))
|
||||||
|
}
|
||||||
|
|
||||||
inventoryScrollbar = DiscreteScrollBarPanel(this, inventoryFrame, { integerDivisionDown(menu.playerCombinedInventorySlots.size, 9) }, {
|
inventoryScrollbar = DiscreteScrollBarPanel(this, inventoryFrame, { integerDivisionDown(menu.playerCombinedInventorySlots.size, 9) }, {
|
||||||
_, old, new ->
|
_, old, new ->
|
||||||
|
Loading…
Reference in New Issue
Block a user