Remove setImmediate

main
Ashelyn Rose 8 months ago
parent a2451e4184
commit 37b2113c8c

@ -49,7 +49,7 @@ export default function Text({promptVisible: promptEnabled, handleCommand, showR
}
if(outputRef.current) {
setImmediate(() => outputRef.current.scrollTop = outputRef.current.scrollHeight)
setTimeout(() => outputRef.current.scrollTop = outputRef.current.scrollHeight, 0)
setCurrentScroll(outputRef.current.scrollHeight)
}
}
@ -100,7 +100,7 @@ export default function Text({promptVisible: promptEnabled, handleCommand, showR
// Scroll after unpaused
useEffect(() => {
setImmediate(() => outputRef.current.scrollTop = outputRef.current.scrollHeight)
setTimeout(() => outputRef.current.scrollTop = outputRef.current.scrollHeight, 0)
setCurrentScroll(outputRef.current.scrollHeight)
}, [currentPause])

@ -43,6 +43,6 @@ hints.set(Phase.returnedUpToBathroom, 'Someone locked the comms room locker. Th
hints.set(Phase.hasKey, `You've retrieved the spare key to the comms locker, and can finally get the capacitor to repair the mainframe.`)
hints.set(Phase.unlockedLocker, 'Locker is empty - whoever was in your ship made sure you wouldn\'t be able to repair it.')
setImmediate(() => {
setTimeout(() => {
game.createProperty('gamePhase', Phase.wakeUp)
})
}, 0)

@ -393,7 +393,7 @@ rules.onBeforeCommand(command => {
if(game.getProperty('gamePhase') === Phase.hasKey) {
renderer.endGame()
setImmediate(() => rules.emit('gameEnd'))
setTimeout(() => rules.emit('gameEnd'), 0)
throw new Error()
}

Loading…
Cancel
Save