mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 06:24:06 +09:00
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:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user