mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
wider nearby crafting station detection
This commit is contained in:
@@ -306,7 +306,7 @@ class UICrafting(val full: UIInventoryFull?) : UICanvas(
|
||||
var nearbyCraftingStations = emptyList<String>(); protected set
|
||||
|
||||
fun getCraftingStationsWithinReach(): List<String> {
|
||||
val reach = INGAME.actorNowPlaying!!.actorValue.getAsDouble(AVKey.REACH)!! * (INGAME.actorNowPlaying!!.actorValue.getAsDouble(AVKey.REACHBUFF) ?: 1.0) * INGAME.actorNowPlaying!!.scale
|
||||
val reach = 2 * INGAME.actorNowPlaying!!.actorValue.getAsDouble(AVKey.REACH)!! * (INGAME.actorNowPlaying!!.actorValue.getAsDouble(AVKey.REACHBUFF) ?: 1.0) * INGAME.actorNowPlaying!!.scale
|
||||
val nearbyCraftingStations = INGAME.findKNearestActors(INGAME.actorNowPlaying!!, 256) {
|
||||
it is CraftingStation && (distBetweenActors(it, INGAME.actorNowPlaying!!) < reach)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user