-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
941 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,10 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://raw.githubusercontent.com/swarm-game/swarm/main/data/schema/entities.json", | ||
"title": "Swarm entities", | ||
"title": "Entities", | ||
"description": "Description of entities in the Swarm game", | ||
"type": "array", | ||
"items": { | ||
"description": "Description of an entity in the Swarm game", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the entity. This is what will show up in the inventory and how the entity can be referred to." | ||
}, | ||
"display": { | ||
"type": "object", | ||
"$ref": "./display.json", | ||
"description": "Display information for the entity." | ||
}, | ||
"plural": { | ||
"default": "null", | ||
"type": "string", | ||
"description": "An explicit plural form of the name of the entity. If omitted, standard heuristics will be used for forming the English plural of its name." | ||
}, | ||
"description": { | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "A description of the entity, as a list of paragraphs." | ||
}, | ||
"orientation": { | ||
"default": "null", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"name": "X coordinate", | ||
"type": "number" | ||
}, | ||
{ | ||
"name": "Y coordinate", | ||
"type": "number" | ||
} | ||
], | ||
"description": "A 2-tuple of integers specifying an orientation vector for the entity. Currently unused." | ||
}, | ||
"growth": { | ||
"default": "null", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"name": "minimum", | ||
"type": "number" | ||
}, | ||
{ | ||
"name": "maximum", | ||
"type": "number" | ||
} | ||
], | ||
"description": "For growable entities, a 2-tuple of integers specifying the minimum and maximum amount of time taken for one growth stage. The actual time for one growth stage will be chosen uniformly at random from this range; it takes two growth stages for an entity to be fully grown." | ||
}, | ||
"combustion": { | ||
"type": "object", | ||
"$ref": "./combustion.json", | ||
"description": "Properties of combustion." | ||
}, | ||
"yields": { | ||
"default": "null", | ||
"type": "string", | ||
"description": "The name of the entity which will be added to a robot's inventory when it executes grab or harvest on this entity. If omitted, the entity will simply yield itself." | ||
}, | ||
"properties": { | ||
"default": "[]", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string", | ||
"examples": [ | ||
"unwalkable", | ||
"portable", | ||
"infinite", | ||
"known", | ||
"growable" | ||
] | ||
} | ||
], | ||
"description": "A list of properties of this entity. See Entity properties." | ||
}, | ||
"capabilities": { | ||
"default": "[]", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "A list of capabilities provided by entity, when it is equipped as a device. See Capabilities." | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"display", | ||
"description" | ||
] | ||
"$ref": "entity.json" | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://raw.githubusercontent.com/swarm-game/swarm/main/data/schema/entity.json", | ||
"title": "Entity", | ||
"description": "Description of an entity in the Swarm game", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the entity. This is what will show up in the inventory and how the entity can be referred to." | ||
}, | ||
"display": { | ||
"type": "object", | ||
"$ref": "display.json", | ||
"description": "Display information for the entity." | ||
}, | ||
"plural": { | ||
"default": "null", | ||
"type": "string", | ||
"description": "An explicit plural form of the name of the entity. If omitted, standard heuristics will be used for forming the English plural of its name." | ||
}, | ||
"description": { | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "A description of the entity, as a list of paragraphs." | ||
}, | ||
"orientation": { | ||
"default": "null", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"name": "X coordinate", | ||
"type": "number" | ||
}, | ||
{ | ||
"name": "Y coordinate", | ||
"type": "number" | ||
} | ||
], | ||
"description": "A 2-tuple of integers specifying an orientation vector for the entity. Currently unused." | ||
}, | ||
"growth": { | ||
"default": "null", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"name": "minimum", | ||
"type": "number" | ||
}, | ||
{ | ||
"name": "maximum", | ||
"type": "number" | ||
} | ||
], | ||
"description": "For growable entities, a 2-tuple of integers specifying the minimum and maximum amount of time taken for one growth stage. The actual time for one growth stage will be chosen uniformly at random from this range; it takes two growth stages for an entity to be fully grown." | ||
}, | ||
"combustion": { | ||
"type": "object", | ||
"$ref": "combustion.json", | ||
"description": "Properties of combustion." | ||
}, | ||
"yields": { | ||
"default": "null", | ||
"type": "string", | ||
"description": "The name of the entity which will be added to a robot's inventory when it executes grab or harvest on this entity. If omitted, the entity will simply yield itself." | ||
}, | ||
"properties": { | ||
"default": [], | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string", | ||
"examples": [ | ||
"unwalkable", | ||
"portable", | ||
"infinite", | ||
"known", | ||
"growable" | ||
] | ||
} | ||
], | ||
"description": "A list of properties of this entity." | ||
}, | ||
"capabilities": { | ||
"default": [], | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "A list of capabilities provided by entity, when it is equipped as a device. See Capabilities." | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"display", | ||
"description" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://raw.githubusercontent.com/swarm-game/swarm/main/data/schema/named-structure.json", | ||
"title": "Named structure", | ||
"description": "Structure definitions", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Name of this substructure" | ||
}, | ||
"structure": { | ||
"$ref": "structure.json" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://raw.githubusercontent.com/swarm-game/swarm/main/data/schema/orientation-map.json", | ||
"title": "Orientation map", | ||
"description": "Mapping from cardinal directions to display characters", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"east": { | ||
"type": "string" | ||
}, | ||
"north": { | ||
"type": "string" | ||
}, | ||
"west": { | ||
"type": "string" | ||
}, | ||
"south": { | ||
"type": "string" | ||
} | ||
} | ||
} |
Oops, something went wrong.