๐Ÿ“ฆ RobLoach / vscode-unciv

๐Ÿ“„ TileResources.schema.json ยท 157 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157{
  "$id": "https://raw.githubusercontent.com/yairm210/Unciv/refs/heads/master/docs/Modders/schemas/TileResources.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Tile Resources",
  "description": "A list of tile resources, including their types, improvements, and discovery requirements.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "title": "Resource Name",
        "description": "The name of the resource.",
        "examples": [
          "Bananas",
          "Wheat",
          "Cattle",
          "Sheep",
          "Bison",
          "Deer",
          "Iron"
        ]
      },
      "terrainsCanBeFoundOn": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "uniqueItems": true,
        "title": "Terrains",
        "description": "List of terrain types where this resource can be found."
      },
      "improvement": {
        "type": "string",
        "title": "Improvement",
        "description": "The improvement required to obtain this resource. Must be in TileImprovements.json."
      },
      "resourceType": {
        "enum": ["Strategic", "Luxury", "Bonus"],
        "default": "Bonus",
        "title": "Resource Type",
        "description": "The type of resource: Strategic, Luxury, or Bonus."
      },
      "revealedBy": {
        "type": "string",
        "examples": ["Iron Working", "Archaeology"],
        "title": "Revealed By",
        "description": "The technology or condition that reveals this resource."
      },
      "improvedBy": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "uniqueItems": true,
        "title": "Improved By",
        "description": "The improvements required for obtaining this resource. Must be in TileImprovements.json."
      },
      "improvementStats": {
        "$ref": "refs/Stats.schema.json",
        "title": "Improvement Stats",
        "description": "Stats provided by the improvement for this resource."
      },
      "production": {
        "type": "number",
        "title": "Production",
        "description": "Per-turn Production yield provided by this resource.",
        "default": 0
      },
      "food": {
        "type": "number",
        "title": "Food",
        "description": "Per-turn Food yield provided by this resource.",
        "default": 0
      },
      "gold": {
        "type": "number",
        "title": "Gold",
        "description": "Per-turn Gold yield provided by this resource.",
        "default": 0
      },
      "science": {
        "type": "number",
        "title": "Science",
        "description": "Per-turn Science yield provided by this resource.",
        "default": 0
      },
      "culture": {
        "type": "number",
        "title": "Culture",
        "description": "Per-turn Culture yield provided by this resource.",
        "default": 0
      },
      "happiness": {
        "type": "number",
        "title": "Happiness",
        "description": "Per-turn Happiness yield provided by this resource.",
        "default": 0
      },
      "faith": {
        "type": "number",
        "title": "Faith",
        "description": "Per-turn Faith yield provided by this resource.",
        "default": 0
      },
      "majorDepositAmount": {
        "$ref": "#/$defs/depositAmount",
        "title": "Major Deposit Amount",
        "description": "Amount of resource in a major deposit."
      },
      "minorDepositAmount": {
        "$ref": "#/$defs/depositAmount",
        "title": "Minor Deposit Amount",
        "description": "Amount of resource in a minor deposit."
      },
      "uniques": {
        "$ref": "refs/Uniques.schema.json",
        "title": "Uniques",
        "description": "Uniques applied to this resource."
      },
      "civilopediaText": {
        "$ref": "refs/CivilopediaText.schema.json",
        "title": "Civilopedia Text",
        "description": "Civilopedia entry describing this resource."
      }
    },
    "required": ["name"],
    "additionalProperties": false
  },
  "$defs": {
    "depositAmount": {
      "title": "Deposit Amount",
      "type": "object",
      "description": "Specifies the amount of resources on a tile, categorized as sparse, default, or abundant.",
      "properties": {
        "sparse": {
          "type": "number",
          "title": "Sparse",
          "description": "The amount of resources on a tile when the amount is considered sparse."
        },
        "default": {
          "type": "number",
          "title": "Default",
          "description": "The amount of resources on a tile when it's the default amount."
        },
        "abundant": {
          "type": "number",
          "title": "Abundant",
          "description": "The amount of resources on a tile when the amount is considered abundant."
        }
      },
      "required": ["sparse", "default", "abundant"],
      "additionalProperties": false
    }
  }
}