crafting: clicking on the recipe will show all possible ingredients player has

This commit is contained in:
minjaesong
2023-10-01 03:11:01 +09:00
parent 908a6ed953
commit abcc85a3de
4 changed files with 125 additions and 82 deletions

View File

@@ -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("")