mirror of
https://github.com/swarm-game/swarm.git
synced 2024-10-27 01:49:15 +03:00
936b30d22a
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
99 lines
2.0 KiB
JSON
99 lines
2.0 KiB
JSON
{
|
|
"yaml.schemas": {
|
|
"data/schema/scenario.json": [
|
|
"data/scenarios/**/*.yaml",
|
|
"scenarios/**/*.yaml"
|
|
],
|
|
"data/schema/terrains.json": [
|
|
"data/terrains.yaml"
|
|
],
|
|
"data/schema/entities.json": [
|
|
"data/entities.yaml"
|
|
],
|
|
"data/schema/recipes.json": [
|
|
"data/recipes.yaml"
|
|
],
|
|
},
|
|
"cSpell.words": [
|
|
"accum",
|
|
"antiquotation",
|
|
"antiquoted",
|
|
"antiquoting",
|
|
"autoplay",
|
|
"Blackhole",
|
|
"Blackholes",
|
|
"bquote",
|
|
"Bytestring",
|
|
"callsite",
|
|
"Cmds",
|
|
"conv",
|
|
"Corasick",
|
|
"datatypes",
|
|
"determinator",
|
|
"determinators",
|
|
"eithers",
|
|
"ents",
|
|
"floorplan",
|
|
"Focusable",
|
|
"Gameplay",
|
|
"hifi",
|
|
"HLINT",
|
|
"homomorphic",
|
|
"JSONE",
|
|
"Keymap",
|
|
"kolor",
|
|
"leaderboard",
|
|
"multiset",
|
|
"multiworld",
|
|
"notif",
|
|
"objs",
|
|
"omni",
|
|
"Parameterizable",
|
|
"parens",
|
|
"pathfinding",
|
|
"playfield",
|
|
"Polytype",
|
|
"polytypes",
|
|
"pparens",
|
|
"prec",
|
|
"precomputation",
|
|
"preprocess",
|
|
"prereq",
|
|
"prereqs",
|
|
"previewable",
|
|
"pushable",
|
|
"quasiquoter",
|
|
"quasiquoters",
|
|
"reqs",
|
|
"scrollability",
|
|
"selfdestruct",
|
|
"squote",
|
|
"struct",
|
|
"Structs",
|
|
"Subdir",
|
|
"subrecord",
|
|
"subterms",
|
|
"subtyping",
|
|
"Subworld",
|
|
"subworlds",
|
|
"teleporting",
|
|
"Tiebreaking",
|
|
"toplevel",
|
|
"tuplify",
|
|
"typecheck",
|
|
"typechecked",
|
|
"typechecks",
|
|
"typeclass",
|
|
"ucata",
|
|
"Unchainable",
|
|
"unequip",
|
|
"unranked",
|
|
"Unwalkable",
|
|
"upperleft",
|
|
"vals",
|
|
"verbed",
|
|
"wakeable",
|
|
"wakeup",
|
|
"walkability"
|
|
]
|
|
} |