swarm/data
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
..
scenarios extensible terrain (#1775) 2024-02-29 06:22:21 +00:00
schema extensible terrain (#1775) 2024-02-29 06:22:21 +00:00
test/language-snippets Record best code size (#974) 2023-05-02 07:06:01 +00:00
worlds infinite improbability drive device enabling teleport command (#1724) 2024-01-14 00:31:12 +00:00
about.txt Update about to 2023 (#1384) 2023-07-20 13:04:56 +00:00
adjectives.txt Use a new opaque type for robots instead of strings (#303) 2022-03-02 03:00:44 +00:00
entities.yaml infinite improbability drive device enabling teleport command (#1724) 2024-01-14 00:31:12 +00:00
logo.txt switch from U+2591 Light Shade to U+2592 Medium Shade (#449) 2022-06-20 17:56:55 +00:00
names.txt Use a new opaque type for robots instead of strings (#303) 2022-03-02 03:00:44 +00:00
recipes.yaml infinite improbability drive device enabling teleport command (#1724) 2024-01-14 00:31:12 +00:00
terrains.yaml extensible terrain (#1775) 2024-02-29 06:22:21 +00:00