sensorBlocks.testSuite
README.md
sensorBlocks (test suite)
Checks sensorBlocks as a game uses it: all 33 sensor blocks pass styleKit's block rules, all 22 sensor looks name only installed blocks, Sensors.use lays a look as local styleKit entries on this machine without touching the synced stack and Sensors.off takes them back, Sensors.use with shared = true puts the look on the synced stack and Sensors.off({ shared = true }) removes only the sensor blocks (a softGrain entry from starterBlocks stays), pings are listed by Sensors.pulses with an age that grows and never jumps, flashes at the camera blind night vision with no more than three new washes a second (read through Sensors.status().blind over frames), and the x-ray passes run while xraySciFi is local.
The suite saves the synced stack and this machine's sensor look and puts both back. It leaves the blocks' pictures (what thermal or night vision looks like) to the Lookbook and to visual review.
Run: asset.resolve("sensorBlocks", "testSuite"):run().
Known limits
- Runs in edit mode with a drawn view: the flash, x-ray and frame checks need
Sensors.frame, which the sensorField render feature calls each frame. - The flash test aims at the camera position from
renderer.mainCameraView; a camera moving fast while it runs can move the numbers. - The shared test writes the synced StyleStack, so other players see night vision for a moment while it runs.
- "a ping's age is monotonic" fails on sensorBlocks 1.0.0:
now()inSensors.module/init.luauaddstime.realtime() % 1toos.time(), whose seconds do not tick together, so an age jumps by about a second once a second.