
Typed defaults, Shot Mono, Open to the Side and still pools
Here is everything that went live on Sunday, 22 November: class properties in the ShotScript language take their type from the call that makes them, Shot Mono is a free font for code, ShotScript Editor opens a script to the side and draws operators as symbols, and Stroke Engine's rain lies in still pools. Typed defaults come first: a property set from a constructor call needs no type written.
Typed defaults
- A call that makes an object of a ShotScript class gives that class:
public a = Spot.new(1)is a Spot. - A default calling another ShotScript module's function that writes its return type takes that type.
- A generic class's constructor that takes its T works the same way:
public slot = Slot.new(5)andpublic list = List.new({1, 2})need no written type. - Hover such a property in ShotScript Editor to see its line with the type read, as
public slot : Slot<number> = Slot.new(5). - A default calling a name the script can't see, such as a class you forgot to
use, gets one error naming theuseto write.
public a = Spot.new(1) -- a Spot
public slot = Slot.new(5) -- a Slot<number>
public list = List.new({1, 2}) -- a List<number>The Classes page has the whole rule, with a Badge script as an example.
Errors that say what to write
- A bare
use Walletthat no folder above holds is an error naming where Wallet is and the fulluseto write. Its fix writes it. - Under
use script.BoardShow, callingBestBoard.new()for the class that script hands out is flagged, with a fix that writes BoardShow. - A
require(...)of a member its system hands out as a value says to reach it through the system. Its fix writes theuseline. - When a
require(...)crosses between server and client code, the check offers nousefix, since auseacross sides is an error too. - When server code uses or requires a member of a client system, the error says to put what both sides read in a shared script.
- A system type the system script doesn't export gets a check naming the line to write and where:
export Namein the system script. - A class implementing another system's interface it can't reach yet is told where the interface is, and its fix makes it reachable.
- A match with no case for a value gets a warning naming it, such as "Cave" on a Zone, and its fix writes
"Cave" then. - A generic read in a plain function's parameter or body is an error saying to declare it on the function, as
Use<Item>(...). - The no Extensions script error shows in Problems as soon as you set the system script's Global property to true.
Overloads, each tables and scopes
- A subclass can add its own overload to a parent's name, as
public Fill as FillNumber. That call on the subclass takes FillNumber. - A child's own overload no longer brings "must override Fill", and a call with its properties still picks FillString cleanly.
- A function passed to an overloaded call picks the overload by its parameter's written type, so
function(old : string?)takes UpdateString. - In an each table,
{ each k in S : T }, T may read k, so every entry gets its own type. - In
{ each id in WorldId : use script[id] extends BaseController }, a child whose class doesn't extend BaseController gets an error. - In a
{ each WorldId : BaseController }table, a child returning a class is told so, and a class adding nothing gets a fix. - An
override X += { ... }reaches every type built from X, so the child's Properties and PartialProperties get the new field too. - A field typed with a scope parameter's names keeps its type in subclasses and extends blocks in other scripts, and hover shows it.
Short docs and the Command Line
- Text between ‹ › is a short doc: above a member, at a line's end or over several lines. It shows on hover, and
!minidocwrites one. - A ─ rule line may carry one shape at its start or end, at any indent. A shape followed by code is still an error.
- In the ShotScript Command Line, an overloaded call runs the overload the editor picks. A call it can't pick is listed, and nothing runs.
- When a Command Line run's target errors while it loads, Studio's Output shows that target's own error with its script and line.
Shot Mono
Shot Mono is a free monospaced font for code in nine weights, Thin to Black, with every weight on the same grid so your columns never move. Download it from its own Shot Mono page, free under the SIL Open Font License. The zip holds the variable font, all nine weights as TTF files, the license and a readme.
Writing code
~=,>=,<=and->draw as ≠ ≥ ≤ → in ShotScript Editor while the text stays as typed, and a copied line pastes them as typed.- Alt+Up and Alt+Down move the current line, and it takes the line-up of the block it lands in.
- With nothing selected, Ctrl+C then Ctrl+V puts a copy of the current line below it. One Ctrl+Z takes it back.
- In a class that extends another, the init line written for you is
local self : <Class> = init(super.new()). One Ctrl+Z takes it back. - A line you are typing that ends in a dot gets one Expected identifier error at the dot, and the class's fields below stay clean.
- Format Document keeps every line of a tidy file as it was, async heads included. A line of only spaces or tabs comes back empty.
- In an overload line such as
public Fill as FillNumber, the shared name andasdraw in colour. - Close a table with its
}and its fields line up with nothing shown over your code. One Ctrl+Z takes the line-up back. - Press End, then Enter, after a lined-up field, and the fields above keep their
:column while the new field joins it. - Press Enter in the middle of an underlined line indented with tabs, and the new line's red underline sits under its word, not the tabs.
- F12 on a field of a table typed as a record type, such as
FlashTime = 1.2, opens that field in the type. - Typing at a long line's end, or a Find match far right, scrolls the code sideways only as far as it must, then back.
- A click on the last whole line of a script tab places the caret without moving the view.
Completion
- After
implements, completion lists the matching interface first, andpubin a module body offers public. - A method's doc shows beside its completion entry as you type its name after
self:, and under the signature card once you type(. - The completion list stays where it opened while you type. On the last visible line, the code scrolls so the list opens below it.
Tabs, Explorer and Problems
- Right-click another script's tab and pick Open to the Side: that script opens in a second pane, and Ctrl+W there closes only that pane.
- When the tabs come back, a tab whose script is no longer in the place stays open and says so, until you close it.
- Close a script and double-click it again in ShotScript Explorer, and it opens with the caret and scroll where you left them.
- In a slim ShotScript Explorer, a long name is cut with …, and the red !, note dots and +N count still follow it.
- ShotScript Explorer's rename and move notes sit under the tree, which makes room for them. Moving a script others require shows a note too.
- Drag onto a folder you keep at the top of ShotScript Explorer, such as Globals, and the drop band shows anywhere on its line.
- After a folder is renamed, Problems keeps listing its scripts and their problems under the new path.
Docs
- Docs text is drawn solid, in the ink of Studio's own docs panel, and its code is crisp.
- Press Enter in Docs Find on No matches, and Docs opens the sidebar page that has the word, at that word.
- Back after a link to another page brings back the line you were reading, at the same height.
- With a Find typed, a link to a private member opens the Private bar to show it, and your Find stays.
- Clicking a From line opens the page of the class it names.
- A drag that begins on a link selects text, and the page stays put.
- A hover card shows what the script says now: edit a type's doc, and its card shows the new text once Docs has the change.
Stroke Engine
- Weather gains Pool Depth, Pool Edge and Pool Level: deep puddles become calm mirrors, their edges fade to damp ground, and small dips fill.
- Late on Saturday, drops resting beside a traced spill with Thin Sheet on began to lie as low wet caps and flat streaks, not round beads or upright capsules.
- The engine's own checks now know the Weather pool settings, and a timing check that failed at random is gone.
- Checks that time a reset or a render now wait until the test machine is quiet, and rerun a miss that met a busy one.
The Weather page now has a second before and after pair, behind a Wetness | Still pools switch above the picture. Here it is, with still pools off and on.


And here is Saturday's juice spill again with Thin Sheet on, its loose drops now lying low.

On the site
- New in ShotScript files each change under its own release, and each release heading shows when that release went live.
- Pictures drawn small in the ShotScript docs and on Stroke Engine pages open larger with a tap.
- Stroke Engine pages no longer jump while their pictures load.
- Pictures on the Docks page are sharper on phones.
