diff --git a/docs/atlas/proposals/GJ71.json b/docs/atlas/proposals/GJ71.json new file mode 100644 index 000000000..d8e841b83 --- /dev/null +++ b/docs/atlas/proposals/GJ71.json @@ -0,0 +1,148 @@ +{ + "system_id": "GJ 71", + "proper_name": "Tau Ceti", + "star_type": "G", + "spectral_class": "G8V", + "wiki_data": { + "habitable_count": 2, + "inhabited_count": 3, + "has_gas_giant": false, + "has_asteroid_belt": true, + "has_horizon_station": true, + "raw_bodies_line": "| **Bodies** | 2 habitable · 3 inhabited |" + }, + "bodies": [ + { + "body_id": "GJ71b", + "proper_name": null, + "body_type": "planet", + "orbit_index": 1, + "parent_body_id": null, + "inhabited": false, + "population": 0, + "mass_class": "terrestrial", + "atmosphere": "none", + "biome_summary": "barren", + "hydrosphere": "none", + "economic_role": null, + "settlement_pattern": null, + "industrial_corridor": null, + "notes": "inner rocky" + }, + { + "body_id": "GJ71c", + "proper_name": "Threshold", + "body_type": "planet", + "orbit_index": 2, + "parent_body_id": null, + "inhabited": true, + "population": 600000000, + "mass_class": "terrestrial", + "atmosphere": "breathable", + "biome_summary": "temperate", + "hydrosphere": "ocean", + "economic_role": "agricultural", + "settlement_pattern": "urban_concentrated", + "industrial_corridor": null, + "notes": "primary garden world, first colony world through the gates" + }, + { + "body_id": "GJ71d", + "proper_name": "Arden", + "body_type": "planet", + "orbit_index": 3, + "parent_body_id": null, + "inhabited": true, + "population": 500000000, + "mass_class": "terrestrial", + "atmosphere": "breathable", + "biome_summary": "temperate", + "hydrosphere": "rivers", + "economic_role": "agricultural", + "settlement_pattern": "dispersed_rural", + "industrial_corridor": null, + "notes": "secondary garden world, pastoral" + }, + { + "body_id": "GJ71d-1", + "proper_name": "Verantis", + "body_type": "moon", + "orbit_index": 1, + "parent_body_id": "GJ71d", + "inhabited": true, + "population": 20000000, + "mass_class": "dwarf", + "atmosphere": "none", + "biome_summary": "barren", + "hydrosphere": "none", + "economic_role": "transit", + "settlement_pattern": "domed", + "industrial_corridor": null, + "notes": "domed service settlement" + }, + { + "body_id": "GJ71e", + "proper_name": null, + "body_type": "planet", + "orbit_index": 4, + "parent_body_id": null, + "inhabited": false, + "population": 0, + "mass_class": "terrestrial", + "atmosphere": "thin", + "biome_summary": "frozen", + "hydrosphere": "ice", + "economic_role": null, + "settlement_pattern": null, + "industrial_corridor": null, + "notes": "outer ice world" + }, + { + "body_id": "GJ71-belt", + "proper_name": null, + "body_type": "asteroid_belt", + "orbit_index": 5, + "parent_body_id": null, + "inhabited": false, + "population": 0, + "mass_class": null, + "atmosphere": null, + "biome_summary": null, + "hydrosphere": null, + "economic_role": null, + "settlement_pattern": null, + "industrial_corridor": null, + "notes": "debris disk" + }, + { + "body_id": "GJ71-oort", + "proper_name": null, + "body_type": "oort_cloud", + "orbit_index": 6, + "parent_body_id": null, + "inhabited": false, + "population": 0, + "mass_class": null, + "atmosphere": null, + "biome_summary": null, + "hydrosphere": null, + "economic_role": null, + "settlement_pattern": null, + "industrial_corridor": null, + "notes": "" + } + ], + "stations": [ + { + "station_id": "GJ71-oort-S1", + "proper_name": "Horizon Station", + "orbits_body_id": "GJ71-oort", + "station_type": "horizon", + "population": 80000000, + "economic_role": "transit", + "docking_class": "major", + "has_gate_infrastructure": true, + "notes": "Veil Institute founding site + gate infrastructure" + } + ] +} diff --git a/server/src/bin/atlas.rs b/server/src/bin/atlas.rs index cc184bc6d..ba4f754f9 100644 --- a/server/src/bin/atlas.rs +++ b/server/src/bin/atlas.rs @@ -221,21 +221,31 @@ struct TypeCount { #[derive(Serialize, serde::Deserialize, Clone)] struct ProposalBody { body_id: String, + proper_name: Option, body_type: String, orbit_index: i32, parent_body_id: Option, inhabited: bool, + population: Option, mass_class: Option, atmosphere: Option, biome_summary: Option, + hydrosphere: Option, + economic_role: Option, + settlement_pattern: Option, + industrial_corridor: Option, notes: String, } #[derive(Serialize, serde::Deserialize, Clone)] struct ProposalStation { station_id: String, + proper_name: Option, orbits_body_id: String, station_type: String, + population: Option, + economic_role: Option, + docking_class: Option, has_gate_infrastructure: bool, notes: String, } @@ -785,9 +795,12 @@ fn generate_body_matrix( orbit_index: orbit, parent_body_id: None, inhabited: false, + proper_name: None, + population: None, mass_class: Some("terrestrial".into()), atmosphere: Some("none".into()), biome_summary: Some("barren".into()), + hydrosphere: None, economic_role: None, settlement_pattern: None, industrial_corridor: None, notes: "inner rocky, uninhabited".into(), }); orbit += 1; @@ -807,9 +820,12 @@ fn generate_body_matrix( orbit_index: orbit, parent_body_id: None, inhabited: true, + proper_name: None, + population: None, mass_class: Some("terrestrial".into()), atmosphere: Some("breathable".into()), biome_summary: Some("temperate".into()), + hydrosphere: None, economic_role: None, settlement_pattern: None, industrial_corridor: None, notes: format!("inhabited planet {}/{}", i + 1, wiki_inh), }); orbit += 1; @@ -830,9 +846,12 @@ fn generate_body_matrix( orbit_index: orbit, parent_body_id: None, inhabited: false, + proper_name: None, + population: None, mass_class: Some("terrestrial".into()), atmosphere: Some("breathable".into()), biome_summary: Some("temperate".into()), + hydrosphere: None, economic_role: None, settlement_pattern: None, industrial_corridor: None, notes: "habitable, uninhabited".into(), }); orbit += 1; @@ -854,9 +873,12 @@ fn generate_body_matrix( orbit_index: orbit, parent_body_id: None, inhabited: false, + proper_name: None, + population: None, mass_class: Some("terrestrial".into()), atmosphere: Some("thin".into()), biome_summary: Some("frozen".into()), + hydrosphere: None, economic_role: None, settlement_pattern: None, industrial_corridor: None, notes: "outer rocky/ice, uninhabited".into(), }); orbit += 1; @@ -870,9 +892,12 @@ fn generate_body_matrix( orbit_index: orbit, parent_body_id: None, inhabited: false, + proper_name: None, + population: None, mass_class: None, atmosphere: None, biome_summary: None, + hydrosphere: None, economic_role: None, settlement_pattern: None, industrial_corridor: None, notes: "asteroid belt".into(), }); orbit += 1; @@ -892,9 +917,12 @@ fn generate_body_matrix( orbit_index: orbit, parent_body_id: None, inhabited: false, + proper_name: None, + population: None, mass_class: Some("gas_giant".into()), atmosphere: Some("dense".into()), biome_summary: None, + hydrosphere: None, economic_role: None, settlement_pattern: None, industrial_corridor: None, notes: "gas giant".into(), }); // 2 default moons @@ -905,9 +933,12 @@ fn generate_body_matrix( orbit_index: m, parent_body_id: Some(gg_id.clone()), inhabited: false, + proper_name: None, + population: None, mass_class: Some("dwarf".into()), atmosphere: Some("none".into()), biome_summary: Some("barren".into()), + hydrosphere: None, economic_role: None, settlement_pattern: None, industrial_corridor: None, notes: format!("moon {} of gas giant", m), }); } @@ -922,9 +953,12 @@ fn generate_body_matrix( orbit_index: orbit, parent_body_id: None, inhabited: false, + proper_name: None, + population: None, mass_class: None, atmosphere: None, biome_summary: None, + hydrosphere: None, economic_role: None, settlement_pattern: None, industrial_corridor: None, notes: "oort cloud".into(), }); @@ -932,8 +966,12 @@ fn generate_body_matrix( if has_horizon { stations.push(ProposalStation { station_id: format!("{}-oort-S1", sid), + proper_name: None, orbits_body_id: oort_id, station_type: "horizon".into(), + population: None, + economic_role: Some("transit".into()), + docking_class: Some("major".into()), has_gate_infrastructure: true, notes: "horizon station — gate infrastructure".into(), }); @@ -1058,18 +1096,26 @@ fn cmd_commit_system(conn: &Connection, path: &str) { for body in &proposal.bodies { tx.execute( "INSERT INTO bodies (body_id, system_id, parent_body_id, body_type, orbit_index, - inhabited, mass_class, atmosphere, biome_summary) - VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9)", + proper_name, inhabited, population, mass_class, atmosphere, + biome_summary, hydrosphere, economic_role, settlement_pattern, + industrial_corridor) + VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14, ?15)", params![ body.body_id, proposal.system_id, body.parent_body_id, body.body_type, body.orbit_index, + body.proper_name, body.inhabited as i32, + body.population.unwrap_or(0), body.mass_class, body.atmosphere, body.biome_summary, + body.hydrosphere, + body.economic_role, + body.settlement_pattern, + body.industrial_corridor, ], ) .unwrap_or_else(|e| { @@ -1081,13 +1127,18 @@ fn cmd_commit_system(conn: &Connection, path: &str) { for station in &proposal.stations { tx.execute( "INSERT INTO stations (station_id, system_id, orbits_body_id, station_type, + proper_name, population, economic_role, docking_class, has_gate_infrastructure) - VALUES (?1, ?2, ?3, ?4, ?5)", + VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9)", params![ station.station_id, proposal.system_id, station.orbits_body_id, station.station_type, + station.proper_name, + station.population.unwrap_or(0), + station.economic_role, + station.docking_class, station.has_gate_infrastructure as i32, ], )