Example #1
0
 public override void OnStartServer()
 {
     base.OnStartServer();
     NodeControl                   = gameObject.GetComponent <INodeControl>();
     Node                          = gameObject.GetComponent <InLineDevice>();
     CanConnectTo                  = new HashSet <PowerTypeCategory>(ListCanConnectTo);
     Node.InData.Categorytype      = ApplianceType;
     Node.InData.CanConnectTo      = CanConnectTo;
     Node.InData.WireEndA          = WireEndA;
     Node.InData.WireEndB          = WireEndB;
     Node.InData.ControllingDevice = this;
     foreach (PowerInputReactions ReactionC in Reactions)
     {
         Node.InData.ConnectionReaction[ReactionC.ConnectingDevice] = ReactionC;
     }
     gameObject.SendMessage("BroadcastSetUpMessage", this, SendMessageOptions.DontRequireReceiver);
     if (UpdateRequestDictionary.TryGetValue(ElectricalUpdateTypeCategory.OnStartServer, out HashSet <ElectricalModuleTypeCategory> updateRequest))
     {
         foreach (ElectricalModuleTypeCategory Module in updateRequest)
         {
             UpdateDelegateDictionary[Module].OnStartServer();
         }
     }
     ElectricalManager.Instance.electricalSync.StructureChange = true;
 }
Example #2
0
 public override void OnStartServer()
 {
     base.OnStartServer();
     NodeControl                   = gameObject.GetComponent <INodeControl>();
     Node                          = gameObject.GetComponent <InLineDevice>();
     CanConnectTo                  = new HashSet <PowerTypeCategory>(ListCanConnectTo);
     Node.InData.Categorytype      = ApplianceType;
     Node.InData.CanConnectTo      = CanConnectTo;
     Node.InData.ControllingDevice = this;
     foreach (PowerInputReactions ReactionC in Reactions)
     {
         Node.InData.ConnectionReaction[ReactionC.ConnectingDevice] = ReactionC;
     }
     gameObject.SendMessage("BroadcastSetUpMessage", this, SendMessageOptions.DontRequireReceiver);
     UpOnStartServer();
     StartCoroutine(WaitForload());
 }
Example #3
0
 public override void OnStartServer()
 {
     //Logger.Log("yoooooo");
     base.OnStartServer();
     NodeControl                   = gameObject.GetComponent <INodeControl>();
     Node                          = gameObject.GetComponent <InLineDevice>();
     CanConnectTo                  = new HashSet <PowerTypeCategory>(ListCanConnectTo);
     Node.InData.Categorytype      = ApplianceType;
     Node.InData.CanConnectTo      = CanConnectTo;
     Node.InData.WireEndA          = WireEndA;
     Node.InData.WireEndB          = WireEndB;
     Node.InData.ControllingDevice = this;
     foreach (PowerInputReactions ReactionC in Reactions)
     {
         Node.InData.ConnectionReaction[ReactionC.ConnectingDevice] = ReactionC;
     }
     gameObject.SendMessage("BroadcastSetUpMessage", this, SendMessageOptions.DontRequireReceiver);
     UpOnStartServer();
     ElectricalManager.Instance.electricalSync.StructureChange = true;
 }