2024-05-29 15:18:03 +08:00
|
|
|
|
extends Node
|
|
|
|
|
|
|
|
|
|
## 实训名称
|
|
|
|
|
@export var trainingName: String = "实训"
|
|
|
|
|
## 场景描述
|
|
|
|
|
@export var trainingDesc: String = "场景描述"
|
|
|
|
|
|
|
|
|
|
var stepOperation = []
|
|
|
|
|
|
|
|
|
|
var handleStep = [
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤一:手指:上行整列故障门门头灯。站务员口呼:上行整列站台门关门故障。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "上行整列站台门关门故障。"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤二:站务员用对讲机汇报值班员:值班员,上行整列站台门关门故障,上行站台是否扣车?",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "值班员,上行整列站台门关门故障,上行站台是否扣车?"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "值班员回复:上行站台已扣车",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"checkVoice": "",
|
|
|
|
|
"play": true,
|
|
|
|
|
"playPath": "res://Assets/training_speech/trainingPinchPeopleFault/sxztykc.mp3",
|
|
|
|
|
"stepTip": false,
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤三:站务员对讲机汇报值班站长:值班站长,上行整列站台门关门故障,请派人看护故障门。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "值班站长,上行整列站台门关门故障,请派人看护故障门。"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "值班站长(机器人)自动回复:收到。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"checkVoice": "",
|
|
|
|
|
"play": true,
|
|
|
|
|
"playPath": "res://Assets/training_speech/sd.mp3",
|
|
|
|
|
"stepTip": false,
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤四:站务员在PSL盘上按压联动关门按钮,关闭车门和站台门。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": ["PSL","interconnectedCloseButton"],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤五:发现车门关门,屏蔽门未关闭,站务员对讲机汇报值班员:值班员,上行站台门未联动关门,列车已关门,使用PSL关闭上行整侧站台门。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "值班员,上行站台门未联动关门,列车已关门,使用PSL关闭上行整侧站台门。"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "值班员回复:收到。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"checkVoice": "",
|
|
|
|
|
"play": true,
|
|
|
|
|
"playPath": "res://Assets/training_speech/sd.mp3",
|
|
|
|
|
"stepTip": false,
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤六:站务员操作PSL关闭上行整侧站台门,并取下PSL操作允许钥匙。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": ["PSL","PSL_Key","confirmUseKey","PSLAllowRightRotate","CloseDoorButton","PSLAllowLeftRotate","removePSLKeyOfWindowPsl"],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤七:发现站台门仍未关闭,站务员对讲机汇报值班员:值班员,PSL关闭站台门无效。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "值班员,PSL关闭站台门无效。"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "值班员回复:操作PSL互锁解除,使列车尽快发出。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"checkVoice": "",
|
|
|
|
|
"play": true,
|
|
|
|
|
"playPath": "res://Assets/training_speech/trainingTotalPlatformDoorFault/czpslslcjkfc.mp3",
|
|
|
|
|
"stepTip": false,
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤八:站务员使用互锁解除发车:将上行PSL互锁解除开关钥匙旋转至互锁解除位,互锁解除指示灯点亮,并保持互锁解除位。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": ["PSL","HSJC_Key","confirmUseKey","InterlockReleaseSwitchRightRotate"],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤九:站务员对讲机汇报值班员:已操作互锁解除,申请取消上行站台扣车。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "已操作互锁解除,申请取消上行站台扣车。"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "值班员回复:收到。1",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"checkVoice": "",
|
|
|
|
|
"play": true,
|
|
|
|
|
"playPath": "res://Assets/training_speech/sd.mp3",
|
|
|
|
|
"stepTip": false,
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤十:确认列车车尾超过站台安全门端门后。口呼:列车已发出。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "列车已发出。"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤十一:站务员松开互锁解除开关,并取下钥匙。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": ["InterlockReleaseSwitchLeftRotate","removeHSJCKeyOfWindowPsl"],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "接到维修人员现场故障修复,即系统自动播放 “故障门已修复”。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"checkVoice": "",
|
|
|
|
|
"play": true,
|
|
|
|
|
"playPath": "res://Assets/training_speech/trainingTotalPlatformDoorFault/gzmyxf.mp3",
|
|
|
|
|
"stepTip": false,
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤十二:站务员口呼:故障门处置完毕。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "故障门处置完毕。"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤十三:站务员操作PSL关闭上行整侧站台门,并取下PSL操作允许钥匙。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": ["PSL","PSL_Key","confirmUseKey","PSLAllowRightRotate","CloseDoorButton","PSLAllowLeftRotate","removePSLKeyOfWindowPsl"],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "步骤十四:站务员对讲机汇报值班站长、值班员:值班站长、值班员,上行整列站台门故障已处理完毕。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
"checkVoice": "值班站长、值班员,上行整列站台门故障已处理完毕。"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-05-31 18:48:25 +08:00
|
|
|
|
"stepName": "值班站长(机器人)自动回复:收到。值班员回复:收到。",
|
2024-05-29 15:18:03 +08:00
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"checkVoice": "",
|
|
|
|
|
"play": true,
|
|
|
|
|
"playPath": "res://Assets/training_speech/sd.mp3",
|
|
|
|
|
"stepTip": false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"stepName": "实训已完成!",
|
|
|
|
|
"stepOperation": [],
|
|
|
|
|
"next": false,
|
|
|
|
|
"checkVoice": "",
|
|
|
|
|
"play": false,
|
|
|
|
|
"playPath": "",
|
|
|
|
|
"stepTip": true,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
## 步骤操作执行index
|
|
|
|
|
var stepOperationIndex = 0
|
|
|
|
|
|
|
|
|
|
## 步骤执行index
|
|
|
|
|
var handleStepIndex = 0
|
|
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
|
$TrainingDescDialog.title = trainingName
|
|
|
|
|
$TrainingDescDialog.updateSceneDesc(trainingDesc)
|
|
|
|
|
$TrainingDescDialog.grab_focus()
|
|
|
|
|
stepOperationIndex = 0
|
|
|
|
|
handleStepIndex = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_training_desc_dialog_start_training():
|
|
|
|
|
$total.trainComeAndOpenScreenDoor()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func nextStep():
|
|
|
|
|
if handleStepIndex < handleStep.size():
|
|
|
|
|
var step = handleStep[handleStepIndex]
|
|
|
|
|
handleStepIndex = handleStepIndex + 1
|
|
|
|
|
if step.stepTip == true and $total.trainingMode != TotalScene.Training_Mode.Exam:
|
|
|
|
|
$StepTip.updateOperationTip(step.stepName)
|
|
|
|
|
if step.stepOperation.size() > 0:
|
|
|
|
|
initStepOperation()
|
|
|
|
|
if step.next == true:
|
|
|
|
|
$StepTimer.connect("timeout", nextStep)
|
|
|
|
|
$StepTimer.start()
|
|
|
|
|
if step.checkVoice:
|
|
|
|
|
await $VoiceCommunication.speech_record_check(step.checkVoice)
|
|
|
|
|
nextStep()
|
|
|
|
|
if step.play:
|
|
|
|
|
var sound = load(step.playPath)
|
|
|
|
|
await $VoiceCommunication.play_reply(sound)
|
2024-05-31 18:48:25 +08:00
|
|
|
|
if step.stepName != "接到维修人员现场故障修复,即系统自动播放 “故障门已修复”。":
|
2024-05-29 15:18:03 +08:00
|
|
|
|
nextStep()
|
2024-05-31 18:48:25 +08:00
|
|
|
|
if step.stepName == "值班员回复:收到。1":
|
2024-05-29 15:18:03 +08:00
|
|
|
|
$total.trainLeave()
|
2024-05-31 18:48:25 +08:00
|
|
|
|
elif step.stepName == "步骤十二:站务员口呼:故障门处置完毕。":
|
2024-05-29 15:18:03 +08:00
|
|
|
|
canCloseScreenDoor = true
|
|
|
|
|
|
|
|
|
|
func setOperationNodeAndTip():
|
|
|
|
|
$total.currenNeedClickNode = stepOperation[stepOperationIndex]
|
|
|
|
|
if $total.trainingMode == TotalScene.Training_Mode.Teach:
|
|
|
|
|
$TrainTip.setTrainingTip($total.allClickEquipmentInfo[stepOperation[stepOperationIndex]])
|
|
|
|
|
|
|
|
|
|
func initStepOperation():
|
|
|
|
|
stepOperation = handleStep[handleStepIndex-1].stepOperation
|
|
|
|
|
stepOperationIndex = 0
|
|
|
|
|
setOperationNodeAndTip()
|
|
|
|
|
|
|
|
|
|
##与站台交互点击信号
|
|
|
|
|
var canCloseScreenDoor = false
|
|
|
|
|
func _on_total_current_click_check_signal(isCorrect):
|
|
|
|
|
if isCorrect:
|
|
|
|
|
if $total.currentClickNode == 'interconnectedCloseButton' :
|
|
|
|
|
$total.closeOnlyTrainDoor()
|
|
|
|
|
$AudioStreamPlayer.play()
|
|
|
|
|
elif $total.currentClickNode == 'CloseDoorButton' and canCloseScreenDoor:
|
|
|
|
|
$total.closeOnlyScreenDoor()
|
|
|
|
|
elif $total.currentClickNode == 'removeHSJCKeyOfWindowPsl' :
|
|
|
|
|
$maintainerTimer.start()
|
|
|
|
|
|
|
|
|
|
stepOperationIndex = stepOperationIndex + 1
|
|
|
|
|
$StepJudgment.hideError()
|
|
|
|
|
if stepOperationIndex < stepOperation.size():
|
|
|
|
|
setOperationNodeAndTip()
|
|
|
|
|
elif $total.currentClickNode != 'interconnectedCloseButton' and $total.currentClickNode != 'removeHSJCKeyOfWindowPsl' :
|
|
|
|
|
$TrainTip.setTrainingTip('')
|
|
|
|
|
nextStep()
|
|
|
|
|
else :
|
|
|
|
|
$TrainTip.setTrainingTip('')
|
|
|
|
|
else:
|
|
|
|
|
if $total.trainingMode != TotalScene.Training_Mode.Exam:
|
|
|
|
|
$StepJudgment.showError()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##开门信号
|
|
|
|
|
func _on_total_screen_door_open_confirm_signal(screenDoor):
|
|
|
|
|
if screenDoor.name == "screenDoor1" :
|
|
|
|
|
$CloseScreenDoorTimer.start()
|
|
|
|
|
|
|
|
|
|
##关门信号
|
|
|
|
|
func _on_total_train_door_close_confirm_signal(trainDoor: TrainDoor) -> void:
|
|
|
|
|
if trainDoor.name == "trainDoor1" :
|
|
|
|
|
nextStep()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_close_screen_door_timer_timeout() -> void:
|
|
|
|
|
$FaultTipDialog.show()
|
|
|
|
|
var sound = load('res://Assets/training_speech/trainingTotalPlatformDoorFault/zlztmgmgz.mp3')
|
|
|
|
|
await $VoiceCommunication.play_reply(sound)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_fault_tip_dialog_comfirm_signal() -> void:
|
|
|
|
|
nextStep()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_fault_tip_dialog_close_requested() -> void:
|
|
|
|
|
$FaultTipDialog.hide()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_maintainer_timer_timeout() -> void:
|
|
|
|
|
nextStep()
|
|
|
|
|
$FaultTipDialog.show()
|
|
|
|
|
$FaultTipDialog.updateSceneDesc('故障门已修复')
|
2024-05-29 17:18:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_confirm_dialog_two_cancel():
|
|
|
|
|
get_tree().paused = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_confirm_dialog_two_confirm():
|
|
|
|
|
get_tree().paused = false
|
|
|
|
|
get_tree().reload_current_scene()
|