Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: scalable ch player arrow #521

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1981,6 +1981,17 @@ object Config : Vigilant(
)
var crystalHollowMap = false

@Property(
type = PropertyType.DECIMAL_SLIDER, name = "Crystal Hollows map player arrow scale",
description = "Scale the arrow indicating the player on the crystal hollows map",
category = "Mining", subcategory = "Crystal Hollows",
minF = 0.5f, maxF = 10f, decimalPlaces = 2,
i18nName = "skytils.config.mining.crystal_hollows.player_arrow_scaling",
i18nCategory = "skytils.config.mining",
i18nSubcategory = "skytils.config.mining.crystal_hollows"
)
var crystalHollowsMapPlayerScale = 2.25F

@Property(
type = PropertyType.SWITCH, name = "Crystal Hollows map special places",
description = "Show special places on the map (like Lost Precusor City).",
Expand All @@ -1990,7 +2001,7 @@ object Config : Vigilant(
i18nSubcategory = "skytils.config.mining.crystal_hollows"
)
var crystalHollowMapPlaces = false

Kemmisch marked this conversation as resolved.
Show resolved Hide resolved
@Property(
type = PropertyType.SWITCH, name = "Crystal Hollows waypoints",
description = "Shows waypoints to special places inside the Crystal Hollows.",
Expand Down Expand Up @@ -4477,6 +4488,8 @@ object Config : Vigilant(

addDependency("shinyPigLocations", "shinyOrbWaypoints")

addDependency("crystalHollowsMapPlayerScale", "crystalHollowMap")

registerListener("protectItemBINThreshold") { _: String ->
tickTimer(1) {
val numeric = protectItemBINThreshold.replace(Regex("[^0-9]"), "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ object CHWaypoints {
}
val x = (mc.thePlayer.posX - 202).coerceIn(0.0, 624.0)
val y = (mc.thePlayer.posZ - 202).coerceIn(0.0, 624.0)
val scale = Skytils.config.crystalHollowsMapPlayerScale

// player marker code
val wr = UGraphics.getFromTessellator()
Expand All @@ -307,8 +308,8 @@ object CHWaypoints {

// Rotate about the center to match the player's yaw
stack.rotate((mc.thePlayer.rotationYawHead + 180f) % 360f, 0f, 0f, 1f)
stack.scale(1.5f, 1.5f, 1.5f)
stack.translate(-0.125f, 0.125f, 0.0f)
stack.scale(scale,scale,scale)
stack.translate((-0.125f*scale).toDouble(), (0.125f*scale).toDouble(), 0.0)
UGraphics.color4f(1f, 1f, 1f, 1f)
UGraphics.enableAlpha()
val d1 = 0.0
Expand Down Expand Up @@ -403,4 +404,4 @@ object CHWaypoints {
)
}
}
}
}
3 changes: 2 additions & 1 deletion src/main/resources/assets/skytils/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ skytils.config.mining.solvers.fetchur_solver=Fetchur Solver
skytils.config.mining.solvers.puzzler_solver=Puzzler Solver
skytils.config.mining.crystal_hollows.crystal_hollows_death_waypoints=Crystal Hollows Death Waypoints
skytils.config.mining.crystal_hollows.crystal_hollows_map=Crystal Hollows map
skytils.config.mining.crystal_hollows.player_arrow_scaling=Crystal Hollows map player arrow scale
skytils.config.mining.crystal_hollows.crystal_hollows_map_special_places=Crystal Hollows map special places
skytils.config.mining.crystal_hollows.crystal_hollows_waypoints=Crystal Hollows waypoints
skytils.config.mining.crystal_hollows.king_yolkar_waypoint=King Yolkar waypoint
Expand Down Expand Up @@ -471,4 +472,4 @@ skytils.config.spam.display=Display
skytils.config.spam.abilities=Abilities
skytils.config.spam.dungeons=Dungeons
skytils.config.spam.miscellaneous=Miscellaneous
skytils.config.spam.fishing=Fishing
skytils.config.spam.fishing=Fishing
3 changes: 2 additions & 1 deletion src/main/resources/assets/skytils/lang/zh_CN.lang
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ skytils.config.mining.solvers.fetchur_solver=Fetchur的解密器
skytils.config.mining.solvers.puzzler_solver=Puzzler的解密器
skytils.config.mining.crystal_hollows.crystal_hollows_death_waypoints=水晶矿洞死亡路径点
skytils.config.mining.crystal_hollows.crystal_hollows_map=水晶矿洞地图
skytils.config.mining.crystal_hollows.player_arrow_scaling=
skytils.config.mining.crystal_hollows.crystal_hollows_map_special_places=水晶矿洞地图标记特殊地点
skytils.config.mining.crystal_hollows.crystal_hollows_waypoints=水晶矿洞路径点
skytils.config.mining.crystal_hollows.king_yolkar_waypoint=哥布林王路径点
Expand Down Expand Up @@ -466,4 +467,4 @@ skytils.config.spam.display=显示
skytils.config.spam.abilities=能力
skytils.config.spam.dungeons=地牢
skytils.config.spam.miscellaneous=杂项
skytils.config.spam.fishing=钓鱼
skytils.config.spam.fishing=钓鱼
1 change: 1 addition & 0 deletions src/main/resources/assets/skytils/lang/zh_TW.lang
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ skytils.config.mining.solvers.fetchur_solver=Fetchur的解答器
skytils.config.mining.solvers.puzzler_solver=Puzzler的解答器
skytils.config.mining.crystal_hollows.crystal_hollows_death_waypoints=Crystal Hollows死亡路徑點
skytils.config.mining.crystal_hollows.crystal_hollows_map=Crystal Hollows地圖
skytils.config.mining.crystal_hollows.player_arrow_scaling=
skytils.config.mining.crystal_hollows.crystal_hollows_map_special_places=Crystal Hollows地圖標記特殊地點
skytils.config.mining.crystal_hollows.crystal_hollows_waypoints=Crystal Hollows路徑點
skytils.config.mining.crystal_hollows.king_yolkar_waypoint=哥布林王路徑點
Expand Down
Loading