monitor adjustment screen, changed "calibrate" to "adjust" (NOT the STRING_ID of langpack)

Former-commit-id: ffae41e5876e54e2e0aedb5a93092db8e8f75d01
Former-commit-id: 65883b385a205d47b76c60f18a91186c2be922b2
This commit is contained in:
Song Minjae
2016-07-06 20:17:51 +09:00
parent 4843819d84
commit 186d6a8cb9
53 changed files with 425 additions and 215 deletions

View File

@@ -8,17 +8,17 @@ import net.torvald.terrarum.gameactors.faction.FactionCodex
*/
object RealEstateUtility {
fun getAbsoluteTileNumber(x: Int, y: Int): Long =
(Terrarum.game.map.width * y).toLong() + x
(Terrarum.ingame.map.width * y).toLong() + x
fun resolveAbsoluteTileNumber(t: Long): Pair<Int, Int> =
Pair((t % Terrarum.game.map.width).toInt(), (t / Terrarum.game.map.width).toInt())
Pair((t % Terrarum.ingame.map.width).toInt(), (t / Terrarum.ingame.map.width).toInt())
/**
* Get owner ID as an Actor/Faction
*/
fun resolveOwner(id: Long): Any =
if (id < 0x80000000L)
Terrarum.game.getActorByID(id.toInt())
Terrarum.ingame.getActorByID(id.toInt())
else
FactionCodex.getFactionByID(id)
}