Commit Graph

731 Commits

Author SHA1 Message Date
Brent Yorgey
7729369d50 some updates to README and COMMUNITY 2022-10-05 17:52:52 -05:00
Ondřej Šebek
956dcb9ecf Fix default robot direction
I am not sure what it was doing, but it was not what
I expected. Now it should accept missing dir field.
2022-10-05 21:37:51 +02:00
Brent Yorgey
faad903863
Add author (optional) and version (required) fields to scenarios (#719)
Closes #611 .
2022-10-05 18:01:32 +00:00
Brent Yorgey
871e68b38f mention external editors in def Tutorial challenge 2022-10-04 07:08:31 -05:00
Brent Yorgey
af6cb9b8d1 fix typo 2022-10-04 07:03:06 -05:00
Brent Yorgey
553723b83e the base now faces north by default 2022-10-03 21:22:51 -05:00
Ondřej Šebek
88eee0aaab
Rename the bug tag 2022-10-03 08:36:35 +02:00
Brent Yorgey
ffd94792cf
set up config for issue template chooser, with link to COMMUNITY (#718) 2022-10-02 23:40:38 +00:00
Brent Yorgey
5fb85328b0 better tutorial/log screenshot 2022-10-02 15:51:30 -05:00
Brent Yorgey
e58c43e16c put some screenshots in alpha release blog post 2022-10-02 15:45:28 -05:00
Ondřej Šebek
0d0cd91208
Catch release query errors (#714)
- catch `HttpException` thrown when the query to GitHub API fails
- refactor the version error handling
2022-10-02 07:11:57 +00:00
Ondřej Šebek
e13dced169
Fallback to XDG data directory (#678)
- 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.
2022-10-01 20:40:56 +00:00
Ondřej Šebek
559a3450bd
Allow multiple robots in palette (#711)
- support specifying multiple robots in a cell
- add a test with multiple robots revealing new rooms
  - add T shaped walls
- closes #710
2022-10-01 15:26:05 +00:00
Ondřej Šebek
f3c92ca03d
Make robots direction optional (#709)
When writing scenarios, specifying the direction for system robots is annoying.
With this change robots without direction will have a default direction `down`.
2022-10-01 10:41:00 +00:00
Ondřej Šebek
0fb94ae7dd Use type constraint for step functions 2022-09-27 01:42:17 +02:00
Ondřej Šebek
03fd3e22cd
Unify move check and fix bugs (#701)
- unify move checking for move and teleport
- make `destroyIfNotBase` able to destroy system robots
- add test for destructive teleport
- closes #699
2022-09-26 23:26:35 +00:00
Brent Yorgey
5a01658883
rename unit type to unit (#697)
Closes #696.
2022-09-26 20:10:12 +00:00
Ondřej Šebek
cdd2966275
Remove backticks from backstory (#703) 2022-09-26 17:53:38 +00:00
Brent Yorgey
f003c6773e
A few updates related to speedrunning (#695)
I've updated the Swarm speedrunning wiki page at https://github.com/swarm-game/swarm/wiki/Speedrunning .  Here are a few related cleanups/links.  I'm also planning to fix #694 as part of this PR.
2022-09-25 19:30:18 +00:00
Brent Yorgey
4c8a5c7dbb add more prominent links to README 2022-09-24 14:13:04 -05:00
Brent Yorgey
4801d17978
More minor edits (#693) 2022-09-18 12:04:33 +00:00
Brent Yorgey
120b7b4b79
Remove test challenges and add some more interesting ones (#669)
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 .
2022-09-17 18:31:39 +00:00
Brent Yorgey
7942ac1215
Minor tweaks to tutorial and entity descriptions (#690) 2022-09-17 18:07:08 +00:00
Brent Yorgey
d0dc04a2d7
Documentation edits in preparation for alpha release (#691) 2022-09-17 15:28:13 +00:00
Brent Yorgey
effef86d22
preserve the focused scenario when rebuilding the NewGameMenu (#688)
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.
2022-09-17 11:32:11 +00:00
Ondřej Šebek
1b3e622655
Add swap command (#685)
- closes #684
- closes #680
2022-09-17 11:21:26 +00:00
Ondřej Šebek
91a186e354
Add easy mazes (#677)
- add one maze shaped like a cave and one shaped like a spiral
- part of #635

Co-authored-by: Brent Yorgey <byorgey@gmail.com>
2022-09-14 18:02:30 +00:00
Ondřej Šebek
914f3ad596
Fix various robot bugs (#675)
- 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
2022-09-11 14:54:57 +00:00
Ondřej Šebek
981583d2f7
Fix best time format (#672)
- show minutes and seconds modulo 60
2022-09-09 06:46:06 +00:00
Ondřej Šebek
4c6f6dc3f1 Make VSCode CI fool proof
It has to work somehow, I give up!
2022-09-09 00:04:00 +02:00
Ondřej Šebek
8f2affd7aa Add missing typescript build to VSCode CI 2022-09-08 23:47:28 +02:00
Ondřej Šebek
8a1cc8992b Run action on CI script change 2022-09-08 23:26:05 +02:00
Ondřej Šebek
c76cc1f9b1 Fix VSCode installation in CI 2022-09-08 23:26:05 +02:00
Ondřej Šebek
c290ecc149
Fix VSCode highlighting (#667)
- 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
2022-09-08 21:06:26 +00:00
Brent Yorgey
12503d114c
Add ADT calculator entity, sum and product type capabilities (#663)
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 .
2022-09-07 17:26:56 +00:00
Ondřej Šebek
8366135ae1
Notify user about newer version (#652)
- 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
2022-09-06 07:32:24 +00:00
Brent Yorgey
b3651e2e9a
Add cotton, strings, and nets (#658)
* 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.
2022-09-04 20:38:14 +00:00
Ondřej Šebek
25793ef7f3
Add random bitcoin (#654)
- add bitcoin (which is random) and gold coin entities
  - `bit (0)` + `bit (1)` + `gold coin` --> `bitcoin`
  - `gold` | `furnace` ---> 8x `gold coin`
- closes #497
2022-09-02 19:09:56 +00:00
Ondřej Šebek
77e1c2ceb1 Fix example schema settings for VSCode
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.
2022-09-01 10:31:00 +02:00
Ondřej Šebek
68333dd70a
Save scenario completion status (#631)
- 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>
2022-08-30 06:53:43 +00:00
Ondřej Šebek
9c816cd96a
Shorten craft tutorial name (#651)
- there is no crafting part two tutorial (at least so far) so we can do without the suffix
2022-08-29 23:15:52 +00:00
Brent Yorgey
b9e77408de
start the base out with 50 clocks in classic mode (#648)
Clocks are somewhat difficult to build, and it's useful to be able to use `wait` early in the game.
2022-08-26 21:34:46 +00:00
Brent Yorgey
c948aed641
improved recipe lists (#649)
- 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.
2022-08-25 17:56:55 +00:00
Brent Yorgey
9cf1eeae6e
add recipe for turning iron into a lodestone (#646)
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.
2022-08-23 10:11:53 +00:00
Brent Yorgey
88d6b72b8d
temporary workaround for TomMD/entropy#75 (#650) 2022-08-23 09:34:50 +00:00
Brent Yorgey
3866fd6ed1
mention harvest or grab appropriately in error message (#647)
Fixes #610.
2022-08-21 17:51:29 +00:00
Brent Yorgey
e6defd44b1
update to brick-1.0 (#641)
* Update to `brick-1.0`
* Test with GHC 9.2.4
2022-08-17 12:35:10 -05:00
Brent Yorgey
5c0ef9d12d
factor out and improve item checking code from give and install (#642)
- We now know about installed devices as well (closes #410)
- Add a hint about `create` when in creative mode
2022-08-17 16:40:30 +00:00
Brent Yorgey
91b77bf9c8
Add known field to scenario format (#637)
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.
2022-08-14 12:41:16 +00:00
Brent Yorgey
6ddf2b69a7
Improve help modal (#633)
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
2022-08-11 03:12:27 +00:00