Ejemplo n.º 1
0
    protected string ReadLogCommand(string input, out bool success)
    {
        success = false;

        /* XXX: Left for later use for log filtering
         * Regex pattern = new Regex(@"");
         * Match match = pattern.Match(input);
         * if( !match.Success ) {
         *      return "ReadLog invalid format";
         * }*/

        LogDetails detail;

        switch (input)
        {
        case "all":
            detail = LogDetails.ALL;
            break;

        case "command":
            detail = LogDetails.COMMAND;
            break;

        case "":
        case "response":
            detail = LogDetails.RESPONSE;
            break;

        default:
            return("ReadLog invalid format");
        }

        NodeGraphicScript graphic = NodeGraphicManager.GetGraphic(localNode);

        graphic.DisplayLog(detail);

        player.cameraFocus.Offset(new Vector3(-0.5f, 0, 2.5f));

        graphic.ShowMemory(false);
        success = true;
        return("Opening log...");
    }