Files
Rail_Enterprise/data/schema/goods.schema.json
T
Claude 7cb98fa206 F1: economia headless, dati validati, generatore di mappa e salvataggi
- 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
2026-10-01 22:38:17 +00:00

126 lines
2.8 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Beni (goods.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"goods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"name_en": {
"type": "string",
"minLength": 1
},
"category": {
"type": "string",
"enum": [
"bulk",
"general",
"liquid",
"perishable"
]
},
"unit": {
"type": "string",
"minLength": 1
},
"wagon": {
"type": "string",
"enum": [
"hopper",
"flat",
"tank",
"box"
]
},
"basePrice": {
"type": "integer",
"minimum": 1
},
"elasticity": {
"type": "number",
"minimum": 0,
"maximum": 3
},
"decayDaysAtStation": {
"type": "integer",
"minimum": 1
},
"era": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"town": {
"type": "object",
"properties": {
"category": {
"type": "string",
"enum": [
"food",
"goods",
"fuel",
"construction"
]
},
"demandPerThousand": {
"type": "number",
"minimum": 0,
"maximum": 10
},
"untilYear": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
}
},
"required": [
"category",
"demandPerThousand"
],
"additionalProperties": false
},
"service": {
"type": "boolean"
}
},
"required": [
"id",
"name_it",
"name_en",
"category",
"unit",
"wagon",
"basePrice",
"elasticity",
"decayDaysAtStation",
"era"
],
"additionalProperties": false
},
"minItems": 12
}
},
"required": [
"version",
"goods"
],
"additionalProperties": false
}