{
    "ImportBluePrints": {
        "pre_delay": 0,
        "post_delay": 0,
        "next": [
            "ImportBluePrintsChooseTab",
            "[JumpBack]SceneEnterMenuBluePrint"
        ]
    },
    "ImportBluePrintsChooseTab": {
        "recognition": {
            "type": "OCR",
            "param": {
                "roi": [
                    0,
                    0,
                    700,
                    70
                ],
                "expected": [
                    "共享蓝图",
                    "共享藍圖",
                    "(?i)Shared\\s*Blueprints",
                    "共有図面",
                    "Shared Blueprint",
                    "Shared"
                ]
            }
        },
        "action": "Click",
        "post_wait_freezes": 100,
        "next": [
            "ImportBluePrintsInitText"
        ]
    },
    "ImportBluePrintsInitText": {
        "desc": "导入用户输入的文本",
        "pre_delay": 0,
        "action": {
            "type": "Custom",
            "param": {
                "custom_action": "ImportBluePrintsInitTextAction"
            }
        },
        "post_delay": 0,
        "next": [
            "ImportBluePrintsFinish"
        ]
    },
    "ImportBluePrintsFinish": {
        "desc": "检测是否导入完成，完成了在action内退出任务",
        "pre_delay": 0,
        "action": {
            "type": "Custom",
            "param": {
                "custom_action": "ImportBluePrintsFinishAction"
            }
        },
        "post_delay": 0,
        "next": [
            "[JumpBack]ImportBluePrintsChooseImport",
            "ImportBluePrintsActiveInputBox"
        ]
    },
    "ImportBluePrintsChooseImport": {
        "recognition": {
            "type": "OCR",
            "param": {
                "roi": [
                    700,
                    600,
                    250,
                    110
                ],
                "expected": [
                    "导入蓝图",
                    "匯入藍圖",
                    "Import Blueprint",
                    "Import"
                ]
            }
        },
        "action": "Click",
        "post_wait_freezes": 100
    },
    "ImportBluePrintsActiveInputBox": {
        "desc": "激活输入框",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    760,
                    250,
                    300,
                    230
                ],
                "template": "ImportBluePrints/InputPaste.png",
                "threshold": 0.9
            }
        },
        "action": {
            "type": "Click",
            "param": {
                "target_offset": [
                    -50,
                    10,
                    0,
                    -20
                ]
            }
        },
        "next": [
            "ImportBluePrintsEnterCode"
        ]
    },
    "ImportBluePrintsEnterCode": {
        "desc": "输入一个蓝图码",
        "pre_delay": 0,
        "action": {
            "type": "Custom",
            "param": {
                "custom_action": "ImportBluePrintsEnterCodeAction"
            }
        },
        "post_delay": 0,
        "next": [
            "ImportBluePrintsConfirm"
        ]
    },
    "ImportBluePrintsConfirm": {
        "desc": "点击确认按钮",
        "recognition": {
            "type": "OCR",
            "param": {
                "roi": [
                    600,
                    350,
                    350,
                    230
                ],
                "expected": [
                    "确认",
                    "確定",
                    "Confirm"
                ]
            }
        },
        "action": "Click",
        "post_wait_freezes": 100,
        "timeout": 2000, // 等待一段时间未跳转，错误蓝图码
        "next": [
            "ImportBluePrintsSave",
            "ImportBluePrintsExists"
        ],
        "on_error": [
            "ImportBluePrintsFinish"
        ]
    },
    "ImportBluePrintsSave": {
        "desc": "点击保存按钮",
        "recognition": {
            "type": "OCR",
            "param": {
                "roi": [
                    900,
                    600,
                    375,
                    110
                ],
                "expected": [
                    "存至共享蓝图",
                    "存至共享藍圖",
                    "(?i)Save\\s*to\\s*Shared\\s*Blueprints",
                    "保存",
                    "儲存",
                    "(?i)Save",
                    "Save to Shared"
                ]
            }
        },
        "action": "Click",
        "post_wait_freezes": 100,
        "next": [
            "ImportBluePrintsFinish"
        ]
    },
    "ImportBluePrintsExists": {
        "desc": "蓝图已存在，退出",
        "recognition": {
            "type": "OCR",
            "param": {
                "roi": [
                    900,
                    600,
                    375,
                    110
                ],
                "expected": [
                    "已保存",
                    "已儲存",
                    "(?i)Saved",
                    "保存済み",
                    "Already"
                ]
            }
        },
        "action": {
            "type": "ClickKey",
            "param": {
                "key": 27 // ESC
            }
        },
        "post_wait_freezes": 100,
        "next": [
            "ImportBluePrintsFinish"
        ]
    }
}
