Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Comments

feat(AwesomeMap): add player head color border and class color mapping#31

Merged
Yqloss merged 6 commits intoNecron-Dev:mainfrom
Xmarmalade:main
Sep 13, 2025
Merged

feat(AwesomeMap): add player head color border and class color mapping#31
Yqloss merged 6 commits intoNecron-Dev:mainfrom
Xmarmalade:main

Conversation

@Xmarmalade
Copy link
Contributor

image image

@ench233 ench233 self-requested a review August 24, 2025 13:07
Copy link
Contributor

@ench233 ench233 left a comment

Choose a reason for hiding this comment

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

🚀 感谢你对 EnchAddons 的贡献!

下面是对于你贡献的代码的一些建议喵:

  • 请使用 IDEA 插件 KtLint 完全格式化代码。
  • 请将常量在同 .kt 文件内以 Top-Level 定义而不是放在 object 中
  • 请不要使用 println() 输出日志
  • 请在调用 NanoVGWrapper 前使用 OneColor 而不是 Int 来传递颜色
  • 请将 玩家职业 包装为 Enum 并在其中实现 getClassColor(DungeonClass):OneColor而不是 getClassColor(Char):Int
  • 请将类似于 colorBorderSize 这样的 专注于渲染的 配置项直接实现而不是 override

以上,祝好喵。

@Xmarmalade Xmarmalade requested a review from ench233 August 24, 2025 15:56
Copy link
Contributor

@ench233 ench233 left a comment

Choose a reason for hiding this comment

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

感谢!

已为代码中的问题提出修改方案。

val borderColor = getClassColor(player.dungeonClass) alphaScale mapAlpha
val borderSize = config.colorBorderSize.double
val borderColor = getClassColor(DungeonClass.fromCode(player.dungeonClass))
val borderSize = 1.0 // Direct implementation instead of config override
Copy link
Contributor

Choose a reason for hiding this comment

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

这里不要写死,写到config里

else -> {
println("[AwesomeMap Debug] Unknown class: '$classInfo'")
'?'
dungeonClass =
Copy link
Contributor

Choose a reason for hiding this comment

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

这里怎么还是返回字符串,用 enum 走全程

if (dungeonClass != '?') {
println("[AwesomeMap Debug] Updated class for $name: $dungeonClass")
}
dungeonClass =
Copy link
Contributor

Choose a reason for hiding this comment

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

和刚才一样

@ench233 ench233 requested review from Yqloss and ench233 August 29, 2025 11:28
Copy link
Contributor

@ench233 ench233 left a comment

Choose a reason for hiding this comment

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

LGTM >ω<

@Yqloss Yqloss merged commit 0156274 into Necron-Dev:main Sep 13, 2025
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants