Skip to content

Commit 17fe4b4

Browse files
committed
Revert "fix: preloading char confirmation"
This reverts commit e8616ae.
1 parent 7c1166a commit 17fe4b4

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

external/script/start.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,6 +3514,24 @@ function start.f_selectMenu(side, cmd, player, member, selectState)
35143514
end
35153515
-- cell selected or select screen timer reached 0
35163516
local canConfirm = (slotSelected and start.f_selGrid(start.c[player].cell + 1).char ~= nil and start.f_selGrid(start.c[player].cell + 1).hidden ~= 2) or timerExpired
3517+
if canConfirm then
3518+
local preloadReady = true
3519+
if start.c[player].selRef ~= nil then
3520+
local state = getCharPreloadStatus(start.c[player].selRef)
3521+
preloadReady = state == 'ready'
3522+
if not preloadReady then
3523+
main.f_preloadBoostChar(start.c[player].selRef)
3524+
else
3525+
main.f_materializeCharByRef(start.c[player].selRef)
3526+
end
3527+
end
3528+
if not preloadReady then
3529+
if slotSelected then
3530+
sndPlay(motif.Snd, motif.select_info.cancel.snd[1], motif.select_info.cancel.snd[2])
3531+
end
3532+
canConfirm = false
3533+
end
3534+
end
35173535
if canConfirm then
35183536
if motif.select_info.paletteselect ~= 0 then
35193537
timerSelect = motif.select_info.timer.displaytime

0 commit comments

Comments
 (0)