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; }
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()); }
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; }