Skip to content

Conversation

Kemmisch
Copy link
Contributor

option to use the class color to render the name
option to use the class name instead of the player name

also set the default colors to actually meaningful colors instead of black across the board
moved color handling out of render code and into enum

Kemmisch added 5 commits May 30, 2025 00:41
move color into enum
there a better way to do this?
update for colors
why is all black the default anyways
open to suggestions on colors
todo: rename to something other than "border color"
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Kemmisch, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

Hello! Gemini here, providing a summary of this pull request. This PR introduces new configuration options for the Catlas map feature, allowing users to customize how player information is displayed. Specifically, it adds options to show the player's dungeon class name instead of their IGN and to color the displayed name according to their class color. Additionally, the default colors for each dungeon class used on the map have been updated from the previous black defaults to more distinct, meaningful colors. The implementation also includes a refactor, moving the logic for retrieving a class's color from the rendering code into the DungeonClass enum itself, improving code organization and reusability.

Highlights

  • New Map Display Options: Adds two new configuration toggles for the Catlas map: one to show the player's dungeon class name instead of their in-game name, and another to color the displayed name according to their dungeon class color.
  • Updated Default Colors: Changes the default colors for player classes (Archer, Berserk, Healer, Mage, Tank) on the map from black to more visually distinct colors.
  • Code Refactoring: Moves the logic for determining a dungeon class's color from the rendering utility class into the DungeonClass enum itself, centralizing the color definition.

Changelog

Click here to see the changelog
  • src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/catlas/core/CatlasConfig.kt
    • Added useClassForPlayerNames boolean config property for showing class name (lines 129-139).
    • Added colorPlayerNames boolean config property for coloring names by class (lines 141-151).
    • Updated default color for Archer (line 440).
    • Updated default color for Berserk (line 452).
    • Updated default color for Healer (line 464).
    • Updated default color for Mage (line 476).
    • Updated default color for Tank (line 488).
  • src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/catlas/utils/RenderUtils.kt
    • Simplified player head border color lookup to use the new color property on DungeonClass (line 178).
    • Modified player name rendering logic to conditionally display class name or player name based on CatlasConfig.useClassForPlayerNames (line 213).
    • Modified player name rendering logic to conditionally color the name based on class color or default white based on CatlasConfig.colorPlayerNames (line 216).
  • src/main/kotlin/gg/skytils/skytilsmod/utils/apiTools.kt
    • Added import for CatlasConfig (line 24).
    • Added a color property to the DungeonClass enum that returns the corresponding color from CatlasConfig (lines 65-73).
  • src/main/resources/assets/catlas/lang/en_US.lang
    • Added translation key catlas.config.map.toggle.player_class_name for the new config option (line 9).
    • Added translation key catlas.config.map.toggle.name_class_color for the new config option (line 10).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Map shows player names,
Now class color shines bright,
Configured view.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces useful new features for customizing player name display on the map, allowing users to see class names and class-specific colors. The refactoring to move color handling into the DungeonClass enum is a great improvement for maintainability, and updating the default colors from black to more meaningful ones enhances the user experience. Overall, the changes are well-implemented and clear.

I have one suggestion for a minor improvement in RenderUtils.kt to enhance readability and maintainability.

Summary of Findings

  • Code Readability and Maintainability: In RenderUtils.kt, the logic for determining the display name and color for player markers involves repeated conditional expressions. Extracting these into local variables would improve code clarity and reduce redundancy.

Merge Readiness

The pull request is generally in good shape and introduces valuable features and refactorings. There is one medium-severity suggestion for improving code readability in RenderUtils.kt. Addressing this would further enhance the code quality. I recommend considering this change before merging. As I am an AI, I am not authorized to approve pull requests; please ensure further review and approval by authorized maintainers.

Kemmisch added 2 commits May 30, 2025 00:49
i blame intellij

Signed-off-by: songreaver  <[email protected]>
extract name from function call

Signed-off-by: songreaver  <[email protected]>
@My-Name-Is-Jeff
Copy link
Member

also set the default colors to actually meaningful colors instead of black across the board moved color handling out of render code and into enum

My reasoning for having black colors was that it would match the previous behavior where all outlines were black. I am open to discussion.

@My-Name-Is-Jeff
Copy link
Member

also set the default colors to actually meaningful colors instead of black across the board moved color handling out of render code and into enum

My reasoning for having black colors was that it would match the previous behavior where all outlines were black. I am open to discussion.

Per Discord, these colors are based off the M7 Relics

Signed-off-by: My-Name-Is-Jeff <[email protected]>
@@ -61,6 +62,15 @@ enum class DungeonClass {

val className = name.toTitleCase()
val apiName = name.lowercase()
val color: Color
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't really like this change here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants