- Base deterministica: Money, id tipizzati, DMath, XxHash64, calendario - 12 file dati con schemi, validatore di schema interno, validazione semantica e hash dei dati; viaferrea-tools validate-data - Generatore di mappa (rilievo, mare, priority-flood, fiumi, laghi, copertura, giacimenti, città, hub, industrie) e viaferrea-tools genmap - Economia: città, industrie, hub, mercato con componente mondiale, prezzi locali, tariffe, lavoro in sede e a piedi, trasporto locale, registro a partita doppia, prestiti, rating, difficoltà - Salvataggi Brotli con rimappatura per id e hash di stato giornaliero - viaferrea-tools simulate con KPI CSV; 45 test verdi; ADR 0002-0006 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191R7vXgtbAvSV4V8tj8uzL
159 lines
3.5 KiB
JSON
159 lines
3.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "Veicoli (vehicles.json)",
|
|
"type": "object",
|
|
"properties": {
|
|
"$schema": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"vehicles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"locomotive",
|
|
"wagon",
|
|
"coach"
|
|
]
|
|
},
|
|
"name_it": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"name_en": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"eraFrom": {
|
|
"type": "integer",
|
|
"minimum": 1800,
|
|
"maximum": 2300
|
|
},
|
|
"eraTo": {
|
|
"type": "integer",
|
|
"minimum": 1800,
|
|
"maximum": 2300
|
|
},
|
|
"powerKw": {
|
|
"type": "number",
|
|
"minimum": 0
|
|
},
|
|
"tractiveEffortKn": {
|
|
"type": "number",
|
|
"minimum": 0
|
|
},
|
|
"maxSpeedKmh": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 600
|
|
},
|
|
"massT": {
|
|
"type": "number",
|
|
"minimum": 0.1
|
|
},
|
|
"lengthM": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 60
|
|
},
|
|
"price": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"runningCostPerYear": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"lifeYears": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 200
|
|
},
|
|
"traction": {
|
|
"type": "string",
|
|
"enum": [
|
|
"steam",
|
|
"diesel",
|
|
"electric",
|
|
"highspeed"
|
|
]
|
|
},
|
|
"components": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 5
|
|
}
|
|
},
|
|
"capacity": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"wagonType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"hopper",
|
|
"flat",
|
|
"tank",
|
|
"box"
|
|
]
|
|
},
|
|
"goods": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"paxCapacity": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"class": {
|
|
"type": "string",
|
|
"enum": [
|
|
"worker",
|
|
"staff"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"kind",
|
|
"name_it",
|
|
"name_en",
|
|
"eraFrom",
|
|
"maxSpeedKmh",
|
|
"massT",
|
|
"lengthM",
|
|
"price",
|
|
"runningCostPerYear",
|
|
"lifeYears",
|
|
"components"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 8
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"vehicles"
|
|
],
|
|
"additionalProperties": false
|
|
}
|