- 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
162 lines
3.4 KiB
JSON
162 lines
3.4 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "Contratti e grandi opere (contracts.json)",
|
|
"type": "object",
|
|
"properties": {
|
|
"$schema": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"generation": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"templates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"connect",
|
|
"deliver",
|
|
"greatWork",
|
|
"service"
|
|
]
|
|
},
|
|
"name_it": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"text_it": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"durationYears": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 2
|
|
},
|
|
"maxMinutes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 2
|
|
},
|
|
"quantity": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 2
|
|
},
|
|
"lengthKm": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "number",
|
|
"minimum": 0
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 2
|
|
},
|
|
"reward": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"prestige": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"penalty": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"minYear": {
|
|
"type": "integer",
|
|
"minimum": 1800,
|
|
"maximum": 2300
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"kind",
|
|
"name_it",
|
|
"text_it",
|
|
"durationYears",
|
|
"reward",
|
|
"prestige",
|
|
"penalty",
|
|
"minYear"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"expositions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"name_it": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"reward": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"prestige": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name_it",
|
|
"reward",
|
|
"prestige"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"generation",
|
|
"templates",
|
|
"expositions"
|
|
],
|
|
"additionalProperties": false
|
|
}
|