mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 18:30:27 -04:00
Made file systems count as 1/4th component instead of being completely free. Just to avoid unhealthy numbers of raids/disk drives being connected to one computer.
This commit is contained in:
parent
e37bf65f3f
commit
e585b13b10
@ -94,9 +94,9 @@ class Machine(val host: MachineHost) extends prefab.ManagedEnvironment with mach
|
||||
|
||||
override def components = scala.collection.convert.WrapAsJava.mapAsJavaMap(_components)
|
||||
|
||||
def componentCount = _components.count {
|
||||
case (_, name) => name != "filesystem"
|
||||
} + addedComponents.count(_.name != "filesystem") - 1 // -1 = this computer
|
||||
def componentCount = (_components.foldLeft(0.0)((acc, entry) => entry match {
|
||||
case (_, name) => acc + (if (name != "filesystem") 1.0 else 0.25)
|
||||
}) + addedComponents.foldLeft(0.0)((acc, component) => acc + (if (component.name != "filesystem") 1 else 0.25)) - 1).toInt // -1 = this computer
|
||||
|
||||
override def tmpAddress = tmp.fold(null: String)(_.node.address)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user