Hana 9e216da9ef go.mod: add go.mod and move pygments to third_party
After go1.16, go will use module mode by default,
even when the repository is checked out under GOPATH
or in a one-off directory. Add go.mod, go.sum to keep
this repo buildable without opting out of the module
mode.

> go mod init github.com/mmcgrana/gobyexample
> go mod tidy
> go mod vendor

In module mode, the 'vendor' directory is special
and its contents will be actively maintained by the
go command. pygments aren't the dependency the go will
know about, so it will delete the contents from vendor
directory. Move it to `third_party` directory now.

And, vendor the blackfriday package.

Note: the tutorial contents are not affected by the
change in go1.16 because all the examples in this
tutorial ask users to run the go command with the
explicit list of files to be compiled (e.g.
`go run hello-world.go` or `go build command-line-arguments.go`).
When the source list is provided, the go command does
not have to compute the build list and whether it's
running in GOPATH mode or module mode becomes irrelevant.
2021-02-15 16:45:26 -05:00

26 lines
999 B
Plaintext

if (this.running)
player:tell("[Train] Error: already a jump in progress");
return;
endif
this.running = 1;
this.aborted = 0;
this:announce_all("[Train] departure in 20 seconds");
dest = this.targets[random(length(this.targets))];
this:announce_all("[Train] Next stop is '", dest:title(), "'");
this:announce_all("You hear the engines starting up");
this.location:announce("The MOOTrain starts up his engines");
suspend(20);
if (this.aborted)
this.running = 0;
this.aborted = 0;
return;
endif
this:announce_all("[Train] Departure!");
this.location:announce_all("The MOOTrain leaves into the 42th dimension!");
this:announce_all("Outside you see the lights of the 42th dimension");
this:moveto(dest);
suspend(4);
this:announce_all("The glowing gets less, until you can see the clear shape of the room, the MOOTrain has landed in");
this.location:announce_all("The MOOTrain arrives out of the 42th dimension!");
this:announce_all("[Train] arrived in '", dest:title(), "'");
this.running = 0;