Loading files
54d761463This file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/stack-chan-374381865.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
54d761463This file is pinned to the selected release. Download the original to open it in your design tool.
import { writeCount } from 'flash'
import startModManager from 'mod-manager'
import type { Container as PiuContainer } from 'piu/MC'
import { Application } from 'piu/MC'
import { equal } from 'testing/assert'
import Timer from 'timer'
const press = (button: PiuContainer) => {
const behavior = button.behavior as {
onTouchBegan(button: PiuContainer, id: number, x: number, y: number): void
onTouchEnded(button: PiuContainer): void
}
behavior.onTouchBegan(button, 0, 0, 0)
behavior.onTouchEnded(button)
}
const application = new Application(null, { touchCount: 1 })
let restarts = 0
startModManager(application, () => {
restarts += 1
})
const list = application.first as PiuContainer
const scroller = list.first?.next as PiuContainer
press((scroller.first as PiuContainer).first as PiuContainer)
press((application.first as PiuContainer).last as PiuContainer)
Timer.set(() => {
equal(writeCount(), 1, 'confirmed XSA should be written once')
equal(restarts, 1, 'verified XSA should restart the host')
trace('ok\n')
}, 10)