mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 04:24:05 +09:00
crafting: clicking on the recipe will show all possible ingredients player has
This commit is contained in:
@@ -947,4 +947,6 @@ fun distBetween(a: ActorWithBody, bpos: Vector2): Double {
|
||||
val apos3 = Vector2(apos1.x - ww, apos1.y)
|
||||
val dist = min(min(bpos.distanceSquared(apos1), bpos.distanceSquared(apos2)), bpos.distanceSquared(apos3))
|
||||
return dist.sqrt()
|
||||
}
|
||||
}
|
||||
|
||||
fun getHashStr(length: Int = 5) = (0 until length).map { "YBNDRFG8EJKMCPQXOTLVWIS2A345H769"[Math.random().times(32).toInt()] }.joinToString("")
|
||||
|
||||
Reference in New Issue
Block a user