Skip to content

Commit

Permalink
Merge pull request #41 from snipercup/Content-editor-schemas-update
Browse files Browse the repository at this point in the history
Schemas update
  • Loading branch information
snipercup authored Feb 19, 2020
2 parents 0d0b456 + df18046 commit 5de6f56
Show file tree
Hide file tree
Showing 15 changed files with 3,489 additions and 229 deletions.
66 changes: 45 additions & 21 deletions data/json/collectionList/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,24 @@
},
{
"type": "filter",
"name": "all_ITEM_CATEGORY",
"display_name": "Type: ITEM_CATEGORY",
"name": "all_comestible",
"display_name": "Type: comestible",
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "ITEM_CATEGORY" } }
"filter": { "jsonObject.type": { "$eq": "COMESTIBLE" } }
},
{
"type": "filter",
"name": "all_comestible",
"display_name": "Type: comestible",
"name": "all_effect_type",
"display_name": "Type: effect_type",
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "COMESTIBLE" } }
"filter": { "jsonObject.type": { "$eq": "effect_type" } }
},
{
"type": "filter",
"name": "all_ITEM_CATEGORY",
"display_name": "Type: ITEM_CATEGORY",
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "ITEM_CATEGORY" } }
},
{
"type": "filter",
Expand All @@ -62,6 +69,20 @@
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "GUNMOD" } }
},
{
"type": "filter",
"name": "all_material",
"display_name": "Type: material",
"display_key": "ident",
"filter": { "jsonObject.type": { "$eq": "material" } }
},
{
"type": "filter",
"name": "all_mission_definition",
"display_name": "Type: mission_definition",
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "mission_definition" } }
},
{
"type": "filter",
"name": "all_monster_attack",
Expand Down Expand Up @@ -94,6 +115,13 @@
{ "fileName": { "$containsNone": "obsolete" } }
] }
},
{
"type": "filter",
"name": "all_skills",
"display_name": "Type: skill",
"display_key": "ident",
"filter": { "jsonObject.type": { "$eq": "skill" } }
},
{
"type": "filter",
"name": "all_tools",
Expand Down Expand Up @@ -163,10 +191,10 @@
},
{
"type": "filter",
"name": "snippet_category_exists",
"display_name": "Exists: snippet_category",
"name": "revert_to_exists",
"display_name": "Exists: revert_to",
"display_key": "id",
"filter": { "jsonObject.snippet_category": { "$exists": true } }
"filter": { "jsonObject.revert_to": { "$exists": true } }
},
{
"type": "filter",
Expand All @@ -181,8 +209,8 @@
"display_name": "is equal to id",
"display_key": "id",
"filter": { "$or": [
{ "jsonObject.id": { "$eq": "launcher" } },
{ "jsonObject.abstract": { "$eq": "launcher" } }
{ "jsonObject.id": { "$eq": "ammolink50" } },
{ "jsonObject.abstract": { "$eq": "ammolink50" } }
] }
},
{
Expand Down Expand Up @@ -254,12 +282,13 @@
"display_name": "Old name string in type",
"display_key": "name",
"filter": { "$and": [
{ "$or": [
{ "jsonObject.type": { "$eq": "GUNMOD" } },
{ "jsonObject.type": { "$eq": "TOOLMOD" } }
] },
{ "jsonObject.type": { "$eq": "terrain" } },
{ "jsonObject.name": { "$type": "string" } },
{ "jsonObject.name_plural": { "$exists": false } },
{ "jsonObject.deconstruct": { "$exists": false } },
{ "jsonObject.burn_data": { "$exists": false } },
{ "jsonObject.burn_products": { "$exists": false } },
{ "jsonObject.install_time": { "$exists": false } },
{ "fileName": { "$containsNone": "dining_kitchen.json" } },
{ "fileName": { "$containsNone": "soup.json" } },
{ "fileName": { "$containsNone": "obsolete" } }
Expand All @@ -271,14 +300,9 @@
"display_name": "Old name_plural string",
"display_key": "name",
"filter": { "$and": [
{ "$or": [
{ "jsonObject.type": { "$eq": "AMMO" } },
{ "jsonObject.type": { "$eq": "COMESTIBLE" } }
] },
{ "jsonObject.name_plural": { "$exists": true } },
{ "fileName": { "$containsNone": "dining_kitchen.json" } },
{ "fileName": { "$containsNone": "soup.json" } },
{ "fileName": { "$containsNone": "obsolete" } }
{ "fileName": { "$containsNone": "soup.json" } }
] }
}
]
10 changes: 2 additions & 8 deletions data/json/schemas/ammo.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,8 @@
"propertyOrder": 13
},
"range": {
"type": "integer",
"id": "/properties/range",
"title": "Range",
"default": 14,
"description": "The range of the ammo",
"options": {
"hidden": false
}
"$ref": "#/definitions/range",
"propertyOrder": 13
},
"damage": {
"type": "integer",
Expand Down
7 changes: 6 additions & 1 deletion data/json/schemas/armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@
"type": "array",
"id": "/properties/flags",
"$ref": "#/definitions/flags_ref"

}
},
"definitions": {
Expand All @@ -251,9 +250,15 @@
"enum": [
"VARSIZE",
"STURDY",
"ROLLER_QUAD",
"ROLLER_INLINE",
"HELMET_COMPAT",
"MAG_COMPACT",
"ELECTRIC_IMMUNE",
"STAB",
"FLASH_PROTECTION",
"SWIM_GOGGLES",
"FIN",
"BLIND",
"OUTER",
"MAG_COMPACT",
Expand Down
3 changes: 3 additions & 0 deletions data/json/schemas/comestible.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,12 @@
"type": "string",
"enum": [
"NO_INGEST",
"PLANTABLE_SEED",
"FORAGE_POISON",
"EDIBLE_FROZEN",
"EATEN_COLD",
"EATEN_HOT",
"MELTS",
"SMOKED",
"LUPINE",
"NPC_SAFE",
Expand Down
34 changes: 34 additions & 0 deletions data/json/schemas/effect_type.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": true,
"title": "Effect type",
"type": "object",
"id": "https://niebert.github.io/json-editor",
"options": {
"disable_collapse": false,
"disable_edit_json": false,
"disable_properties": false,
"collapsed": false,
"hidden": false
},
"defaultProperties": [
"type",
"id",
"name"
],
"properties": {
"id": {
"$ref": "#/definitions/id",
"propertyOrder": 10
},
"type": {
"$ref": "#/definitions/type",
"propertyOrder": 11,
"default": "effect_type"
},
"name": {
"$ref": "#/definitions/name",
"propertyOrder": 12
}
}
}
Loading

0 comments on commit 5de6f56

Please sign in to comment.