mirror of
https://github.com/swarm-game/swarm.git
synced 2024-09-11 14:46:33 +03:00
Some small updates and fixes (#1806)
A few minor updates: - Fix formatting of code snippet in `Elmer's glue` entity description - Fix type in conditional tutorial that referred to `robot` instead of `actor` - Help now describes ctrl-q as "quit or restart" - Update crash tutorial log message with hint about the static we will see if we salvage the currently viewed robot
This commit is contained in:
parent
917ee5cd7f
commit
b39851d1ab
@ -356,7 +356,10 @@
|
||||
The infix operator `++ : text -> text -> text`{=snippet}
|
||||
can be used to concatenate two text values. For example,
|
||||
- |
|
||||
"Number of widgets: " ++ format numWidgets
|
||||
```
|
||||
let numWidgets = 42
|
||||
in "Number of widgets: " ++ format numWidgets
|
||||
```
|
||||
properties: [pickable]
|
||||
capabilities: [concat]
|
||||
- name: caliper
|
||||
|
@ -40,7 +40,7 @@ objectives:
|
||||
of type, say, `{int}`{=type}, we just surround a value of type `int`{=type}
|
||||
in curly braces, like `{3}`. This is why arguments to `build`
|
||||
must also be in curly braces: the type of `build`
|
||||
is `{cmd a} -> cmd robot`{=type}.
|
||||
is `{cmd a} -> cmd actor`{=type}.
|
||||
- |
|
||||
**TIP:** Note that `if` requires a `bool`{=type}, not a `cmd bool`{=type}! So you cannot directly say
|
||||
`if (ishere "very small rock") {...} {...}`{=snippet}.
|
||||
@ -50,7 +50,7 @@ objectives:
|
||||
- |
|
||||
**TIP:** the two branches of an `if` must have the same type. In particular,
|
||||
`if ... {grab} {}`{=snippet} is not
|
||||
allowed, because `{grab}` has type `{cmd text}`{=type} whereas `{}` has type `{cmd unit}`{=type}.
|
||||
allowed, because `{grab}` has type `{cmd text}`{=type} whereas `{}`{=snippet} has type `{cmd unit}`{=type}.
|
||||
In this case `{grab; return ()}` has the right type.
|
||||
condition: |
|
||||
try {
|
||||
|
@ -56,8 +56,12 @@ end;
|
||||
|
||||
log "Hi, I am secret";
|
||||
iterate allOK (tryGive
|
||||
$ "Send a robot to `salvage` me and come back to `give base \"Win\"`.\n"
|
||||
++ "When the rescue robot stands where I am and executes `salvage`,\n"
|
||||
++ "all my inventory and logs will go to it, including the \"Win\".\n"
|
||||
++ "Once you have brought the \"Win\" to your base, you will win!"
|
||||
$ "Send a robot to `salvage` me and come back to\n"
|
||||
++ "`give base \"Win\". When the rescue robot stands\n"
|
||||
++ "where I am and executes `salvage`, all my inventory\n"
|
||||
++ "and logs will go to it, including the \"Win\". Once you\n"
|
||||
++ "have brought the \"Win\" to your base, you will win!\n\n"
|
||||
++ "NOTE: if you are still viewing me when I am salvaged,\n"
|
||||
++ "you will be in for a surprise! If this happens just\n"
|
||||
++ "type `view base` to return to viewing your base."
|
||||
)
|
||||
|
@ -826,7 +826,7 @@ helpWidget theSeed mport =
|
||||
, ("Ctrl-o", "single step")
|
||||
, ("Ctrl-z", "decrease speed")
|
||||
, ("Ctrl-w", "increase speed")
|
||||
, ("Ctrl-q", "quit the current scenario")
|
||||
, ("Ctrl-q", "quit or restart the current scenario")
|
||||
, ("Ctrl-s", "collapse/expand REPL")
|
||||
, ("Meta-h", "hide robots for 2s")
|
||||
, ("Meta-w", "focus on the world map")
|
||||
|
Loading…
Reference in New Issue
Block a user