Migrated PartFlatWire into node system
This commit is contained in:
parent
1678afe96e
commit
44208669ef
3 changed files with 504 additions and 523 deletions
|
@ -6,7 +6,7 @@ import net.minecraftforge.common.util.ForgeDirection
|
|||
import universalelectricity.api.core.grid.{INode, INodeProvider, ISave}
|
||||
|
||||
/**
|
||||
* A node trait that can be mixed into any multipart nodes.
|
||||
* A node trait that can be mixed into any multipart nodes. Mixing this trait will cause nodes to reconstruct/deconstruct when needed.
|
||||
* @author Calclavia
|
||||
*/
|
||||
trait TNodePartConnector extends TMultiPart with INodeProvider
|
||||
|
|
|
@ -11,7 +11,7 @@ import universalelectricity.api.core.grid.{INode, INodeProvider}
|
|||
import universalelectricity.simulator.dc.DCNode
|
||||
|
||||
/**
|
||||
* Class extended by wires
|
||||
* Abstract class extended by both flat and framed wires to handle material, insulation, color and multipart node logic.
|
||||
* @author Calclavia
|
||||
*/
|
||||
abstract class TWire extends TMultiPart with TNodePartConnector with TPart with TMaterial[WireMaterial] with TInsulatable with TColorable
|
||||
|
@ -74,7 +74,7 @@ abstract class TWire extends TMultiPart with TNodePartConnector with TPart with
|
|||
/**
|
||||
* Can this conductor connect with another potential wire object?
|
||||
*/
|
||||
protected def canConnectTo(obj: AnyRef): Boolean =
|
||||
def canConnectTo(obj: AnyRef): Boolean =
|
||||
{
|
||||
if (obj != null && obj.getClass == getClass)
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ abstract class TWire extends TMultiPart with TNodePartConnector with TPart with
|
|||
/**
|
||||
* Can this conductor connect with another potential wire object AND a DCNode?
|
||||
*/
|
||||
protected def canConnectTo(obj: AnyRef, from: ForgeDirection): Boolean =
|
||||
def canConnectTo(obj: AnyRef, from: ForgeDirection): Boolean =
|
||||
{
|
||||
if (canConnectTo(obj))
|
||||
return true
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue