Skip to main content

Module messages

Module messages 

Source
Expand description

Player-facing messages shared by the engine, the session and the UI.

The texts are Czech and exact: levels, tests and the Python version all quote them. A few carry a placeholder ({path}, {actual}, {error}); fill them with with_path, not_at_home and with_error instead of formatting by hand, so the placeholder names stay in one place.

Constants§

ABSOLUTE_CD_NOT_USED
Level 1.8: the player is in the right place but never used an absolute cd.
ANSWER_FORMAT
The answer does not have the expected number of parts.
ANSWER_REQUIRED
shellgame submit without an answer, for a level that asks for one.
ANSWER_REQUIRED_LIST
Same, when the expected answer is a list. No level uses it today; kept for parity.
ANSWER_REQUIRED_NUMBER
Same, when the expected answer is a number.
CD_RECOVERY_TIP
Printed under every blocked cd, so a player can always recover.
CD_WALK_NOT_COMPLETED
Level 1.9: the player is home but did not walk there segment by segment.
COMPARE_FAILED
Comparing two trees failed. {error} is the underlying reason.
COPY_CONTENT_MISMATCH
Default text when the copy differs from the original.
COPY_DEST_MISSING
The destination of a copy does not exist. {path} is the declared path.
COPY_SOURCE_MISSING
The source of a copy is gone, perhaps moved instead of copied. {path} is the declared path.
COPY_SUCCESS
Success text for a correct copy.
CORRECT
Default success message of a level.
CWD_MISSING
The player’s working directory no longer exists (usually deleted).
DIR_EXISTS
Success text for a directory that exists. {path} is the declared path.
DIR_NOT_EXISTS
A required directory is missing. {path} is the declared path.
DIR_STILL_EXISTS
A directory that should be gone is still there. {path} is the declared path.
EXPECTED_INTEGER
The answer is not an integer.
FILESYSTEM_ERROR
Generic filesystem failure. {error} is the underlying reason.
FILE_CONTENT_CORRECT
Success text for a file whose content matches.
FILE_CONTENT_MISMATCH
Default text when file content does not match the expectation.
FILE_EXISTS
Success text for a file that exists. {path} is the declared path.
FILE_NOT_EXISTS
A required file is missing. {path} is the declared path.
FILE_READ_ERROR
A file could not be read. {error} is the underlying reason.
FILE_STILL_EXISTS
A file that should be gone is still there. {path} is the declared path.
INCORRECT
Default wrong-answer text. Terse on purpose, and never contains the answer.
INTRO_HINT
The single hint of every section intro.
L1_1_USE_PWD_FIRST
Level 1.1: the answer is right, but pwd was never used.
L1_3_INCLUDED_EXTENSION
Level 1.3: the answer still has the file extension.
MARKER_NOT_FOUND
Default text when an evidence marker is missing.
MOVE_DEST_MISSING
The destination of a move does not exist. {path} is the declared path.
MOVE_SOURCE_EXISTS
The source of a move still exists, perhaps copied instead of moved. {path} is the declared path.
MOVE_SUCCESS
Success text for a correct move or rename.
NOT_AT_HOME
at_home() failed. {actual} is the directory the player is in.
PATH_ESCAPES_WORKSPACE
A declared path failed containment (symlinked component, escape).
PERMISSION_CORRECT
Success text for correctly set permissions.
PERMISSION_WRONG
Default text when permissions are not as required.
WRONG_DIRECTORY
at(..) failed and the level supplied no message of its own.

Functions§

not_at_home
NOT_AT_HOME with the directory the player is actually in.
with_error
Fill the {error} placeholder of a message template.
with_path
Fill the {path} placeholder of a message template.