Repository navigation
5.13.3: a world folder is read the same way by the page and the scripts
The world-folder page and the read and draw scripts now take the same files from a folder as every other OnlyWorlds reader does since schema-dist serial 146.
- What was wrong. The page said to load every
*.jsonin a type folder, and the scripts did: a file whose name begins with a dot was counted as an element, and on Windows so wasFenwick.JSON. A session that followed the page and a script run on the same folder could give two different counts. - Which files are read now. A file directly in a type folder whose name ends in
.json, in lower case, and does not begin with a dot. A tool's own dot-folder (.trash/) is passed over.world.json,elements/and the type folders are read as written, and under a legacyspatial/onlymap,pin,zoneandmarker. - What the scripts tell you. A file or folder passed over for its letters' case (
Fenwick.JSON,Character/) gets a line in the report's not-read list, with the reason. Files are ordered by their path as written, so one folder gives the same report on Windows and on Linux, down to which file is kept when two share an id. - The folder check's third verdict.
python -m onlyworlds.lint(onlyworlds 0.152.0 and later) can print that a file wasnot readand exit 3: the Python running it could not hold that file's JSON, so nothing in it was checked. The page says what that means and that such a folder is never called clean.
If a script counts fewer elements in a folder than it did before this release, the difference is files with a leading dot or an upper-case extension.
Changed: knowledge/world-folder.md and its copies in the skills, load_world in the read and draw scripts, one line each in the read and draw skills, a new test file. Checked with one real session on a made folder before and after (the old page: "6 likely elements, 4 clear"; the new: 4, with the three passed-over files named), the new tests red on the old scripts on Windows and Linux, and the release gate.