Skip to content

Commit 2d08f9e

Browse files
committed
- Update factions map
1 parent c5ad939 commit 2d08f9e

File tree

3 files changed

+488
-120
lines changed

3 files changed

+488
-120
lines changed

SrvSurvey/Main.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,7 @@ private void btnPredictions_Click(object sender, EventArgs e)
17291729
"Pub_HumanSites",
17301730
"Test_BioCriteria",
17311731
"Build_BioCriteria",
1732+
"Query_Factions"
17321733
};
17331734

17341735
private void comboDev_SelectedIndexChanged(object sender, EventArgs e)
@@ -1753,6 +1754,7 @@ private void comboDev_SelectedIndexChanged(object sender, EventArgs e)
17531754
case "Pub_HumanSites": Game.git.publishHumanSettlements(); break;
17541755
case "Test_BioCriteria": await BioPredictor.testSystemsAsync(); break;
17551756
case "Build_BioCriteria": CriteriaBuilder.buildWholeSet(); break;
1757+
case "Query_Factions": await Game.spansh.queryMinorFactionSystems(); break;
17561758

17571759
default: Game.log("Unexpected!"); break;
17581760
}

SrvSurvey/net/spansh-misc.cs

+6-15
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,22 @@ public async Task getRavenColonizeTargets()
9191
Game.log(txt); // JsonConvert.SerializeObject(colonizationTargets, Formatting.Indented));
9292
}
9393

94-
public async Task getMinorFactionSystems()
94+
public async Task queryMinorFactionSystems()
9595
{
9696
Game.log($"Requesting api/systems/search for factions by body");
9797

9898
var factions = new List<string>()
9999
{
100100
"Raven Colonial Corporation",
101101
"Steven Gordon Jolliffe",
102+
"Sap Core Legion",
102103
"Elite Secret Service",
103-
"The Blue Brotherhood",
104-
"Guardians of Cygnus"
104+
"Razorback Astronautics",
105+
"The Buurian Protectorate"
105106
};
106107

107108
var factionsTxt = string.Join(",", factions.Select(_ => $"\"{_}\""));
108-
var json = "{\"filters\":{\"minor_faction_presences\":{\"value\":[" + factionsTxt + "]}},\"sort\":[{\"distance\":{\"direction\":\"asc\"}}],\"size\":200,\"page\":0,\"reference_system\":\"Banka\"}";
109+
var json = "{\"filters\":{\"minor_faction_presences\":{\"value\":[" + factionsTxt + "]}},\"sort\":[{\"distance\":{\"direction\":\"asc\"}}],\"size\":500,\"page\":0,\"reference_system\":\"Banka\"}";
109110

110111
var body = new StringContent(json, Encoding.ASCII, "application/json");
111112

@@ -140,16 +141,6 @@ public async Task getMinorFactionSystems()
140141
}
141142
}
142143

143-
switch (system.name)
144-
{
145-
case "Banka": // Raven Colonial Corporation
146-
case "Hungalun": //Steven Gordon Jolliffe
147-
case "Loperada": // Elite Secret Service
148-
case "Bhumians": // The Blue Brotherhood
149-
case "Dyavansana": // Guardians of Cygnus
150-
foo.cat[0] = 99;
151-
break;
152-
}
153144

154145
foos.Add(foo);
155146
}
@@ -158,7 +149,7 @@ public async Task getMinorFactionSystems()
158149
.Replace("]},", "]},\r\n");
159150
txt = txt.Insert(1, "\r\n");
160151
txt = txt.Insert(txt.Length - 1, "\r\n");
161-
Clipboard.SetText(txt);
152+
Program.defer(() => Clipboard.SetText(txt));
162153

163154
Game.log($"Processed {results.size} of {results.count} results");
164155
}

0 commit comments

Comments
 (0)