Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check entities in descriptions #1407

Open
xsebek opened this issue Aug 5, 2023 · 0 comments
Open

Check entities in descriptions #1407

xsebek opened this issue Aug 5, 2023 · 0 comments
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Entities An issue having to do with game entities. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-CI This issue is about continuous integration pipelines - GH Actions - tests and releases on server. Z-Documentation This issue is about README or Wikis or Haddock or... Z-Feature A new feature to be added to the game.

Comments

@xsebek
Copy link
Member

xsebek commented Aug 5, 2023

In #1106, entities are tagged as raw code, but not validated. We should check that descriptions match the entity name. For example an entity could have been renamed, but the old name left in some tutorial.

Proposed solution is to add a function:

type RawType = String
findRawInlines: Scenario -> [(RawType, Text)]

and check that entities (Text) are in entity map of the scenario.

@xsebek xsebek added Z-Feature A new feature to be added to the game. C-Low Hanging Fruit Ideal issue for new contributors. G-Entities An issue having to do with game entities. Z-Documentation This issue is about README or Wikis or Haddock or... Z-CI This issue is about continuous integration pipelines - GH Actions - tests and releases on server. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. labels Aug 5, 2023
mergify bot pushed a commit that referenced this issue Aug 5, 2023
* use CommonMark to parse simple markdown AST parametrised on inline/block code
* validate swarm code (`Document Text -> Document Syntax`)
* update descriptions to use markdown with following conventions:
  - `move` - valid swarm code (the easy to write default)
  - `wedge`{=entity} - for swarm entities
  - `unit`{=type} - for swarm types
  - `require <a> <b>`{=snippet} - raw snippets for invalid code
  - **Alt-G** - bold for keyboard shortcuts
- highlight code in brick widgets
- closes #309
- closes #545
- precedes #574
- precedes #1406
- precedes #1407
@xsebek xsebek added the S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. label Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Entities An issue having to do with game entities. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-CI This issue is about continuous integration pipelines - GH Actions - tests and releases on server. Z-Documentation This issue is about README or Wikis or Haddock or... Z-Feature A new feature to be added to the game.
Projects
None yet
Development

No branches or pull requests

1 participant