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 toBattleTutor() {
|
||||
@@ -0,0 +1,5 @@
|
||||
function checkUpgradeCrewTutorial() {
|
||||
if (!isLoggedIn.get())
|
||||
return
|
||||
|
||||
if (!isAllCrewsMinLevel())
|
||||
@@ -0,0 +1 @@
|
||||
from "%scripts/user/newbieTutorialDisplay.nut" import needShowTutorial, reqFirstCountryChoice, saveShowedTutorial
|
||||
@@ -0,0 +1,2 @@
|
||||
obj = [@() curSlotExtraInfoObj.findObject("openCrewWnd")]
|
||||
text = loc("tutorials/upg_crew/select_crew")
|
||||
@@ -0,0 +1,2 @@
|
||||
obj = [curSlotExtraInfoObj]
|
||||
text = " ".concat(loc("tutorials/upg_crew/skill_points_info"), loc("tutorials/upg_crew/press_to_crew"))
|
||||
@@ -0,0 +1,2 @@
|
||||
local curSlotExtraInfoObj = curSlotObj.findObject("extra_info_content")
|
||||
if (!curSlotExtraInfoObj)
|
||||
@@ -0,0 +1,40 @@
|
||||
// The crew skill guide may be entered from the hangar while menus are reopening.
|
||||
{
|
||||
"id": "tutorials/guard-crew-training-intro",
|
||||
"title": "Keep the crew skill guide from reopening",
|
||||
"features": [
|
||||
"A-Tutorials"
|
||||
],
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"file": "scripts/mainmenu/instantactionhandler.nut",
|
||||
"edits": [
|
||||
{
|
||||
"find": "find-imports.nut",
|
||||
"replace": "replace-imports.nut"
|
||||
},
|
||||
{
|
||||
"find": "find-entry.nut",
|
||||
"replace": "replace-entry.nut"
|
||||
},
|
||||
{
|
||||
"find": "find-slot.nut",
|
||||
"replace": "replace-slot.nut"
|
||||
},
|
||||
{
|
||||
"find": "find-slot-step.nut",
|
||||
"replace": "replace-slot-step.nut"
|
||||
},
|
||||
{
|
||||
"find": "find-menu-step.nut",
|
||||
"replace": "replace-menu-step.nut"
|
||||
},
|
||||
{
|
||||
"find": "find-allow-close.nut",
|
||||
"replace": "replace-allow-close.nut"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
gui_modal_tutor(steps, this, true)
|
||||
}
|
||||
|
||||
function toBattleTutor() {
|
||||
@@ -0,0 +1,5 @@
|
||||
function checkUpgradeCrewTutorial() {
|
||||
if (!isLoggedIn.get() || this.guiScene.hasModalObject())
|
||||
return
|
||||
|
||||
if (loadLocalByAccount("tutor/upgradeCrewSkills", false) || !isAllCrewsMinLevel())
|
||||
@@ -0,0 +1,2 @@
|
||||
from "%scripts/user/newbieTutorialDisplay.nut" import needShowTutorial, reqFirstCountryChoice, saveShowedTutorial
|
||||
from "%scripts/clientState/localProfileDeprecated.nut" import loadLocalByAccount
|
||||
@@ -0,0 +1,3 @@
|
||||
obj = [@() checkObj(curSlotExtraInfoObj) ? curSlotExtraInfoObj.findObject("openCrewWnd") : null]
|
||||
cancelOnMissingTarget = true
|
||||
text = loc("tutorials/upg_crew/select_crew")
|
||||
@@ -0,0 +1,3 @@
|
||||
obj = [curSlotExtraInfoObj]
|
||||
cancelOnMissingTarget = true
|
||||
text = " ".concat(loc("tutorials/upg_crew/skill_points_info"), loc("tutorials/upg_crew/press_to_crew"))
|
||||
@@ -0,0 +1,2 @@
|
||||
local curSlotExtraInfoObj = curSlotObj.findObject("extra_info_content")
|
||||
if (!checkObj(curSlotExtraInfoObj))
|
||||
Reference in new issue
Block a user