Skip to content

Commit

Permalink
Merge pull request #36 from snipercup/schemas-update
Browse files Browse the repository at this point in the history
Updated schemas
  • Loading branch information
snipercup authored Feb 11, 2020
2 parents ee0f884 + aca3177 commit 00bd84f
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 149 deletions.
24 changes: 19 additions & 5 deletions data/json/collectionList/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "MONSTER" } }
},
{
"type": "filter",
"name": "all_recipe",
"display_name": "Type: recipe",
"display_key": "result",
"filter": { "$and": [
{ "jsonObject.type": { "$eq": "recipe" } },
{ "jsonObject.blueprint_name": { "$exists": false } },
{ "fileName": { "$containsNone": "obsolete" } }
] }
},
{
"type": "filter",
"name": "all_tools",
Expand Down Expand Up @@ -163,8 +174,8 @@
"display_name": "is equal to id",
"display_key": "id",
"filter": { "$or": [
{ "jsonObject.id": { "$eq": "bio" } },
{ "jsonObject.abstract": { "$eq": "bio" } }
{ "jsonObject.id": { "$eq": "seed" } },
{ "jsonObject.abstract": { "$eq": "seed" } }
] }
},
{
Expand All @@ -179,11 +190,11 @@
{ "jsonObject.type": { "$ne": "overmap_terrain" } },
{ "jsonObject.type": { "$ne": "vehicle_part" } },
{ "jsonObject.type": { "$ne": "vehicle" } },
{ "jsonObject.type": { "$ne": "GENERIC" } },
{ "jsonObject.type": { "$ne": "GUN" } },
{ "jsonObject.type": { "$ne": "ARMOR" } },
{ "jsonObject.type": { "$ne": "TOOL" } },
{ "jsonObject.type": { "$ne": "body_part" } },
{ "jsonObject.type": { "$ne": "COMESTIBLE" } },
{ "jsonObject.type": { "$ne": "body_part" } },
{ "jsonObject.type": { "$ne": "faction" } },
{ "jsonObject.type": { "$ne": "mission_definition" } },
{ "jsonObject.name_plural": { "$exists": true } },
Expand All @@ -199,7 +210,10 @@
{ "$or": [
{ "jsonObject.type": { "$eq": "GUNMOD" } },
{ "jsonObject.type": { "$eq": "CONTAINER" } },
{ "jsonObject.type": { "$eq": "GENERIC" } },
{ "jsonObject.type": { "$eq": "MONSTER" } },
{ "jsonObject.type": { "$eq": "TOOL_ARMOR" } },
{ "jsonObject.type": { "$eq": "TOOL" } },
{ "jsonObject.type": { "$eq": "AMMO" } },
{ "jsonObject.type": { "$eq": "BOOK" } },
{ "jsonObject.type": { "$eq": "ammunition_type" } },
{ "jsonObject.type": { "$eq": "vehicle_part" } }
Expand Down
133 changes: 17 additions & 116 deletions data/json/schemas/ammo.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@
},
"copy-from": {
"type": "string",
"enum": [ ]
"format": "selectize",
"filteredEnum": {
"display_key": "id",
"filter": {
"$or": [
{ "jsonObject.type": { "$eq": "AMMO" } },
{ "jsonObject.type": { "$eq": "COMESTIBLE" } }
]
}
}
},
"weight": {"$ref": "#/definitions/weight"},
"volume": {"$ref": "#/definitions/volume"},
Expand All @@ -85,6 +94,10 @@
"hidden": false
}
},
"seed_data": {
"$ref": "#/definitions/seed_data",
"propertyOrder": 13
},
"range": {
"type": "integer",
"id": "/properties/range",
Expand Down Expand Up @@ -247,26 +260,13 @@
"propertyOrder": 13
},
"flags": {
"type": "array",
"id": "/properties/flags",
"title": "Flags",
"format": "selectize",
"uniqueItems": true,
"options": {
"disable_collapse": false,
"disable_array_add": false,
"disable_array_delete": false,
"disable_array_reorder": true,
"disable_properties": false,
"collapsed": false,
"hidden": false,
"multiple": true
},
"$ref": "#/definitions/flags",
"items": {
"type": "string",
"enum": [
"NOGIB",
"TANGLE",
"DROP_ACTION_ONLY_IF_LIQUID",
"PRIMITIVE_RANGED_WEAPON",
"TRADER_AVOID",
"NO_SALVAGE"
Expand Down Expand Up @@ -298,6 +298,7 @@
},
"effects": { "$ref": "#/definitions/effects" },
"container": { "$ref": "#/definitions/CONTAINER" },
"fuel": { "$ref": "#/definitions/fuel" },
"looks_like": {
"type": "string",
"format": "selectize",
Expand All @@ -306,106 +307,6 @@
"filter": { "jsonObject.type": { "$eq": "AMMO" } }
}
},
"fuel": {
"type": "object",
"id": "/properties/fuel",
"title": "Fuel",
"options": {
"disable_collapse": false,
"disable_edit_json": false,
"disable_properties": false,
"collapsed": false,
"hidden": false
},
"defaultProperties": [
"energy",
"explosion_data"
],
"properties": {
"energy": {
"type": "number",
"id": "/properties/fuel/properties/energy",
"title": "Energy",
"default": 15.6,
"description": "A description for 'energy' Type: 'number'",
"options": {
"hidden": false
}
},
"explosion_data": {
"type": "object",
"id": "/properties/fuel/properties/explosion_data",
"title": "Explosion Data",
"options": {
"disable_collapse": false,
"disable_edit_json": false,
"disable_properties": false,
"collapsed": false,
"hidden": false
},
"defaultProperties": [
"chance_hot",
"chance_cold",
"factor",
"fiery",
"size_factor"
],
"properties": {
"chance_hot": {
"type": "integer",
"id": "/properties/fuel/properties/explosion_data/properties/chance_hot",
"title": "Chance Hot",
"default": 5,
"description": "A description for 'chance_hot' Type: 'integer'",
"options": {
"hidden": false
}
},
"chance_cold": {
"type": "integer",
"id": "/properties/fuel/properties/explosion_data/properties/chance_cold",
"title": "Chance Cold",
"default": 10,
"description": "A description for 'chance_cold' Type: 'integer'",
"options": {
"hidden": false
}
},
"factor": {
"type": "number",
"id": "/properties/fuel/properties/explosion_data/properties/factor",
"title": "Factor",
"default": 0.2,
"description": "A description for 'factor' Type: 'number'",
"options": {
"hidden": false
}
},
"fiery": {
"type": "boolean",
"id": "/properties/fuel/properties/explosion_data/properties/fiery",
"title": "Fiery",
"format": "checkbox",
"default": true,
"description": "A description for 'fiery' Type: 'boolean'",
"options": {
"hidden": false
}
},
"size_factor": {
"type": "number",
"id": "/properties/fuel/properties/explosion_data/properties/size_factor",
"title": "Size Factor",
"default": 0.1,
"description": "A description for 'size_factor' Type: 'number'",
"options": {
"hidden": false
}
}
}
}
}
},
"relative": {
"type": "object",
"id": "/properties/relative",
Expand Down
26 changes: 11 additions & 15 deletions data/json/schemas/comestible.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"stack_size": {"$ref": "#/definitions/stack_size"},
"copy-from": {
"type": "string",
"format": "selectize",
"filteredEnum": {
"display_key": "id",
"filter": {
Expand Down Expand Up @@ -199,21 +200,7 @@
}
},
"flags": {
"type": "array",
"id": "/properties/flags",
"title": "Flags",
"format": "selectize",
"uniqueItems": true,
"options": {
"disable_collapse": false,
"disable_array_add": false,
"disable_array_delete": false,
"disable_array_reorder": true,
"disable_properties": false,
"collapsed": false,
"hidden": false,
"multiple": true
},
"$ref": "#/definitions/flags",
"items": {
"type": "string",
"enum": [
Expand All @@ -222,11 +209,16 @@
"EATEN_COLD",
"EATEN_HOT",
"NPC_SAFE",
"FELINE",
"BIRD",
"RAW",
"ACID",
"INEDIBLE",
"CATTLE",
"MYCUS_OK",
"HIDDEN_POISON",
"FREEZERBURN",
"MILLABLE",
"SMOKABLE",
"USE_EAT_VERB",
"TRADER_AVOID",
Expand Down Expand Up @@ -269,6 +261,10 @@
"$ref": "#/definitions/spoils_in",
"propertyOrder": 13
},
"seed_data": {
"$ref": "#/definitions/seed_data",
"propertyOrder": 13
},
"comestible_type": {
"type": "string",
"id": "/properties/comestible_type",
Expand Down
Loading

0 comments on commit 00bd84f

Please sign in to comment.