diff --git a/room.schema.json b/room.schema.json new file mode 100644 index 0000000..6ab1f6f --- /dev/null +++ b/room.schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.azur.webhop.me/Next-Station/NS-Schemas/raw/branch/master/room.schema.json", + "title": "Room", + "description": "A room declaration.", + "properties": { + "exits": { + "type": "array", + "description": "A set of exit (vector + rotation).", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number", + "default": 0 + }, + "y": { + "type": "number", + "default": 0 + }, + "z": { + "type": "number", + "default": 0 + }, + "rotation": { + "type": "number", + "default": 0 + } + }, + "required": ["x", "y", "z", "rotation"] + } + }, + "weight": { + "type": "number", + "default": 1, + "minimum": 0 + } + }, + "type": "object", + "required": ["weight"] +} diff --git a/roomstyle.schema.json b/roomstyle.schema.json deleted file mode 100644 index 0967ef4..0000000 --- a/roomstyle.schema.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/roomtype.schema.json b/roomtype.schema.json new file mode 100644 index 0000000..22cd744 --- /dev/null +++ b/roomtype.schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.azur.webhop.me/Next-Station/NS-Schemas/raw/branch/master/roomstyle.schema.json", + "title": "Room Type", + "description": "A room type is a set of rooms that share a common style. For example, a set of corridors is a room type.", + "properties": { + "rooms": { + "type": "array", + "description": "(direct) Names to rooms declarations.", + "items": { + "type": "string" + } + }, + "weight": { + "type": "number", + "default": 1, + "minimum": 0 + } + }, + "type": "object", + "required": ["rooms", "weight"] +}