Fix jigsaw connectors having wrong understanding of "opposite"
This commit is contained in:
parent
3b642ffe40
commit
fde196ceae
@ -14,11 +14,11 @@ enum class DungeonDirection(override val jsonName: String, val positionAdjustmen
|
|||||||
},
|
},
|
||||||
UP("up", Vector2i.POSITIVE_Y) {
|
UP("up", Vector2i.POSITIVE_Y) {
|
||||||
override val opposite: DungeonDirection
|
override val opposite: DungeonDirection
|
||||||
get() = UP
|
get() = DOWN
|
||||||
},
|
},
|
||||||
DOWN("down", Vector2i.NEGATIVE_Y) {
|
DOWN("down", Vector2i.NEGATIVE_Y) {
|
||||||
override val opposite: DungeonDirection
|
override val opposite: DungeonDirection
|
||||||
get() = DOWN
|
get() = UP
|
||||||
},
|
},
|
||||||
UNKNOWN("unknown", Vector2i.ZERO) {
|
UNKNOWN("unknown", Vector2i.ZERO) {
|
||||||
override val opposite: DungeonDirection
|
override val opposite: DungeonDirection
|
||||||
|
@ -315,7 +315,7 @@ class DungeonPart(data: JsonData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun tileUsesPlaces(x: Int, y: Int): Boolean {
|
fun tileUsesPlaces(x: Int, y: Int): Boolean {
|
||||||
return reader.walkTilesAt(x, y) { x, y, tile -> if (tile.usesPlaces) KOptional(true) else KOptional() }.orElse(false)
|
return reader.walkTilesAt(x, y) { _, _, tile -> if (tile.usesPlaces) KOptional(true) else KOptional() }.orElse(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun collidesWithPlaces(x: Int, y: Int, world: DungeonWorld): Boolean {
|
fun collidesWithPlaces(x: Int, y: Int, world: DungeonWorld): Boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user