From e24f73db4680a6654166523fdcbc0012e5931c15 Mon Sep 17 00:00:00 2001 From: "thatonecoder (formerly Coccocoa's Helper)" <157546848+Coccocoahelper@users.noreply.github.com> Date: Sat, 6 Jul 2024 23:30:13 +0100 Subject: [PATCH] feat: make all dungeon solver colors customizable (#487) * feat: Make all Dungeon solver colors customizable Not ready, but likely not going to break thing Signed-off-by: thatonecoder (formerly Coccocoa's Helper) <157546848+Coccocoahelper@users.noreply.github.com> * Maybe done * maybe a proper fix * Update TileEntityChestRendererHook.kt Signed-off-by: thatonecoder (formerly Coccocoa's Helper) <157546848+Coccocoahelper@users.noreply.github.com> * revert * fix import * Fix missing package ??????????????????????????????????????????????????????????? --------- Signed-off-by: thatonecoder (formerly Coccocoa's Helper) <157546848+Coccocoahelper@users.noreply.github.com> Co-authored-by: sychic <47618543+Sychic@users.noreply.github.com> --- .../gg/skytils/skytilsmod/core/Config.kt | 28 ++++++++++++++++--- .../impl/dungeons/solvers/BoulderSolver.kt | 9 ++---- .../renderer/TileEntityChestRendererHook.kt | 23 ++------------- .../resources/assets/skytils/lang/en_US.lang | 2 ++ 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/mod/src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt b/mod/src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt index ceb7cf6ad..9a2d7193f 100644 --- a/mod/src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt +++ b/mod/src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt @@ -1136,7 +1136,7 @@ object Config : Vigilant( @Property( type = PropertyType.SWITCH, name = "Boulder Solver", - description = "§b[WIP] §rShow which boxes to move on the Boulder puzzle.", + description = "Show which boxes to move on the Boulder puzzle.", category = "Dungeons", subcategory = "Solvers", i18nName = "skytils.config.dungeons.solvers.boulder_solver", i18nCategory = "skytils.config.dungeons", @@ -1144,6 +1144,16 @@ object Config : Vigilant( ) var boulderSolver = false + @Property( + type = PropertyType.COLOR, name = "Boulder Solver Color", + description = "Color of the box that shows which button to click in the Boulder puzzle.", + category = "Dungeons", subcategory = "Solvers", + i18nName = "skytils.config.dungeons.solvers.boulder_solver_color", + i18nCategory = "skytils.config.dungeons", + i18nSubcategory = "skytils.config.dungeons.solvers" + ) + var boulderSolverColor = Color(255, 0, 0, 255) + @Property( type = PropertyType.SWITCH, name = "Creeper Beams Solver", description = "Shows pairs on the Creeper Beams puzzle.", @@ -1186,7 +1196,7 @@ object Config : Vigilant( @Property( type = PropertyType.COLOR, name = "Teleport Maze Solver Color", - description = "Color of the thing that shows which pads you've stepped on in the Teleport Maze puzzle.", + description = "Color of the box that shows which pads you've stepped on in the Teleport Maze puzzle.", category = "Dungeons", subcategory = "Solvers", i18nName = "skytils.config.dungeons.solvers.teleport_maze_solver_color", i18nCategory = "skytils.config.dungeons", @@ -1204,9 +1214,19 @@ object Config : Vigilant( ) var threeWeirdosSolver = false + @Property( + type = PropertyType.COLOR, name = "Three Weirdos Solver Color", + description = "Color of the chest to click on the Three Weirdos puzzle.", + category = "Dungeons", subcategory = "Solvers", + i18nName = "skytils.config.dungeons.solvers.three_weirdos_solver_color", + i18nCategory = "skytils.config.dungeons", + i18nSubcategory = "skytils.config.dungeons.solvers" + ) + var threeWeirdosSolverColor = Color(255, 0, 0, 255) + @Property( type = PropertyType.SWITCH, name = "Tic Tac Toe Solver", - description = "§b[WIP] §rDisplays the best move on the Tic Tac Toe puzzle.", + description = "Displays the best move on the Tic Tac Toe puzzle.", category = "Dungeons", subcategory = "Solvers", i18nName = "skytils.config.dungeons.solvers.tic_tac_toe_solver", i18nCategory = "skytils.config.dungeons", @@ -1216,7 +1236,7 @@ object Config : Vigilant( @Property( type = PropertyType.COLOR, name = "Tic Tac Toe Solver Color", - description = "Color of the thing that displays the best move on the Tic Tac Toe puzzle.", + description = "Color of the outline that displays the best move on the Tic Tac Toe puzzle.", category = "Dungeons", subcategory = "Solvers", i18nName = "skytils.config.dungeons.solvers.tic_tac_toe_solver_color", i18nCategory = "skytils.config.dungeons", diff --git a/mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/BoulderSolver.kt b/mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/BoulderSolver.kt index 005cb8b2a..234835a65 100644 --- a/mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/BoulderSolver.kt +++ b/mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/BoulderSolver.kt @@ -29,7 +29,6 @@ import gg.skytils.skytilsmod.Skytils.mc import gg.skytils.skytilsmod.Skytils.successPrefix import gg.skytils.skytilsmod._event.DungeonPuzzleDiscoveredEvent import gg.skytils.skytilsmod.core.tickTimer -import gg.skytils.skytilsmod.events.impl.skyblock.DungeonEvent import gg.skytils.skytilsmod.listeners.DungeonListener import gg.skytils.skytilsmod.utils.RenderUtil import gg.skytils.skytilsmod.utils.SuperSecretSettings @@ -43,10 +42,6 @@ import net.minecraft.util.AxisAlignedBB import net.minecraft.util.BlockPos import net.minecraft.util.EnumFacing import net.minecraft.world.World -import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.awt.Color import kotlin.math.floor import kotlin.random.Random @@ -96,7 +91,7 @@ object BoulderSolver : EventSubscriber { RenderUtil.drawFilledBoundingBox( matrixStack, AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1), - Color(255, 0, 0, 255), + Skytils.config.boulderSolverColor, 0.7f ) GlStateManager.enableCull() @@ -387,4 +382,4 @@ object BoulderSolver : EventSubscriber { register(::onRenderWorld) register(::onWorldChange) } -} \ No newline at end of file +} diff --git a/mod/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/renderer/TileEntityChestRendererHook.kt b/mod/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/renderer/TileEntityChestRendererHook.kt index e44037e34..6ece0a090 100644 --- a/mod/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/renderer/TileEntityChestRendererHook.kt +++ b/mod/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/renderer/TileEntityChestRendererHook.kt @@ -1,28 +1,11 @@ -/* - * Skytils - Hypixel Skyblock Quality of Life Mod - * Copyright (C) 2020-2023 Skytils - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ package gg.skytils.skytilsmod.mixins.hooks.renderer +import gg.skytils.skytilsmod.core.Config.threeWeirdosSolverColor import gg.skytils.skytilsmod.features.impl.dungeons.solvers.ThreeWeirdosSolver import gg.skytils.skytilsmod.utils.bindColor import net.minecraft.client.renderer.GlStateManager import net.minecraft.tileentity.TileEntityChest import org.spongepowered.asm.mixin.injection.callback.CallbackInfo -import java.awt.Color fun setChestColor( te: TileEntityChest, @@ -34,7 +17,7 @@ fun setChestColor( ci: CallbackInfo ) { if (te.pos == ThreeWeirdosSolver.riddleChest) { - Color.RED.bindColor() + threeWeirdosSolverColor.bindColor() GlStateManager.disableTexture2D() } } @@ -49,4 +32,4 @@ fun setChestColorPost( ci: CallbackInfo ) { GlStateManager.enableTexture2D() -} +} \ No newline at end of file diff --git a/mod/src/main/resources/assets/skytils/lang/en_US.lang b/mod/src/main/resources/assets/skytils/lang/en_US.lang index eec3e45f4..21335a551 100644 --- a/mod/src/main/resources/assets/skytils/lang/en_US.lang +++ b/mod/src/main/resources/assets/skytils/lang/en_US.lang @@ -103,12 +103,14 @@ skytils.config.dungeons.solvers.highest_blaze_color=Highest Blaze Color skytils.config.dungeons.solvers.next_blaze_color=Next Blaze Color skytils.config.dungeons.solvers.line_to_next_blaze_color=Line to Next Blaze Color skytils.config.dungeons.solvers.boulder_solver=Boulder Solver +skytils.config.dungeons.solvers.boulder_solver_color=Boulder Solver Color skytils.config.dungeons.solvers.creeper_beams_solver=Creeper Beams Solver skytils.config.dungeons.solvers.ice_fill_solver=Ice Fill Solver skytils.config.dungeons.solvers.ice_path_solver=Ice Path Solver skytils.config.dungeons.solvers.teleport_maze_solver=Teleport Maze Solver skytils.config.dungeons.solvers.teleport_maze_solver_color=Teleport Maze Solver Color skytils.config.dungeons.solvers.three_weirdos_solver=Three Weirdos Solver +skytils.config.dungeons.solvers.three_weirdos_solver_color=Three Weirdos Solver Color skytils.config.dungeons.solvers.tic_tac_toe_solver=Tic Tac Toe Solver skytils.config.dungeons.solvers.tic_tac_toe_solver_color=Tic Tac Toe Solver Color skytils.config.dungeons.solvers.trivia_solver=Trivia Solver