mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-13 00:37:59 +00:00
prevent outputs connecting back to the same structure
This commit is contained in:
1 parent
58125ee291
commit
2a7bbaeb97
1 file changed
+5
-1
@@ -38,7 +38,11 @@ abstract class TileOutput extends TileModule with MIOutput {
|
||||
|
||||
def doRescanFaces() {
|
||||
getCore map { core =>
|
||||
val connections = ForgeDirection.VALID_DIRECTIONS.filter(canConnectoToFace).toSet
|
||||
val connections = (
|
||||
ForgeDirection.VALID_DIRECTIONS
|
||||
filterNot { dir => core.modules.contains(mypos.neighbour(dir)) }
|
||||
filter canConnectoToFace
|
||||
).toSet
|
||||
val known = core.outputFaces.filter(_._1.origin == mypos).map(_._1.face).toSet
|
||||
val toAdd = connections -- known
|
||||
val toRemove = known -- connections
|
||||
|
||||
Reference in new issue
Block a user