Orbi-Fax: secret page 1000, open only after Orbi-Raiders Story mode
Page 1000 shows Paul's exact text: "CONGRATULATIONS, YOUNG TRAVELLER. / YOU HAVE REACHED THE END OF TELETEXT. / THERE IS NOTHING HERE. / PLEASE GO OUTSIDE." It types out as 999 does (all at once with Reduce motion), and Back returns to the page before. - It opens only for a profile whose own Arcade save says Story mode is complete, read through StoryProgress -> ArcadeProgress.isStoryComplete. - ArcadeProgress is a stub returning false until the Arcade's own lands. - Orbi-Fax never writes Arcade data. No profile, a Kids profile without the Arcade, or any failure reading the save means locked. - Locked, there's no trace: three-digit picker and keys, no index entry, 999 unchanged. - Unlocked, the picker gains a fourth digit and the keys can reach 1000. - Adds 8 tests, the P1000 concept preview, and the generator writing four-digit page numbers in the header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package tv.orbit.classic
|
||||
|
||||
/**
|
||||
* Stub of the Arcade's progress API, agreed with the Arcade thread (8 November 2026). The real one reads the
|
||||
* orbiRaiders.storyComplete flag and its date from the profile's save, filesDir/arcade/<profile>.json, in ArcadeStore.
|
||||
* Until that lands, nobody has finished Story mode. When the Arcade's version merges, it replaces this file.
|
||||
*/
|
||||
internal object ArcadeProgress {
|
||||
fun isStoryComplete(profileId: String): Boolean = false
|
||||
}
|
||||
@@ -4,6 +4,8 @@ package tv.orbit.classic
|
||||
internal const val ORBI_FAX_CHANNEL = 0
|
||||
internal const val ORBI_FAX_INDEX = 100
|
||||
internal const val ORBI_FAX_WIZARD_PAGE = 999
|
||||
/** The secret page past the wizard (Paul, 8 November 2026): only for a profile that has finished Orbi-Raiders Story mode. */
|
||||
internal const val ORBI_FAX_SECRET_PAGE = 1000
|
||||
/** The Fastext row's three page links (red, green, yellow); the fourth place (cyan) is "Go to page". */
|
||||
internal const val ORBI_FAX_LINKS = 3
|
||||
/** In a page's choices, the "Go to page" link that opens the digit picker. */
|
||||
@@ -29,17 +31,39 @@ internal interface OrbiFaxBook {
|
||||
* [typed] holds number-key digits so far, [picker] the digit picker while it's open.
|
||||
*/
|
||||
internal data class OrbiFaxNav(val page: Int = ORBI_FAX_INDEX, val sub: Int = 0, val focus: Int = 0, val typed: String = "",
|
||||
val picker: ChannelEntry? = null) {
|
||||
val picker: ChannelEntry? = null,
|
||||
/** This profile has unlocked page 1000: the picker has a fourth digit and the number keys can reach it. Otherwise no trace. */
|
||||
val secret: Boolean = false,
|
||||
/** Where Back goes from page 1000: the page it was reached from. */
|
||||
val back: Int = ORBI_FAX_INDEX) {
|
||||
|
||||
fun go(number: Int) = OrbiFaxNav(page = if (number in 100..999) number else ORBI_FAX_INDEX)
|
||||
fun go(number: Int) = when {
|
||||
number in 100..999 -> OrbiFaxNav(page = number, secret = secret)
|
||||
number == ORBI_FAX_SECRET_PAGE && secret -> OrbiFaxNav(page = number, secret = true, back = page)
|
||||
else -> OrbiFaxNav(page = ORBI_FAX_INDEX, secret = secret)
|
||||
}
|
||||
|
||||
/** One digit from the number keys (or into the open picker): the third goes to the page. */
|
||||
/**
|
||||
* One digit from the number keys (or into the open picker): the third goes to the page. Only with the secret unlocked
|
||||
* does "100" wait a moment for a fourth digit ([settle] goes to 100 if none comes); locked, it's three digits as ever.
|
||||
*/
|
||||
fun digit(d: Int): OrbiFaxNav {
|
||||
picker?.let { p -> val next = p.type(d); return if (p.onLastSlot) go(next.number) else copy(picker = next) }
|
||||
val now = typed + digitText(d)
|
||||
return if (now.length == 3) go(now.toInt()) else copy(typed = now)
|
||||
return when {
|
||||
now.length == 3 && secret && now == "100" -> copy(typed = now)
|
||||
now.length >= 3 -> go(now.toInt())
|
||||
else -> copy(typed = now)
|
||||
}
|
||||
}
|
||||
|
||||
/** No fourth digit came after "100": go to 100. */
|
||||
fun settle() = if (typed.length == 3) go(typed.toInt()) else this
|
||||
|
||||
/** The picker starts on the page showing: three digits, or four once page 1000 is unlocked. */
|
||||
private fun pickerFrom(number: Int) =
|
||||
if (secret) ChannelEntry(number.coerceIn(0, ORBI_FAX_SECRET_PAGE).toString().padStart(4, '0').map { it - '0' }) else ChannelEntry.from(number)
|
||||
|
||||
/** A key; null means Back with nothing left to close, so Orbi-Fax hands back to the TV or the guide. */
|
||||
fun press(key: OrbiFaxKey, book: OrbiFaxBook): OrbiFaxNav? {
|
||||
picker?.let { p ->
|
||||
@@ -56,7 +80,11 @@ internal data class OrbiFaxNav(val page: Int = ORBI_FAX_INDEX, val sub: Int = 0,
|
||||
val choices = book.choices(page)
|
||||
val at = focus.coerceIn(0, (choices.size - 1).coerceAtLeast(0))
|
||||
return when (key) {
|
||||
OrbiFaxKey.Back -> if (typed.isNotEmpty()) copy(typed = "") else null
|
||||
OrbiFaxKey.Back -> when {
|
||||
typed.isNotEmpty() -> copy(typed = "")
|
||||
page == ORBI_FAX_SECRET_PAGE -> go(back)
|
||||
else -> null
|
||||
}
|
||||
OrbiFaxKey.Up -> copy(focus = (at - 1).coerceAtLeast(0), typed = "")
|
||||
OrbiFaxKey.Down -> copy(focus = (at + 1).coerceAtMost((choices.size - 1).coerceAtLeast(0)), typed = "")
|
||||
OrbiFaxKey.Ok -> choices.getOrNull(at)?.let { open(it) } ?: this
|
||||
@@ -71,7 +99,7 @@ internal data class OrbiFaxNav(val page: Int = ORBI_FAX_INDEX, val sub: Int = 0,
|
||||
}
|
||||
}
|
||||
|
||||
private fun open(choice: Int) = if (choice == ORBI_FAX_GO_TO) copy(picker = ChannelEntry.from(page), typed = "") else go(choice)
|
||||
private fun open(choice: Int) = if (choice == ORBI_FAX_GO_TO) copy(picker = pickerFrom(page), typed = "") else go(choice)
|
||||
|
||||
/** Left/Right: the next or previous sub-page while there are some, then the next or previous page. */
|
||||
private fun turn(book: OrbiFaxBook, direction: Int): OrbiFaxNav {
|
||||
|
||||
@@ -25,7 +25,9 @@ internal data class OrbiFaxRecord(val game: String, val colour: Int, val best: S
|
||||
* profile isn't allowed; an empty one is a page with nothing on it yet. Text is already in the glyph set.
|
||||
*/
|
||||
internal data class OrbiFaxData(val channels: List<OrbiFaxChannel>, val highlights: List<OrbiFaxHighlight>, val driveIn: List<OrbiFaxBill>?,
|
||||
val arrivals: List<OrbiFaxArrival>?, val records: List<OrbiFaxRecord>?, val kids: Boolean)
|
||||
val arrivals: List<OrbiFaxArrival>?, val records: List<OrbiFaxRecord>?, val kids: Boolean,
|
||||
/** The profile watching has finished Orbi-Raiders Story mode, so page 1000 opens for it. Never shown anywhere. */
|
||||
val secret: Boolean = false)
|
||||
|
||||
internal const val ORBI_FAX_NOW_NEXT = 500
|
||||
internal const val ORBI_FAX_LISTINGS = 501
|
||||
@@ -42,6 +44,11 @@ private const val LISTING_ROWS = 17
|
||||
internal const val ORBI_FAX_WARNING = "You have gone too far, young traveller. Return at once!"
|
||||
private val WarningLines = arrayOf("You have gone", "too far, young", "traveller.", "Return at once!")
|
||||
|
||||
/** Page 1000's message, exactly as Paul wrote it (8 November 2026), one line each. */
|
||||
internal val ORBI_FAX_SECRET_LINES = arrayOf("CONGRATULATIONS, YOUNG TRAVELLER.", "YOU HAVE REACHED THE END OF TELETEXT.",
|
||||
"THERE IS NOTHING HERE.", "PLEASE GO OUTSIDE.")
|
||||
internal val ORBI_FAX_SECRET_LENGTH = ORBI_FAX_SECRET_LINES.sumOf { it.length }
|
||||
|
||||
/** The pages that will come later: shown greyed on the index and as their own "coming later" page. */
|
||||
internal val OrbiFaxLater = linkedMapOf(101 to "News", 300 to "Sport", 400 to "Weather", 800 to "House and Rooms")
|
||||
|
||||
@@ -98,6 +105,7 @@ internal class OrbiFaxPages(val data: OrbiFaxData) : OrbiFaxBook {
|
||||
page == ORBI_FAX_ARRIVALS -> arrivals(out, s)
|
||||
page == ORBI_FAX_ARCADE -> arcade(out)
|
||||
page == ORBI_FAX_WIZARD_PAGE -> wizard(out, reveal)
|
||||
page == ORBI_FAX_SECRET_PAGE && data.secret -> secret(out, reveal)
|
||||
else -> missing(out, page)
|
||||
}
|
||||
if (subPages(page) > 1) subIndicator(out, s + 1, subPages(page))
|
||||
@@ -106,13 +114,13 @@ internal class OrbiFaxPages(val data: OrbiFaxData) : OrbiFaxBook {
|
||||
/** Row 0: page number, ORBI-FAX, what's being keyed (or the page), date and clock. */
|
||||
fun header(out: TeletextPage, nav: OrbiFaxNav, nowMs: Long, zone: ZoneId) {
|
||||
out.clearRow(0)
|
||||
out.put(0, 0, "P"); out.putNumber(0, 3, nav.page)
|
||||
out.put(0, 0, "P"); out.putNumber(0, if (nav.page >= 1000) 4 else 3, nav.page)
|
||||
out.put(0, 5, " ORBI-FAX ", YELLOW, BLUE)
|
||||
val picker = nav.picker
|
||||
when {
|
||||
picker != null -> for (i in 0 until 3) {
|
||||
picker != null -> for (i in picker.digits.indices) {
|
||||
val focused = i == picker.slot
|
||||
out.put(0, 16 + i, digitText(picker.digits[i]), if (focused) BLACK else YELLOW, if (focused) YELLOW else BLACK)
|
||||
out.put(0, 19 - picker.digits.size + i, digitText(picker.digits[i]), if (focused) BLACK else YELLOW, if (focused) YELLOW else BLACK)
|
||||
}
|
||||
nav.typed.isNotEmpty() -> { out.put(0, 16, nav.typed, YELLOW); for (i in nav.typed.length until 3) out.put(0, 16 + i, "-", YELLOW) }
|
||||
else -> out.putNumber(0, 18, nav.page)
|
||||
@@ -270,6 +278,21 @@ internal class OrbiFaxPages(val data: OrbiFaxData) : OrbiFaxBook {
|
||||
out.put(22, 1, "P999 The wizard's corner", MAGENTA)
|
||||
}
|
||||
|
||||
/** Page 1000: the end of teletext. Types out as 999's warning does, all at once with Reduce motion. */
|
||||
private fun secret(out: TeletextPage, reveal: Int) {
|
||||
out.rule(2, CYAN)
|
||||
var left = reveal
|
||||
ORBI_FAX_SECRET_LINES.forEachIndexed { i, line ->
|
||||
if (left <= 0) return@forEachIndexed
|
||||
val shown = if (left >= line.length) line else line.substring(0, left)
|
||||
val colour = when (i) { 0 -> YELLOW; ORBI_FAX_SECRET_LINES.lastIndex -> GREEN; else -> WHITE }
|
||||
out.put(5 + i * 4, (Teletext.COLS - line.length) / 2, shown, colour, double = true)
|
||||
left -= line.length
|
||||
}
|
||||
out.rule(21, CYAN, bits = 0b000011)
|
||||
out.rule(23, GREEN, bits = 0b111100)
|
||||
}
|
||||
|
||||
private fun missing(out: TeletextPage, page: Int) {
|
||||
title(out, "PAGE $page")
|
||||
out.rule(4, YELLOW)
|
||||
|
||||
@@ -66,13 +66,28 @@ private val MarginFocus = Color(0xFFFFDE59)
|
||||
private val MarginMuted = Color(0xFFB7CBE8)
|
||||
private val MarginOrange = Color(0xFFF7A928)
|
||||
|
||||
/** Whether a profile has finished Orbi-Raiders Story mode. Orbi-Fax only ever reads this; it never writes Arcade data. */
|
||||
internal fun interface StoryProgress { fun storyComplete(profileId: String): Boolean }
|
||||
|
||||
/** The real answer, from the Arcade's own save for that profile. */
|
||||
internal val ArcadeStoryProgress = StoryProgress { ArcadeProgress.isStoryComplete(it) }
|
||||
|
||||
/**
|
||||
* Page 1000 is open for [profile] only when its own Arcade save says Story mode is complete. No profile, a Kids profile
|
||||
* without the Arcade, or any failure reading the save (missing, unreadable, no flag) means locked.
|
||||
*/
|
||||
internal fun orbiFaxSecret(profile: Profile?, progress: StoryProgress): Boolean {
|
||||
if (profile == null || (profile.kind == ProfileKind.Kids && !profile.arcade)) return false
|
||||
return runCatching { progress.storyComplete(profile.id) }.getOrDefault(false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads what Orbi-Fax shows from Orbit's own records, for the profile watching. [channels] and [plans] come already
|
||||
* filtered by the After Dark lock and the profile; Kids also never sees After Dark or the late show here, whatever is ticked.
|
||||
*/
|
||||
internal fun orbiFaxData(channels: List<SampleChannel>, plans: Map<Int, ChannelPlan>, driveIn: ChannelPlan?, arrivals: () -> List<Arrival>,
|
||||
records: List<OrbiFaxRecord>, profile: Profile?, nowMs: Long, zone: ZoneId = ZoneId.systemDefault(),
|
||||
shows: Int = LISTED_SHOWS, pause: () -> Unit = {}): OrbiFaxData {
|
||||
shows: Int = LISTED_SHOWS, pause: () -> Unit = {}, progress: StoryProgress = ArcadeStoryProgress): OrbiFaxData {
|
||||
val kids = profile?.kind == ProfileKind.Kids
|
||||
fun kidsMayNotSee(number: Int) = kids && (number == AFTER_DARK_NUMBER || number in LockedChannels)
|
||||
val shown = channels.filterNot { lockedOut(it.number) || profileHides(it.number, profile) || kidsMayNotSee(it.number) }.sortedBy { it.number }
|
||||
@@ -103,7 +118,7 @@ internal fun orbiFaxData(channels: List<SampleChannel>, plans: Map<Int, ChannelP
|
||||
val newArrivals = if (kids) null else runCatching(arrivals).getOrDefault(emptyList())
|
||||
.filter { it.firstSeenMs >= nowMs - NEW_TO_LIBRARY_DAYS * 24 * 60 * 60_000L }.sortedByDescending { it.firstSeenMs }.take(ARRIVALS_SHOWN)
|
||||
.map { OrbiFaxArrival(teletextText(it.title + (it.year?.let { y -> " ($y)" } ?: "")), teletextText(it.type)) }
|
||||
return OrbiFaxData(listed, highlights, bills, newArrivals, records.takeUnless { kids && profile?.arcade == false }, kids)
|
||||
return OrbiFaxData(listed, highlights, bills, newArrivals, records.takeUnless { kids && profile?.arcade == false }, kids, orbiFaxSecret(profile, progress))
|
||||
}
|
||||
|
||||
/** The Arcade's records as kept today: one best per game on this TV, read from its settings. */
|
||||
@@ -154,10 +169,15 @@ internal fun OrbiFaxScreen(load: (shows: Int, pause: () -> Unit) -> OrbiFaxData,
|
||||
var nowMs by remember { mutableLongStateOf(System.currentTimeMillis()) }
|
||||
LaunchedEffect(Unit) { while (true) { delay(1_000 - System.currentTimeMillis() % 1_000); nowMs = System.currentTimeMillis() } }
|
||||
// The wizard's warning types itself out, unless Reduce motion is on.
|
||||
// Page 1000's message does the same.
|
||||
var reveal by remember(nav.page) { mutableIntStateOf(if (reduce) Int.MAX_VALUE else 0) }
|
||||
LaunchedEffect(nav.page, reduce) {
|
||||
if (nav.page == ORBI_FAX_WIZARD_PAGE && !reduce) while (reveal < ORBI_FAX_WARNING.length) { delay(70); reveal++ }
|
||||
val length = when (nav.page) { ORBI_FAX_WIZARD_PAGE -> ORBI_FAX_WARNING.length; ORBI_FAX_SECRET_PAGE -> ORBI_FAX_SECRET_LENGTH; else -> 0 }
|
||||
if (!reduce) while (reveal < length) { delay(70); reveal++ }
|
||||
}
|
||||
// The profile's own unlock, kept on the navigation; "100" keyed with it unlocked waits a moment for a fourth digit.
|
||||
LaunchedEffect(book) { book?.data?.secret?.let { s -> if (nav.secret != s) nav = if (!s && nav.page == ORBI_FAX_SECRET_PAGE) OrbiFaxNav() else nav.copy(secret = s) } }
|
||||
LaunchedEffect(nav.typed) { if (nav.typed.length == 3) { delay(1_500); nav = nav.settle() } }
|
||||
LaunchedEffect(nav, book, reduce) {
|
||||
val b = book ?: return@LaunchedEffect
|
||||
if (!reduce && b.subPages(nav.page) > 1) { delay(ORBI_FAX_CAROUSEL_MS); nav = nav.carousel(b) }
|
||||
|
||||
@@ -232,4 +232,88 @@ class OrbiFaxTest {
|
||||
val page = built(OrbiFaxPages(data().copy(records = records)), ORBI_FAX_ARCADE)
|
||||
assertTrue(page.rowText(5).startsWith(" STAR CHASE")); assertTrue(page.rowText(5).trimEnd().endsWith("12,480"))
|
||||
}
|
||||
|
||||
// ---- page 1000, the secret past the wizard ----
|
||||
|
||||
private val adultA = Profile("a", "Paul", "ollie", ProfileKind.Grown)
|
||||
private val adultB = Profile("b", "Guest", "zip", ProfileKind.Grown)
|
||||
|
||||
@Test fun lockedThereIsNoWayToPage1000AndNoHint() {
|
||||
val book = OrbiFaxPages(data())
|
||||
val keyed = OrbiFaxNav().digit(1).digit(0).digit(0).digit(0)
|
||||
assertEquals(100, keyed.page); assertEquals("0", keyed.typed) // three digits, as ever
|
||||
assertEquals(3, OrbiFaxNav().press(OrbiFaxKey.Cyan, book)!!.picker!!.digits.size)
|
||||
assertEquals(ORBI_FAX_INDEX, OrbiFaxNav().go(ORBI_FAX_SECRET_PAGE).page)
|
||||
assertFalse(ORBI_FAX_SECRET_PAGE in book.pages); assertFalse(ORBI_FAX_SECRET_PAGE in book.choices(100))
|
||||
assertFalse((0 until 25).any { built(book, 100).rowText(it).contains("1000") })
|
||||
assertFalse((0 until 25).any { built(book, 999).rowText(it).contains("1000") })
|
||||
}
|
||||
|
||||
@Test fun unlockedTheNumberKeysAndAFourDigitPickerReachIt() {
|
||||
val book = OrbiFaxPages(data().copy(secret = true))
|
||||
val waiting = OrbiFaxNav(secret = true).digit(1).digit(0).digit(0)
|
||||
assertEquals("100", waiting.typed) // waits a moment for a fourth digit
|
||||
assertEquals(ORBI_FAX_SECRET_PAGE, waiting.digit(0).page)
|
||||
assertEquals(100, waiting.settle().page) // none came: page 100
|
||||
assertEquals(510, OrbiFaxNav(secret = true).digit(5).digit(1).digit(0).page)
|
||||
var nav = OrbiFaxNav(secret = true).press(OrbiFaxKey.Cyan, book)!!
|
||||
assertEquals(listOf(0, 1, 0, 0), nav.picker!!.digits)
|
||||
nav = nav.press(OrbiFaxKey.Up, book)!!.press(OrbiFaxKey.Right, book)!!.press(OrbiFaxKey.Down, book)!!
|
||||
assertEquals(listOf(1, 0, 0, 0), nav.picker!!.digits)
|
||||
assertEquals(ORBI_FAX_SECRET_PAGE, nav.press(OrbiFaxKey.Ok, book)!!.page)
|
||||
assertFalse(ORBI_FAX_SECRET_PAGE in book.pages); assertFalse(ORBI_FAX_SECRET_PAGE in book.choices(100)) // still no index entry
|
||||
}
|
||||
|
||||
@Test fun backFromPage1000ReturnsToThePageBefore() {
|
||||
val book = OrbiFaxPages(data().copy(secret = true))
|
||||
val there = OrbiFaxNav(page = 700, secret = true).go(ORBI_FAX_SECRET_PAGE)
|
||||
assertEquals(700, there.back)
|
||||
val back = there.press(OrbiFaxKey.Back, book)!!
|
||||
assertEquals(700, back.page); assertTrue(back.secret)
|
||||
assertNull(back.press(OrbiFaxKey.Back, book)) // and from there, back to the TV
|
||||
}
|
||||
|
||||
@Test fun page1000SaysExactlyWhatPaulWroteAndTypesItOut() {
|
||||
val book = OrbiFaxPages(data().copy(secret = true))
|
||||
val nav = OrbiFaxNav(secret = true).go(ORBI_FAX_SECRET_PAGE)
|
||||
val page = built(book, ORBI_FAX_SECRET_PAGE, nav = nav)
|
||||
assertTrue(page.rowText(0).startsWith("P1000 ORBI-FAX 1000"))
|
||||
assertEquals(listOf("CONGRATULATIONS, YOUNG TRAVELLER.", "YOU HAVE REACHED THE END OF TELETEXT.", "THERE IS NOTHING HERE.", "PLEASE GO OUTSIDE."),
|
||||
listOf(5, 9, 13, 17).map { page.rowText(it).trim() })
|
||||
val typing = TeletextPage().also { book.build(it, ORBI_FAX_SECRET_PAGE, 0, now, zone, reveal = 41) }
|
||||
assertEquals("CONGRATULATIONS, YOUNG TRAVELLER.", typing.rowText(5).trim())
|
||||
assertEquals("YOU HAVE", typing.rowText(9).trim())
|
||||
assertEquals("", typing.rowText(13).trim())
|
||||
// Locked, the same number is just a page that isn't there.
|
||||
assertTrue(built(OrbiFaxPages(data()), ORBI_FAX_SECRET_PAGE).rowText(6).contains("no page 1000"))
|
||||
}
|
||||
|
||||
@Test fun theUnlockIsEachProfilesOwn() {
|
||||
val done = StoryProgress { it == "a" }
|
||||
assertTrue(orbiFaxSecret(adultA, done)); assertFalse(orbiFaxSecret(adultB, done))
|
||||
val d = orbiFaxData(emptyList(), emptyMap(), null, { emptyList() }, OrbiFaxPages.records(0, 0, 0, 0, 0, 0, 0, 0), adultA, now, zone, progress = done)
|
||||
assertTrue(d.secret)
|
||||
assertFalse(orbiFaxData(emptyList(), emptyMap(), null, { emptyList() }, OrbiFaxPages.records(0, 0, 0, 0, 0, 0, 0, 0), adultB, now, zone, progress = done).secret)
|
||||
}
|
||||
|
||||
@Test fun kidsUnlockItOnlyWithTheArcadeAllowed() {
|
||||
val all = StoryProgress { true }
|
||||
assertTrue(orbiFaxSecret(Profile("k", "Kids", "ollie", ProfileKind.Kids, arcade = true), all))
|
||||
assertFalse(orbiFaxSecret(Profile("k", "Kids", "ollie", ProfileKind.Kids, arcade = false), all))
|
||||
}
|
||||
|
||||
@Test fun aMissingOrUnreadableSaveMeansLocked() {
|
||||
assertFalse(orbiFaxSecret(adultA, StoryProgress { false })) // no file, or no flag
|
||||
assertFalse(orbiFaxSecret(adultA, StoryProgress { throw org.json.JSONException("bad") })) // a file that won't parse
|
||||
assertFalse(orbiFaxSecret(adultA, StoryProgress { throw java.io.IOException("gone") }))
|
||||
assertFalse(orbiFaxSecret(null, StoryProgress { true })) // no profile at all
|
||||
assertFalse(ArcadeProgress.isStoryComplete("a")) // the stub, until the Arcade's lands
|
||||
}
|
||||
|
||||
@Test fun page999IsTheSameForEveryoneLockedOrNot() {
|
||||
val locked = built(OrbiFaxPages(data()), 999)
|
||||
val unlocked = built(OrbiFaxPages(data().copy(secret = true)), 999, nav = OrbiFaxNav(page = 999, secret = true))
|
||||
for (r in 1 until 24) assertEquals("row $r", locked.rowText(r), unlocked.rowText(r))
|
||||
assertEquals(ORBI_FAX_WARNING, listOf(3, 5, 7, 9).joinToString(" ") { unlocked.rowText(it).substring(21).trim() })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,3 +95,10 @@ All three come from `build-orbi-fax-extras.py`, and `render.sh` builds them with
|
||||
- **Not built:** these three are concepts only. Stage 1 builds the guide's Text entry, but not the weather or sports choices.
|
||||
|
||||
Stage 1 itself (the app code) is on the `orbi-fax-stage1` branch. See `docs/orbi-fax-stage1.md`.
|
||||
|
||||
## P1000, the secret page (8 November 2026)
|
||||
|
||||
- **Preview:** `orbi-fax-p1000-secret.png` (with `.figcraft`, `.svg`, `.txt`), from `build-orbi-fax-extras.py`.
|
||||
- **When it opens:** only for a profile whose own Arcade save says Orbi-Raiders Story mode is complete. The app checks this with `ArcadeProgress.isStoryComplete`. It never appears in the index, and a locked profile sees no hint of it anywhere.
|
||||
- **The text:** exactly as Paul wrote it. It types itself out as 999's warning does, and appears at once with Reduce motion.
|
||||
- **Header:** the generator now writes four-digit page numbers in the header the way the app does.
|
||||
|
||||
@@ -89,9 +89,22 @@ def sport():
|
||||
p.fastext(['Index', 'Weather', 'On Now', 'Arcade'])
|
||||
return p
|
||||
|
||||
# ---- 4. P1000, the secret past the wizard (only after Orbi-Raiders Story mode) ----
|
||||
def secret():
|
||||
p = b.Page(1000); p.header(clock='23:14:07')
|
||||
p.rule(2, C)
|
||||
lines = ['CONGRATULATIONS, YOUNG TRAVELLER.', 'YOU HAVE REACHED THE END OF TELETEXT.', 'THERE IS NOTHING HERE.', 'PLEASE GO OUTSIDE.']
|
||||
for i, line in enumerate(lines):
|
||||
p.put(5 + i * 4, (40 - len(line)) // 2, line, Y if i == 0 else G if i == 3 else W, dh=True)
|
||||
p.rule(21, C, bits=0b000011)
|
||||
p.rule(23, G, bits=0b111100)
|
||||
p.fastext(['Index', 'Arcade', 'On Now', 'Rooms'])
|
||||
return p
|
||||
|
||||
if __name__ == '__main__':
|
||||
(HERE / 'orbi-fax-guide-text-entry.svg').write_text(guide())
|
||||
for name, page, title in [('orbi-fax-p401-your-weather', weather(), 'Orbi-Fax P401 your weather'), ('orbi-fax-p301-your-sports', sport(), 'Orbi-Fax P301 your sports')]:
|
||||
for name, page, title in [('orbi-fax-p401-your-weather', weather(), 'Orbi-Fax P401 your weather'), ('orbi-fax-p301-your-sports', sport(), 'Orbi-Fax P301 your sports'),
|
||||
('orbi-fax-p1000-secret', secret(), 'Orbi-Fax P1000 the end of teletext')]:
|
||||
(HERE / f'{name}.svg').write_text(page.svg(title))
|
||||
(HERE / f'{name}.txt').write_text('\n'.join(''.join(c['ch'] if c['mos'] is None else '#' for c in row) for row in page.cells) + '\n')
|
||||
print('wrote 3 previews')
|
||||
|
||||
@@ -114,7 +114,7 @@ class Page:
|
||||
label = f'P{self.number}'
|
||||
self.put(0, 0, label, W)
|
||||
self.put(0, 5, ' ORBI-FAX ', Y, B)
|
||||
self.put(0, 16, str(self.number), W)
|
||||
self.put(0, 19 - len(str(self.number)), str(self.number), W)
|
||||
self.put(0, 21, date, W)
|
||||
self.put(0, 32, clock, Y)
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 107 KiB |
@@ -0,0 +1,25 @@
|
||||
P1000 ORBI-FAX 1000 Sun 08 Nov 23:14:07
|
||||
|
||||
########################################
|
||||
|
||||
|
||||
CONGRATULATIONS, YOUNG TRAVELLER.
|
||||
|
||||
|
||||
|
||||
YOU HAVE REACHED THE END OF TELETEXT.
|
||||
|
||||
|
||||
|
||||
THERE IS NOTHING HERE.
|
||||
|
||||
|
||||
|
||||
PLEASE GO OUTSIDE.
|
||||
|
||||
|
||||
|
||||
########################################
|
||||
|
||||
########################################
|
||||
Index Arcade On Now Rooms
|
||||
@@ -7,7 +7,7 @@ FONTS="${TMPDIR:-/tmp}/orbi-fax-fonts"; mkdir -p "$FONTS/fonts"; cp ../fonts/*.t
|
||||
export XDG_DATA_HOME="$FONTS"
|
||||
python3 build-orbi-fax.py
|
||||
python3 build-orbi-fax-extras.py
|
||||
for P in orbi-fax-p100-index orbi-fax-p501-now-next orbi-fax-p700-arcade-records orbi-fax-p999-wizard orbi-fax-guide-text-entry orbi-fax-p401-your-weather orbi-fax-p301-your-sports; do
|
||||
for P in orbi-fax-p100-index orbi-fax-p501-now-next orbi-fax-p700-arcade-records orbi-fax-p999-wizard orbi-fax-guide-text-entry orbi-fax-p401-your-weather orbi-fax-p301-your-sports orbi-fax-p1000-secret; do
|
||||
figcraft-cli convert "$P.svg" "$P.figcraft" --automation-read-root "$HERE" --automation-write-root "$HERE"
|
||||
figcraft-cli export "$P.figcraft" --out "$P.png" --automation-read-root "$HERE" --automation-write-root "$HERE"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user