swarm/scripts
Karl Ostmo 936b30d22a
extensible terrain (#1775)
Closes #1641

The `data/terrain.yaml` file is now the authoritative source of terrains, though `BlankT` is still a hard-coded special case.

I have not changed the underlying integer representation of terrain in the world function, which means that the `terrainIndexByName` Map in the `TerrainMap` record is needed for translating between `Int` and `TerrainType`.

# Demo

    scripts/play.sh -i data/scenarios/Testing/1775-custom-terrain.yaml

![Screenshot from 2024-02-22 16-51-53](https://github.com/swarm-game/swarm/assets/261693/1d263c8b-4e9c-40bf-bdc8-bf5ba8e33c4d)

# Changes

* There used to be a function called `integrateScenarioEntities` that combined the `EntityMap` stored in the `Scenario` record with the global entity map.  However, the global entity map is accessible at parse time of the `Scenario`, so we do the combining there and only ever store the combined map in the `Scenario` record.
* JSON Schema for terrain
* Removed the distinction between "World" attributes and "Terrain" attributes
* Unit tests for scenario-defined terrain and related validations
    * Validate existence of referenced terrain at scenario parse time
    * Validate attributes referenced by terrains at parse time
2024-02-29 06:22:21 +00:00
..
autoplay-tutorials.sh Render markdown in entity descriptions (#1413) 2023-08-12 11:42:12 +00:00
autopopulate-spellchecker.sh simplify spellchecker words script (#1755) 2024-01-29 19:05:35 +00:00
benchmark-against-parent.sh tweak benchmarks (#1754) 2024-01-29 18:38:57 +00:00
compare-format.sh Make function chains pretty (#1479) 2023-10-07 21:04:01 +00:00
enforce-todo-issues.sh extensible terrain (#1775) 2024-02-29 06:22:21 +00:00
normalize-all-yaml.sh enforce scenario normalization (#1718) 2024-01-06 01:21:21 +00:00
normalize-cabal.sh autoformat cabal file (#1769) 2024-02-19 20:07:15 +00:00
play.sh Specifically build swarm:swarm component in play.sh script (#1682) 2023-12-13 20:34:43 +00:00
preview-world-vscode.sh preview rendered world with inotify (#1756) 2024-01-31 19:23:43 +00:00
reformat-code.sh autopopulate spellchecker (#1749) 2024-01-28 01:54:13 +00:00
regenerate-schema-docs.sh Autogenerate scenario schema doc (#1441) 2023-10-09 02:11:30 +00:00
render-sublibrary-dependencies.sh autogenerated sublibrary diagram (#1720) 2024-01-08 20:16:00 +00:00
run-benchmarks.sh tweak benchmarks (#1754) 2024-01-29 18:38:57 +00:00
run-tests.sh Refactor LogEntry type (#1513) 2023-09-15 03:08:25 +00:00
validate-json-schemas.sh extensible terrain (#1775) 2024-02-29 06:22:21 +00:00
view-haddocks.sh bump cabal-build version, fix haddock script (#1703) 2024-01-03 20:47:00 +00:00