- when `datadir` is not available, try using the XDG data directory
This way the game can be installed as an executable and data files unpacked to `~/.local/share/swarm/data`.
Notice that the XDG data folder is `~/.local/share/swarm`; inside it is the unpacked `data`.
The alternative approach is to use the environment variable `swarm_datadir` and set that to the unpacked data folder.
That works (even after this change) but is not very beginner friendly.
Ideally, we would like to set this in Cabal when building executable, for example to `/usr/share/swarm/<version>`.
Reading through haskell/cabal#5997, it looks like that is not supported.
When writing scenarios, specifying the direction for system robots is annoying.
With this change robots without direction will have a default direction `down`.
Remove a couple challenges which were just there as placeholders (`test` and `drill_test`; the latter is now moved to `Testing`), and add more interesting `2048` and `hanoi` challenges.
Closes#635 .
Fixes#682.
I still don't understand why it was doing the thing before where it repeated each challenge twice, instead of just repeating the same challenge over and over again. So that has me a little worried. But I do understand why there was a problem --- because when we win a scenario, the menu automatically advances to the next one, but the `currentScenarioPath` is still the one we just won, as it should be so we can save the updated `ScenarioInfo` associated to the correct scenario. But then the menu is rebuilt in order to get all the updated `ScenarioInfo` --- so we must be sure to carefully preserve whatever scenario the menu is focused on, which may or may not be the same as the one we just exited, depending on whether we won or just quit.
- make sure that when the hypothetical robot crashes the game does not
- allow system robots to pick up anything
- let self teleporting robots touch themselves
- bump extension version to 0.0.6
- fix highlighting
- do not let an "empty decimal" (`[0-9]*`) match every time. 😉
- add snapshot test
- add VSCode GitHub Action to build and test
- add VSCode GitHub Action to release the extension
- it is triggered when pushing a tag `swarm-language-vscode-*`
- closes#609
Add `ADT calculator` entity (recipe: `calculator` + `I/O cable` + `typewriter`) which conveys capabilities to work with sum and product types (`inl`, `inr`, `case`; pairs, `fst`, `snd`).
Closes#563 .
- query GitHub Releases for a new version
- add `swarm version` command
- show the version notification in the main menu
- add a new app-wide logging queue
- show the app-wide logs in the main menu as Messages
- catch and show the web API failure in the Messages
- closes#66
- closes#627
* Add a `cotton` entity that grows in some of the places there used to be flowers
* 4 `cotton` make one `string`, with a `small motor` catalyst. Currently, `string` serves no purpose except being an ingredient for `net`, but I imagine we can find other fun things to do with `string`s.
* 256 `string` make one `net`.
* A `net` is a device that enables the `try` command.
This is intentionally a bit on the harder side to construct. You need to set up some good automation to be able to crank out the nets if you want to be able to use `try` on your robots.
Closes#132.
I accidentally git cleaned my .vscode folder and realized
that the example settings were actually wrong.
Now they should cover more schemas and actually work.
- save the latest and best completion status for a scenario
- scenarios are either `not started`/`in progress`/`completed` with the latter two also having time (real and in ticks)
- do not save completion status for `--cheat`ers
- show the completion status in the UI
- closes#357
Co-authored-by: Brent Yorgey <byorgey@gmail.com>
- Add recipes where the entity is a catalyst to the recipes shown for
an entity
- Order recipes so we get recipes where the entity is a (1) input (2)
catalyst (3) output, in that order.
Closes#418.
If you rub some iron with a lodestone for a long time, the iron turns into another lodestone.
While playing the game it felt like lodestones were too scarce, given the fact that they are needed to evaluate `not`, which ends up getting used frequently. This way lodestones are actually renewable.
Closes#387 . Scenario `.yaml` files now accept an extra field, `known`, containing a list of strings which are names of entities that should have the `Known` property added to them.
Improve the Help (F1) modal dialog.
- Get rid of the list of commands; they are now available in Commands modal
- Improve formatting of keybindings list, and add more global keybindings to the list
- Add some text with pointers to the wiki and IRC
- Display current seed (closes#359)
- Display current web API port