mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-20 15:34:05 +09:00
no idea
Former-commit-id: 9738d12e5a468b71142745fbf0ce02fcf1ca623c Former-commit-id: a26b80a1990996d9c05b0909128c210e0f897312
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package net.torvald.terrarum.realestate
|
||||
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.gameactors.faction.FactionCodex
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-03-27.
|
||||
@@ -11,4 +12,13 @@ object RealEstateUtility {
|
||||
|
||||
fun resolveAbsoluteTileNumber(t: Long): Pair<Int, Int> =
|
||||
Pair((t % Terrarum.game.map.width).toInt(), (t / Terrarum.game.map.width).toInt())
|
||||
|
||||
/**
|
||||
* Get owner ID as an Actor/Faction
|
||||
*/
|
||||
fun resolveOwner(id: Long): Any =
|
||||
if (id < 0x80000000L)
|
||||
Terrarum.game.getActorByID(id.toInt())
|
||||
else
|
||||
FactionCodex.getFactionByID(id)
|
||||
}
|
||||
Reference in New Issue
Block a user