fix 'prototype key' in MapTileDictionary
This commit is contained in:
parent
648cb31de8
commit
bb54f6666b
2 changed files with 13 additions and 20 deletions
|
|
@ -50,15 +50,17 @@ data class MapTileDictionary(
|
|||
val protoName = protosIndexToName[protoIndex]
|
||||
if (x != null && y != null && protoName != null) {
|
||||
add(MapTile(x, y, protoName))
|
||||
} else if (protoName == null) {
|
||||
println("warning: no prototype name found for index:$protoIndex. $protosIndexToName")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** The collection-index of a prototype in [MapTileDictionary.protos] */
|
||||
/** An arbitrary ID for a prototype in [MapTileDictionary.protos]. */
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class PrototypeKey(val index: Int)
|
||||
value class PrototypeKey(private val index: Int)
|
||||
|
||||
companion object {
|
||||
fun MapTileDictionary?.isNullOrEmpty(): Boolean {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue