With an .sbt there the simulator passes over the triangles and lines of every
file of the scenery, so a scenery file (.scm, .scn) that is gone keeps the
.sbt whatever its name, not only one named *_ter.scm. A small terrain file is
read too: some only list the files that hold the terrain. Node templates
(.inc) still do not count.
A word reading "terrain" outside a directive - the name of a node, of a
texture - no longer hides the includes after it.
An .sbt is judged by all the sceneries reading it: the one it is named after,
that one with a $ ahead of its name, and any other naming it in a terrain
directive. What such a scenery lacks comes with its name.
Each file is read once for a cleanup, however many sceneries include it, and
only around the words that matter: on an installation of 180 sceneries the
cleanup at the first start took minutes and takes seconds.
Any terrain directive kept the scenery's .sbt, as if it brought the terrain
from elsewhere. The directive names either .sbt files, which nothing makes
again, or terrain files (.txtf) with their binary copies (.btf). A scenery
with the terrain files has no use for its own .sbt: the simulator never
writes one for it, and an old one keeps the terrain files from being used.
- An .sbt named by the directive still keeps the scenery's own.
- A .txtf, or its .btf, on disk lets the scenery's .sbt go; with neither,
the .sbt stays and the missing .txtf is given as the reason.
The simulator makes a scenery's .sbt on its first load and never checks it
against the text again, so an older simulator's file, or one made before a
scenery update, keeps showing the old terrain.
- CleanupGeneration, raised by a release, clears the .sbt files once per
installation on the first start, ahead of the scenery list. A file goes only
while its scenery's terrain files (*_ter.scm) are all there and no terrain
directive brings terrain from elsewhere; an .sbt standing in for missing
terrain stays, and the log says what is missing. Which cleanup each
installation had is kept in sbt-cleanup.txt in the user's folder.
- "Delete SBT" in the scenery list's menu does the same for one scenery,
asking first and refusing where nothing could make the file again.
- The .sbt is among the files a scenery is watched by, so one made or removed
reaches the list without a reload.