mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
get operator on Tile/ItemPropCodex
Former-commit-id: f6c4ecbad8c0ce2486524be70e68292d6aae799e Former-commit-id: 9738a693eb55861d1292e59d8df2bec7f5603c40
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user