API ReferenceGE Extensionsutil
Follow The White Rabbit
A minimal text-adventure easter egg that runs in a custom console context.
A minimal text-adventure easter egg that runs in a custom console context.
Overview
util_followTheWhiteRabbit registers a custom console context called 'neo' and presents a simple text-adventure prompt. It's a playful easter egg referencing The Matrix.
Extension path: lua/ge/extensions/util/followTheWhiteRabbit.lua
Exports (M)
| Function | Signature | Description |
|---|---|---|
onExtensionLoaded | () | Sets up the neo console context and prints the intro. |
onConsoleExecuteCommand | (context, cmd) | Handles commands typed in the neo context. |
Internals
Console Context
On load:
- Disables log timestamps via
consoleSetPrintLogTimeAndOrigin(false). - Adds and switches to the
'neo'context. - Prints the intro text describing a GRIDMAP scene.
Commands
| Command | Result |
|---|---|
throttle | "You crash. Game over." |
| Anything else | No response (placeholder for future content). |
How It Works
- Load the extension:
extensions.load('util_followTheWhiteRabbit'). - The console switches to the
neocontext. - Type commands to interact with the text adventure.
Lua Examples
-- Start the adventure
extensions.load('util_followTheWhiteRabbit')
-- In the console, type:
-- throttle
-- (Result: "You crash. Game over.")Additional Exports
M.onConsoleExecuteCommand- (undocumented)M.onExtensionLoaded- (undocumented)