diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ResearchIcons.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ResearchIcons.kt index 6bb570ef3..02abfc9ee 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ResearchIcons.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ResearchIcons.kt @@ -34,30 +34,30 @@ object ResearchIcons { val KOT = ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/block/ph_kitty.png").element(0f, 0f, 32f, 32f, 32f, 32f) init { - var i = 0 + val grid = SubSkinGrid(AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_upgrades"), 126f, 126f), 18f, 18f, 7, 7) - ICON_TRANSFER = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_ATTACK_BOOST = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_PLASMA_SHIELD_BOOST = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_CLOAK = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_GRAVITATIONAL_STABILIZER = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_AIR_BAGS = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_JUMP_BOOST = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_FEATHER_FALLING = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_ITEM_MAGNET = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_ARROW = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_ARMOR = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_NANOBOTS = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_NIGHT_VISION = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_OXYGEN_SUPPLY = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_PLASMA_SHIELD = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_SHOCKWAVE = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_LIMB_OVERCLOCKING = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_STEP_ASSIST = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_ENDER_TELEPORT = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_WIRELESS_CHARGING = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_UNKNOWN = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_EXTENDED_REACH = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) - ICON_PHANTOM_ATTRACTOR = AtlasSkinElement(ResourceLocation(OverdriveThatMatters.MOD_ID, "android_research/android_stuff-${i++}"), 18f, 18f) + ICON_TRANSFER = grid.next() + ICON_ATTACK_BOOST = grid.next() + ICON_PLASMA_SHIELD_BOOST = grid.next() + ICON_CLOAK = grid.next() + ICON_GRAVITATIONAL_STABILIZER = grid.next() + ICON_AIR_BAGS = grid.next() + ICON_JUMP_BOOST = grid.next() + ICON_FEATHER_FALLING = grid.next() + ICON_ITEM_MAGNET = grid.next() + ICON_ARROW = grid.next() + ICON_ARMOR = grid.next() + ICON_NANOBOTS = grid.next() + ICON_NIGHT_VISION = grid.next() + ICON_OXYGEN_SUPPLY = grid.next() + ICON_PLASMA_SHIELD = grid.next() + ICON_SHOCKWAVE = grid.next() + ICON_LIMB_OVERCLOCKING = grid.next() + ICON_STEP_ASSIST = grid.next() + ICON_ENDER_TELEPORT = grid.next() + ICON_WIRELESS_CHARGING = grid.next() + ICON_UNKNOWN = grid.next() + ICON_EXTENDED_REACH = grid.next() + ICON_PHANTOM_ATTRACTOR = grid.next() } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SubSkinGrid.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SubSkinGrid.kt new file mode 100644 index 000000000..9b82bdedb --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SubSkinGrid.kt @@ -0,0 +1,53 @@ +package ru.dbotthepony.mc.otm.client.render + +@Suppress("unused") +data class SubSkinGrid( + val parent: AbstractSkinElement, + val width: Float, + val height: Float, + val rows: Int = 16, + val columns: Int = 16, +) { + var row = 0 + var column = 0 + + val currentX: Float get() = column * width + val currentY: Float get() = row * height + + fun skip(): SubSkinGrid { + column++ + + if (column >= columns) { + jump() + } + + return this + } + + fun jump(): SubSkinGrid { + row++ + column = 0 + return this + } + + fun next(): AbstractSkinElement { + val element = parent.subElement(currentX, currentY, width, height) + skip() + return element + } + + fun reset(): SubSkinGrid { + row = 0 + column = 0 + return this + } + + fun seek(row: Int, column: Int): SubSkinGrid { + this.row = row + this.column = column + return this + } + + operator fun get(column: Int, row: Int) = + parent.subElement(column * width, row * height, width, height) +} diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-0.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-0.png deleted file mode 100644 index ced7098bf..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-0.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-1.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-1.png deleted file mode 100644 index cbf380ea7..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-1.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-10.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-10.png deleted file mode 100644 index d6f40b4b1..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-10.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-11.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-11.png deleted file mode 100644 index 54f1f3642..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-11.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-12.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-12.png deleted file mode 100644 index 5d932b09b..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-12.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-13.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-13.png deleted file mode 100644 index 20fb65d37..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-13.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-14.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-14.png deleted file mode 100644 index 45972813e..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-14.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-15.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-15.png deleted file mode 100644 index c21fddd67..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-15.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-16.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-16.png deleted file mode 100644 index d960d149c..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-16.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-17.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-17.png deleted file mode 100644 index c950e82db..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-17.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-18.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-18.png deleted file mode 100644 index 4dfd3777d..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-18.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-19.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-19.png deleted file mode 100644 index 926a15760..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-19.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-2.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-2.png deleted file mode 100644 index 0bc024613..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-2.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-20.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-20.png deleted file mode 100644 index db69c893d..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-20.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-21.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-21.png deleted file mode 100644 index 675a3ee0a..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-21.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-22.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-22.png deleted file mode 100644 index 99f6e675a..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-22.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-3.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-3.png deleted file mode 100644 index 19d0cd8ee..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-3.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-4.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-4.png deleted file mode 100644 index 03eb6d1f8..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-4.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-5.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-5.png deleted file mode 100644 index 061f30ed0..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-5.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-6.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-6.png deleted file mode 100644 index e7b54acef..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-6.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-7.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-7.png deleted file mode 100644 index 99e2c4e9c..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-7.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-8.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-8.png deleted file mode 100644 index d187cfbf9..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-8.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-9.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-9.png deleted file mode 100644 index bf6d939ce..000000000 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_research/android_stuff-9.png and /dev/null differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_upgrades.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_upgrades.png new file mode 100644 index 000000000..8deae1d89 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_upgrades.png differ