Exemple #1
0
        public void JoinNetwork(MechanicalNetwork network)
        {
            this.network = network;
            network.Join(this);

            if (network == null)
            {
                NetworkId = 0;
            }
            else
            {
                NetworkId = network.networkId;
            }
        }
Exemple #2
0
        public virtual void JoinNetwork(MechanicalNetwork network)
        {
            if (this.network != null && this.network != network)
            {
                LeaveNetwork();
            }

            if (this.network == null)
            {
                this.network = network;
                network?.Join(this);
            }

            if (network == null)
            {
                NetworkId = 0;
            }
            else
            {
                NetworkId = network.networkId;
            }

            Blockentity.MarkDirty();
        }