fix(tutorials): prevent crew training from reopening or trapping input
Record completion after the guided crew upgrade succeeds. Keep the guide dismissible and close it when its slot or menu target disappears. Compile the affected scripts with the stock queue flag bindings.
This commit is contained in:
1 parent
0c9340f883
commit
0881d62766
25 files changed
+169
-9
No files matched your search
@@ -0,0 +1,4 @@
|
||||
gui_modal_tutor(steps, this)
|
||||
}
|
||||
|
||||
function canUpgradeCrewSpec(upgCrew) {
|
||||
@@ -0,0 +1,3 @@
|
||||
this.afterApplyAction = this.canUpgradeCrewSpec(this.crew) ? this.onUpgrCrewSpec1Tutorial
|
||||
: this.onUpgrCrewTutorFinalStep
|
||||
this.onApply() }, this)
|
||||
@@ -0,0 +1 @@
|
||||
from "%scripts/clientState/localProfileDeprecated.nut" import loadLocalByAccount, saveLocalByAccount
|
||||
@@ -0,0 +1,28 @@
|
||||
// Save the per-account completion flag from the existing successful upgrade callback.
|
||||
{
|
||||
"id": "tutorials/save-crew-training-completion",
|
||||
"title": "Save completion after the guided crew upgrade",
|
||||
"features": [
|
||||
"A-Tutorials"
|
||||
],
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"file": "scripts/crew/crewwndhandler.nut",
|
||||
"edits": [
|
||||
{
|
||||
"find": "find-imports.nut",
|
||||
"replace": "replace-imports.nut"
|
||||
},
|
||||
{
|
||||
"find": "find-completion.nut",
|
||||
"replace": "replace-completion.nut"
|
||||
},
|
||||
{
|
||||
"find": "find-allow-close.nut",
|
||||
"replace": "replace-allow-close.nut"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
gui_modal_tutor(steps, this, true)
|
||||
}
|
||||
|
||||
function canUpgradeCrewSpec(upgCrew) {
|
||||
@@ -0,0 +1,8 @@
|
||||
let nextStep = this.canUpgradeCrewSpec(this.crew) ? this.onUpgrCrewSpec1Tutorial
|
||||
: this.onUpgrCrewTutorFinalStep
|
||||
this.afterApplyAction = function() {
|
||||
saveLocalByAccount("tutor/upgradeCrewSkills", true, @() save_profile(false))
|
||||
nextStep.call(this)
|
||||
}
|
||||
this.onApply()
|
||||
}, this)
|
||||
@@ -0,0 +1,2 @@
|
||||
from "%scripts/clientState/localProfileDeprecated.nut" import loadLocalByAccount, saveLocalByAccount
|
||||
from "chard" import save_profile
|
||||
Reference in new issue
Block a user