Skip to content

Commit

Permalink
Merge pull request #48 from snipercup/Update-schemas,-add-processing-…
Browse files Browse the repository at this point in the history
…buttons

Update schemas, add processing buttons
  • Loading branch information
snipercup authored Mar 27, 2020
2 parents 06203dc + 6b08fd3 commit 6ae96a0
Show file tree
Hide file tree
Showing 32 changed files with 2,103 additions and 988 deletions.
139 changes: 106 additions & 33 deletions data/json/collectionList/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "ARMOR" } }
},
{
"type": "filter",
"name": "all_BIONIC_ITEM",
"display_name": "Type: BIONIC_ITEM",
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "BIONIC_ITEM" } }
},
{
"type": "filter",
"name": "all_body_parts",
Expand Down Expand Up @@ -69,6 +76,13 @@
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "ITEM_CATEGORY" } }
},
{
"type": "filter",
"name": "all_item_group",
"display_name": "Type: item_group",
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "item_group" } }
},
{
"type": "filter",
"name": "all_GENERIC",
Expand Down Expand Up @@ -97,6 +111,29 @@
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "mission_definition" } }
},
{
"type": "filter",
"name": "all_mod_info",
"display_name": "Type: MOD_INFO",
"display_key": "ident",
"filter": { "$and": [
{ "jsonObject.type": { "$eq": "MOD_INFO" } },
{ "$or": [
{ "jsonObject.obsolete": { "$exists": false } },
{ "jsonObject.obsolete": { "$eq": false } }
] }
] }
},
{
"type": "filter",
"name": "all_mod_info",
"display_name": "Type: MOD_INFO (obsolete mods)",
"display_key": "ident",
"filter": { "$and": [
{ "jsonObject.type": { "$eq": "MOD_INFO" } },
{ "jsonObject.obsolete": { "$eq": true } }
] }
},
{
"type": "filter",
"name": "all_monster_attack",
Expand Down Expand Up @@ -157,6 +194,13 @@
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "TOOL_ARMOR" } }
},
{
"type": "filter",
"name": "all_tool_quality",
"display_name": "Type: tool_quality",
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "tool_quality" } }
},
{
"type": "filter",
"name": "all_vehicle_part",
Expand Down Expand Up @@ -224,17 +268,6 @@
"display_key": "id",
"filter": { "jsonObject.conditional_names": { "$exists": true } }
},
{
"type": "filter",
"name": "is_id",
"display_name": "is equal to id",
"display_key": [ "id", "abstract" ],
"filter": { "$or": [
{ "jsonObject.id": { "$eq": "board" } },
{ "jsonObject.name": { "$eq": "board" } },
{ "jsonObject.abstract": { "$eq": "board" } }
] }
},
{
"type": "filter",
"name": "old_name",
Expand All @@ -244,20 +277,16 @@
{ "jsonObject.name": { "$type": "string" } },
{ "jsonObject.name_plural": { "$exists": false } },
{ "jsonObject.type": { "$ne": "COMESTIBLE" } },
{ "jsonObject.type": { "$ne": "item_action" } },
{ "jsonObject.type": { "$ne": "furniture" } },
{ "jsonObject.type": { "$ne": "MONSTER" } },
{ "jsonObject.type": { "$ne": "vehicle_part" } },
{ "jsonObject.type": { "$ne": "martial_art" } },
{ "jsonObject.type": { "$ne": "mutation" } },
{ "jsonObject.type": { "$ne": "faction" } },
{ "jsonObject.type": { "$ne": "overmap_terrain" } },
{ "jsonObject.type": { "$ne": "vehicle" } },
{ "jsonObject.type": { "$ne": "monstergroup" } },
{ "jsonObject.type": { "$ne": "start_location" } },
{ "fileName": { "$containsNone": "dining_kitchen.json" } },
{ "jsonObject.type": { "$ne": "overmap_land_use_code" } },
{ "jsonObject.type": { "$ne": "start_location" } },
{ "jsonObject.type": { "$ne": "furniture" } },
{ "jsonObject.type": { "$ne": "vehicle" } },
{ "jsonObject.type": { "$ne": "MONSTER_FACTION" } },
{ "jsonObject.type": { "$ne": "overmap_terrain" } },
{ "jsonObject.type": { "$ne": "monstergroup" } },
{ "jsonObject.type": { "$ne": "faction" } },
{ "jsonObject.type": { "$ne": "scenario" } },
{ "jsonObject.type": { "$ne": "construction_category" } },
{ "jsonObject.type": { "$ne": "LOOT_ZONE" } },
Expand Down Expand Up @@ -285,7 +314,12 @@
"display_key": "name",
"filter": { "$and": [
{ "$or": [
{ "jsonObject.type": { "$eq": "npc_class" } },
{ "jsonObject.type": { "$eq": "mutation" } },
{ "jsonObject.type": { "$eq": "vehicle_part" } },
{ "jsonObject.type": { "$eq": "MONSTER" } },
{ "jsonObject.type": { "$eq": "item_action" } },
{ "jsonObject.type": { "$eq": "martial_art" } },
{ "jsonObject.type": { "$eq": "ARMOR" } },
{ "jsonObject.type": { "$eq": "WHEEL" } },
{ "jsonObject.type": { "$eq": "GENERIC" } },
Expand All @@ -307,18 +341,24 @@
{ "jsonObject.type": { "$eq": "bionic" } }
] },
{ "jsonObject.name": { "$type": "string" } },
{ "$or": [
{ "fileName": { "$contains": "data\\mods\\DinoMod\\" } },
{ "fileName": { "$contains": "data\\mods\\Graphical_Overmap\\" } },
{ "fileName": { "$contains": "data\\mods\\MMA\\" } },
{ "fileName": { "$contains": "data\\mods\\No_Fungi\\" } },
{ "fileName": { "$contains": "data\\mods\\No_Rail_Stations\\" } },
{ "fileName": { "$contains": "data\\mods\\Only_Wildlife\\" } },
{ "fileName": { "$contains": "data\\mods\\StatsThroughSkills\\" } },
{ "fileName": { "$contains": "data\\mods\\alt_map_key\\" } },
{ "fileName": { "$contains": "data\\mods\\cbm_slots\\" } },
{ "fileName": { "$contains": "data\\mods\\classic_zombies\\" } },
{ "fileName": { "$contains": "data\\mods\\CrazyCataclysm\\" } },
{ "fileName": { "$contains": "data\\mods\\dda\\" } },
{ "fileName": { "$contains": "data\\mods\\desert_region\\" } },
{ "fileName": { "$contains": "data\\mods\\Fuji_Mil_Prof\\" } },
{ "fileName": { "$contains": "data\\mods\\My_Sweet_Cataclysm\\" } }
] },
{ "jsonObject.name_plural": { "$exists": false } },
{ "jsonObject.deconstruct": { "$exists": false } },
{ "jsonObject.burn_data": { "$exists": false } },
{ "jsonObject.burn_products": { "$exists": false } },
{ "jsonObject.attacks": { "$exists": false } },
{ "jsonObject.install_time": { "$exists": false } },
{ "fileName": { "$containsNone": "dining_kitchen.json" } },
{ "fileName": { "$containsNone": "soup.json" } },
{ "fileName": { "$containsNone": "NPC_Dana_Nunez" } },
{ "fileName": { "$containsNone": "data\\json\\npcs\\NPC_Brigitte_LaCroix.json" } },
{ "fileName": { "$containsNone": "mapgen" } },
{ "fileName": { "$containsNone": "book\\misc.json" } },
{ "fileName": { "$containsNone": "obsolete" } }
] }
},
Expand All @@ -327,6 +367,39 @@
"name": "old_name",
"display_name": "Old name_plural string",
"display_key": "name",
"filter": { "jsonObject.name_plural": { "$exists": true } }
"filter": { "$and": [
{ "jsonObject.name_plural": { "$exists": true } },
{ "jsonObject.type": { "$ne": "COMESTIBLE" } },
{ "$and": [
{ "fileName": { "$containsNone": "data\\mods\\EW_Pack\\" } },
{ "fileName": { "$containsNone": "data\\mods\\fast_healing\\" } },
{ "fileName": { "$containsNone": "data\\mods\\FictonalWeapons\\" } },
{ "fileName": { "$containsNone": "data\\mods\\Medieval_Stuff\\" } },
{ "fileName": { "$containsNone": "data\\mods\\blazemod\\" } },
{ "fileName": { "$containsNone": "data\\mods\\Salvaged_Robots\\" } },
{ "fileName": { "$containsNone": "data\\mods\\Growable_pots\\" } },
{ "fileName": { "$containsNone": "data\\mods\\More_Survival_Tools\\" } },
{ "fileName": { "$containsNone": "data\\mods\\Tolerate_This\\" } }
] }
] }
},
{
"type": "filter",
"name": "old_item_group",
"display_name": "Old item_group definitions",
"display_key": "id",
"filter": { "$and": [
{ "jsonObject.type": { "$eq": "item_group" } },
{ "fileName": { "$containsNone": "data\\json\\npcs\\NC_SOLDIER.json" } },
{ "fileName": { "$containsNone": "data\\json\\itemgroups\\books.json" } },
{ "fileName": { "$containsNone": "data\\json\\itemgroups\\art_antiques_crafts.json" } },
{ "fileName": { "$containsNone": "data\\json\\itemgroups\\main.json" } },
{ "fileName": { "$containsNone": "data\\json\\itemgroups\\furniture.json" } },
{ "fileName": { "$containsNone": "data\\json\\itemgroups\\Locations_MapExtras\\locations_commercial.json" } },
{ "fileName": { "$containsNone": "data\\json\\itemgroups\\Locations_MapExtras\\locations.json" } },
{ "fileName": { "$contains": "data\\json\\itemgroups\\Food\\food.json" } },
{ "jsonObject.subtype": { "$exists": false } },
{ "jsonObject.items": { "$exists": true } }
] }
}
]
37 changes: 37 additions & 0 deletions data/json/schemas/activity_type.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": true,
"title": "Activity Type",
"type": "object",
"id": "https://niebert.github.io/json-editor",
"stringifyOptions": {
"maxLength": 117
},
"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": "activity_type"
},
"name": {
"$ref": "#/definitions/name",
"propertyOrder": 12
}
}
}
12 changes: 10 additions & 2 deletions data/json/schemas/armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "object",
"id": "https://niebert.github.io/json-editor",
"stringifyOptions": {
"maxLength": 108
"maxLength": 118
},
"get_ids_of_type": [ { "type": "material", "display_key": "ident" } ],
"options": {
Expand Down Expand Up @@ -149,6 +149,9 @@
"proportional": {
"$ref": "#/definitions/proportional"
},
"relic_data": {
"$ref": "#/definitions/relic_data"
},
"relative": {
"type": "object",
"id": "/properties/relative",
Expand Down Expand Up @@ -309,7 +312,10 @@
"RESTRICT_HANDS",
"PARTIAL_DEAF",
"SLOWS_MOVEMENT",
"SLOWS_THIRST",
"SLOWS_THIRST",
"UNARMED_WEAPON",
"DURABLE_MELEE",
"MAGIC_FOCUS",
"SPLINT",
"NONCONDUCTIVE",
"ACTIVE_CLOAKING",
Expand Down Expand Up @@ -346,6 +352,8 @@
"WAIST",
"DEAF",
"GAS_PROOF",
"NO_UNWIELD",
"PERSONAL",
"FRAGILE",
"FLOTATION",
"FIRESTARTER",
Expand Down
34 changes: 34 additions & 0 deletions data/json/schemas/bionic.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,47 @@
"description": "(optional) Amount of power storage added by this bionic. Strings can be used \"1 kJ\"/\"1000 J\"/\"1000000 mJ\" (default: 0)",
"propertyOrder": 40
},
"fake_item": {
"type": "string",
"title": "Fake item",
"default": "afs_bionic_rocket",
"format": "text",
"propertyOrder": 40
},
"included": {
"type": "boolean",
"title": "Included",
"format": "checkbox",
"default": false,
"description": "(optional) Whether this bionic is included with another. If true this bionic does not require a CBM item to be defined. (default: false)"
},
"fuel_options": {
"type": "array",
"title": "Fuel Options",
"format": "grid",
"options": {
"disable_collapse": false,
"disable_array_add": false,
"disable_array_delete": false,
"disable_array_reorder": true,
"disable_properties": false,
"collapsed": false,
"hidden": false
},
"items": {
"type": "string",
"title": "Fuel Option ",
"default": "sunlight",
"format": "text"
},
"propertyOrder": 50
},
"fuel_efficiency": {
"type": "number",
"title": "Fuel Efficiency",
"default": 0.25,
"propertyOrder": 55
},
"occupied_bodyparts": {
"type": "array",
"id": "/properties/occupied_bodyparts",
Expand Down
2 changes: 1 addition & 1 deletion data/json/schemas/book.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "object",
"id": "https://niebert.github.io/json-editor",
"stringifyOptions": {
"maxLength": 117
"maxLength": 115
},
"options": {
"disable_collapse": false,
Expand Down
1 change: 1 addition & 0 deletions data/json/schemas/comestible.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
"container": {
"type": "string",
"format": "selectize",
"enum": [ "null" ],
"filteredEnum": {
"display_key": "id",
"filter": { "jsonObject.type": { "$eq": "CONTAINER" } }
Expand Down
Loading

0 comments on commit 6ae96a0

Please sign in to comment.