get operator on Tile/ItemPropCodex

Former-commit-id: f6c4ecbad8c0ce2486524be70e68292d6aae799e
Former-commit-id: 9738a693eb55861d1292e59d8df2bec7f5603c40
This commit is contained in:
Song Minjae
2016-12-16 23:07:14 +09:00
parent 4552d7b7db
commit a5ca82f2c7
12 changed files with 65 additions and 63 deletions

View File

@@ -43,7 +43,7 @@ object TilePropCodex {
}
fun getProp(index: Int, damage: Int): TileProp {
fun get(index: Int, damage: Int): TileProp {
try {
tileProps[idDamageToIndex(index, damage)].id
}
@@ -54,7 +54,7 @@ object TilePropCodex {
return tileProps[idDamageToIndex(index, damage)]
}
fun getProp(rawIndex: Int?): TileProp {
operator fun get(rawIndex: Int?): TileProp {
try {
tileProps[rawIndex ?: TileNameCode.NULL].id
}