Пример #1
0
        public void LinkHackNodes()
        {
            //door opening
            HackingNode openDoor = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.OpenDoor);

            openDoor.AddToInputMethods(HackingTryOpen);

            HackingNode onShouldOpen = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.OnShouldOpen);

            onShouldOpen.AddWireCutCallback(ServerElectrocute);
            onShouldOpen.AddConnectedNode(openDoor);

            //door closing
            HackingNode closeDoor = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.CloseDoor);

            closeDoor.AddToInputMethods(TryClose);

            HackingNode onShouldClose = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.OnShouldClose);

            onShouldClose.AddWireCutCallback(ServerElectrocute);
            onShouldClose.AddConnectedNode(closeDoor);

            //ID reject
            HackingNode rejectID = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.RejectId);

            rejectID.AddToInputMethods(ServerAccessDenied);

            HackingNode onIDRejected = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.OnIdRejected);

            onIDRejected.AddConnectedNode(rejectID);

            //pressure warning
            HackingNode doPressureWarning = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.DoPressureWarning);

            doPressureWarning.AddToInputMethods(ServerPressureWarn);

            HackingNode shouldDoPressureWarning = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.ShouldDoPressureWarning);

            shouldDoPressureWarning.AddConnectedNode(doPressureWarning);

            //power
            HackingNode powerIn = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.PowerIn);

            HackingNode powerOut = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.PowerOut);

            powerOut.AddConnectedNode(powerIn);
            powerOut.AddWireCutCallback(ServerElectrocute);

            //dummy
            HackingNode dummyIn = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.DummyIn);

            HackingNode dummyOut = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.DummyOut);

            dummyOut.AddConnectedNode(dummyIn);

            //close timer
            HackingNode cancelCloseTimer = hackingProcess.GetNodeWithInternalIdentifier(HackingIdentifier.CancelCloseTimer);

            cancelCloseTimer.AddToInputMethods(CancelWaiting);
        }
Пример #2
0
    public void LinkHackNodes()
    {
        HackingNode openDoor = hackingProcess.GetNodeWithInternalIdentifier("OpenDoor");

        openDoor.AddToInputMethods(ServerOpen);

        HackingNode closeDoor = hackingProcess.GetNodeWithInternalIdentifier("CloseDoor");

        closeDoor.AddToInputMethods(ServerClose);

        HackingNode beginOpenProcedure = hackingProcess.GetNodeWithInternalIdentifier("BeginOpenProcedure");

        beginOpenProcedure.AddToInputMethods(ServerTryOpen);

        HackingNode beginCloseProcedure = hackingProcess.GetNodeWithInternalIdentifier("BeginCloseProcedure");

        beginCloseProcedure.AddToInputMethods(ServerTryClose);

        HackingNode onAttemptOpen = hackingProcess.GetNodeWithInternalIdentifier("OnAttemptOpen");

        onAttemptOpen.AddConnectedNode(beginOpenProcedure);

        HackingNode onAttemptClose = hackingProcess.GetNodeWithInternalIdentifier("OnAttemptClose");

        onAttemptClose.AddConnectedNode(beginCloseProcedure);

        HackingNode onShouldOpen = hackingProcess.GetNodeWithInternalIdentifier("OnShouldOpen");

        onShouldOpen.AddWireCutCallback(ServerElectrocute);
        onShouldOpen.AddConnectedNode(openDoor);

        HackingNode onShouldClose = hackingProcess.GetNodeWithInternalIdentifier("OnShouldClose");

        onShouldClose.AddWireCutCallback(ServerElectrocute);
        onShouldClose.AddConnectedNode(closeDoor);

        HackingNode acceptID = hackingProcess.GetNodeWithInternalIdentifier("AcceptId");

        HackingNode rejectID = hackingProcess.GetNodeWithInternalIdentifier("RejectID");

        rejectID.AddToInputMethods(ServerAccessDenied);

        HackingNode onIDRejected = hackingProcess.GetNodeWithInternalIdentifier("OnIDRejected");

        onIDRejected.AddConnectedNode(rejectID);

        HackingNode doPressureWarning = hackingProcess.GetNodeWithInternalIdentifier("DoPressureWarning");

        doPressureWarning.AddToInputMethods(ServerPressureWarn);

        HackingNode shouldDoPressureWarning = hackingProcess.GetNodeWithInternalIdentifier("ShouldDoPressureWarning");

        shouldDoPressureWarning.AddConnectedNode(doPressureWarning);

        HackingNode onDoorOpened = hackingProcess.GetNodeWithInternalIdentifier("OnDoorOpened");

        HackingNode onDoorClosed = hackingProcess.GetNodeWithInternalIdentifier("OnDoorClosed");

        HackingNode powerIn = hackingProcess.GetNodeWithInternalIdentifier("PowerIn");

        HackingNode powerOut = hackingProcess.GetNodeWithInternalIdentifier("PowerOut");

        powerOut.AddConnectedNode(powerIn);
        powerOut.AddWireCutCallback(ServerElectrocute);

        HackingNode dummyIn = hackingProcess.GetNodeWithInternalIdentifier("DummyIn");

        HackingNode dummyOut = hackingProcess.GetNodeWithInternalIdentifier("DummyOut");

        dummyOut.AddConnectedNode(dummyIn);

        hackingLoaded = true;
    }