diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt index 08a7414d8..99d467195 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt @@ -138,6 +138,7 @@ private fun misc(provider: MatteryLanguageProvider) { gui("exopack", "Exopack Inventory") gui("exopack.go_back", "Open vanilla inventory") gui("exopack.go_in", "Open Exopack inventory") + gui("exopack.go_curios", "Open Curios inventory") gui("exopack.toggle_visibility", "Toggle Exopack visibility") gui("exopack.probe1", "This little device feels unnatural to touch, it is almost certainly resilient to any possible attempt to break it open.") diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt index faecb219c..6b33fac1c 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt @@ -146,6 +146,7 @@ private fun misc(provider: MatteryLanguageProvider) { gui("exopack", "Инвентарь Экзопака") gui("exopack.go_back", "Открыть обычный инвентарь") gui("exopack.go_in", "Открыть инвентарь экзопака") + gui("exopack.go_curios", "Открыть инвентарь Curios") gui("exopack.toggle_visibility", "Переключить отображение Экзопака") gui("exopack.probe1", "Данное маленькое устройство необычно на ощупь, а так же неприступно для любых попыток вскрыть.") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets18.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets18.kt index 8a54ddce1..93e07d358 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets18.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets18.kt @@ -51,6 +51,7 @@ object Widgets18 { val CROSS = miscGrid.next() val FORWARD_SLASH = miscGrid.next() val RETURN_ARROW_LEFT = miscGrid.next() + val CURIOS_INVENTORY = miscGrid.next() private val slotBgGrid = WidgetLocation.SLOT_BACKGROUNDS.grid(4, 4) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt index 802182da8..9dc4547ee 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt @@ -23,6 +23,8 @@ import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.TallHorizontalProfiledPowerGaugePanel import ru.dbotthepony.mc.otm.client.setMousePos import ru.dbotthepony.mc.otm.client.shouldOpenVanillaInventory +import ru.dbotthepony.mc.otm.compat.curios.isCuriosLoaded +import ru.dbotthepony.mc.otm.compat.curios.openCuriosScreen import ru.dbotthepony.mc.otm.core.math.integerDivisionDown import ru.dbotthepony.mc.otm.menu.ExoPackInventoryMenu import ru.dbotthepony.mc.otm.network.ExoPackMenuOpen @@ -235,7 +237,7 @@ class ExoPackInventoryScreen(menu: ExoPackInventoryMenu) : MatteryScreen frame.y += movePixels moveMousePosScaled(y = movePixels) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/curios/CuriosCompat.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/curios/CuriosCompat.kt index e99c1f020..50802c1be 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/curios/CuriosCompat.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/curios/CuriosCompat.kt @@ -4,7 +4,10 @@ import com.google.common.collect.Streams import net.minecraft.world.entity.player.Player import net.minecraft.world.inventory.Slot import net.minecraft.world.item.ItemStack +import net.minecraftforge.api.distmarker.Dist import net.minecraftforge.fml.ModList +import net.minecraftforge.fml.loading.FMLEnvironment +import net.minecraftforge.network.PacketDistributor import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.container.awareStream @@ -16,6 +19,8 @@ import top.theillusivec4.curios.api.CuriosApi import top.theillusivec4.curios.api.event.SlotModifiersUpdatedEvent import top.theillusivec4.curios.common.inventory.CosmeticCurioSlot import top.theillusivec4.curios.common.inventory.CurioSlot +import top.theillusivec4.curios.common.network.NetworkHandler +import top.theillusivec4.curios.common.network.client.CPacketOpenCurios import java.util.stream.Stream import kotlin.collections.ArrayList @@ -28,6 +33,10 @@ fun onCuriosSlotModifiersUpdated(event: SlotModifiersUpdatedEvent) { event.entity.matteryPlayer?.recreateExoPackMenu() } +fun openCuriosScreen(carriedStack: ItemStack = ItemStack.EMPTY) { + if (FMLEnvironment.dist.isClient) NetworkHandler.INSTANCE.send(PacketDistributor.SERVER.noArg(), CPacketOpenCurios(carriedStack)) +} + private fun Player.getCuriosSlotsImpl(): List> { val handler = getCapability(MatteryCapability.CURIOS_INVENTORY).orNull() ?: return listOf() diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/misc18.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/misc18.png index 9a54260fb..e8e91ae60 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/misc18.png and b/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/misc18.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/misc18.xcf b/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/misc18.xcf index 3d5a11d54..f42db9b99 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/misc18.xcf and b/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/misc18.xcf differ