mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-06 08:21:36 +07:00
Added pattern to uniques to catch bugs
This commit is contained in:
@ -6,10 +6,11 @@ Computers can handle a lot of that themselves, so we can let them do the work to
|
|||||||
|
|
||||||
This also allows autocompletion when writing jsons!
|
This also allows autocompletion when writing jsons!
|
||||||
|
|
||||||
As of now, only Buildings.json has a proper schema
|
As of now, only Buildings and Units have proper schema
|
||||||
|
|
||||||
## Using Android Studio
|
## Using Android Studio
|
||||||
|
|
||||||
|
|
||||||
- Double-click space, search "json schema mappings", enter
|
- Double-click space, search "json schema mappings", enter
|
||||||
- Click the small '+' (top, under 'language & frameworks' text)
|
- Click the small '+' (top, under 'language & frameworks' text)
|
||||||
- Put the URL as `https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/buildings.json`
|
- Put the URL as `https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/buildings.json`
|
||||||
@ -28,6 +29,12 @@ Tada! Now Android Studio will recognize all Buildings.json files as belonging to
|
|||||||
"*/Buildings.json"
|
"*/Buildings.json"
|
||||||
],
|
],
|
||||||
"url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/buildings.json"
|
"url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/buildings.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileMatch": [
|
||||||
|
"*/Units.json"
|
||||||
|
],
|
||||||
|
"url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/units.json"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "type": "string" }
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^[^><]*(\\<[^>]*\\>[^><]*)*$"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user