fix: 修复吃理智药在网络波动时可能产生重复使用的错误 (#7190)

close #7187

---------

Co-authored-by: zzyyyl <74587068+zzyyyl@users.noreply.github.com>
This commit is contained in:
status102
2023-11-07 23:55:10 +08:00
committed by GitHub
parent 9a66a05e73
commit 5fb4d0d3c0
2 changed files with 36 additions and 4 deletions

View File

@@ -4285,12 +4285,44 @@
150
],
"cache": false,
"postDelay": 1000,
"postDelay": 500,
"reduceOtherTimes": [
"MedicineNotConfirmed*5"
],
"next": [
"MedicineConfirm@LoadingText",
"MedicineConfirmed",
"MedicineNotConfirmed"
]
},
"MedicineConfirm@LoadingText": {
"next": [
"#self",
"Stop"
"MedicineConfirmed"
]
},
"MedicineNotConfirmed": {
"baseTask": "MedicineConfirm",
"template": "MedicineConfirm.png",
"action": "DoNothing",
"reduceOtherTimes": [],
"maxTimes": 5,
"postDelay": 1000,
"exceededNext": [
"MedicineNotConfirmed@LoadingText",
"MedicineConfirmed",
"MedicineConfirm"
]
},
"MedicineConfirmed": {
"baseTask": "StartButton1",
"action": "Stop",
"preDelay": 0,
"postDelay": 0,
"exceededNext": [],
"reduceOtherTimes": [],
"next": []
},
"MedicineReduceIcon": {
"preDelay": 500,
"roi": [
@@ -15966,4 +15998,4 @@
"Stop"
]
}
}
}

View File

@@ -102,7 +102,7 @@ bool asst::MedicineCounterPlugin::_run()
}
}
ProcessTask(*this, { "MedicineConfirm" }).run();
ProcessTask(*this, { "MedicineConfirm" }).set_retry_times(5).run();
auto info = basic_info_with_what("UseMedicine");
info["details"]["is_expiring"] = m_using_count > m_max_count;