Skip to content

Commit 946c0ba

Browse files
authored
Merge branch 'master' into Jibauni
2 parents 3cc35e3 + 839f5af commit 946c0ba

26 files changed

+210
-93
lines changed

.codespell.exclude

-14
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
"Ikrehpeb haslrikpeb ikpecem sara nives" # Stop acting like a child
22
"akmac pano nives ralret umsab lravriv" # a pasta of small snakes with mice meatballs
3-
"haet sunt" # heat shunt (mispronounced)
43
"Yoo no gud fite so gif up." # You are no good in a fight, so give up. (mispronounced)
54
"do gud" # [do|does] good (mispronounced)
6-
"We Korath imotal!" # We, the Korath, are immortal! (mispronounced)
75
"a's no gud" # is no good (mispronounced)
86
"ain' gud" # ain't good (mispronounced)
97
"do gud" # [do|does] good (mispronounced)
108
"Korath flame stong." # [The] Korath flame is strong. (mispronounced)
119
"Can hav" 3 # Can have (mispronounced)
1210
"yoo ded mor" # you dead more (mispronounced)
1311
"'oo wil" 3 # You will (mispronounced)
14-
"bomance novals" # [romance|bromance] novels (mispronounced)
15-
"cley n kiln" # clay and kiln (mispronounced)
16-
"benjos" # banjos (mispronounced)
17-
"bokets f painte" # buckets of paint (mispronounced)
18-
"easls ith trypods" # easels with tripods (mispronounced)
19-
"recerd playrs" # record players (mispronounced)
20-
"relegos tects" # religious texts (mispronounced)
2112
"blak muusic shee's" # blank music sheets (mispronounced)
22-
"sinin boowl sets" # singing bowl set (mispronounced)
2313
"Wee taek yur" # We take your (mispronounced)
2414
"Te" # The (mispronounced)
2515
"blong to u'." # belong to us (mispronounced)
@@ -69,10 +59,6 @@
6959
` "I do not know vhy you sent us to that place. But I am happy to be home. So go, and maybe one day I vill not hate to see you again."`
7060
`A familiar woman is waiting for you outside your ship. Although it's been more than seven years since you've last seen her, you recognize Hjlod instantly. Her eyes are brighter than when last you parted, and she has the same lopsided grin that you remember. "<first>, I saw your ship landing, and thought I vould say hello."`
7161
` She reaches into her pocket and pulls out a small wooden box, similar to the one you saw displayed at Asgard years ago. "I have been thinking," Hjlod says. "Maybe all this vas vill of Skade. Maybe you took us to Asgard to make us stronger, to make us better. It is bitter lesson, but I understand it now."`
72-
` "A data archive with the latest briefings and analyses. Heavily shielded and encrypted, of course, so no need to worry about it showing up on a scan. It has to get there by <date>. So, could you do it?" They hold out a small case with a data crystal visible through the window.`
73-
`As the scan results arrive the data is relayed down to the team in the cargo hold. Your video feed shows a large hologram of the system floating in midair above one of the pallets. Nearby, terminals flash rolling readouts and analyses. As the data on the spectral ship solidifies, cones of projected courses appear on the display. Line by line the cone tightens in as additional data flows from your telemetry, closing in on a path intersecting with the nearby world.`
74-
` He gestures confidently. "A team of Remnant, for instance, could all review incoming data from an experiment, form their own analyses, and then hold what amounts to a conference where each fully presents their thoughts and ideas with supporting data and reasoning within the span of a few minutes."`
75-
system Nnaug
7662
object "Sies Upi"
7763
planet "Sies Upi"
7864
description `Sies Upi is one of the most recently colonized planets of the Gegno Vi. This hot, dry, and harsh world serves as more of an outpost than it does a colony, but nevertheless the Vi have found ways to create manageable living conditions for their settlers.`

.codespell.words.exclude

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
aesthetic
2-
aesthetics
3-
aesthetically
41
ket
52
ser
63
Nin

data/_ui/help.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ help "basics 2"
2727

2828
help "dead"
2929
`Uh-oh! You just died. The universe can be a dangerous place for new captains!`
30-
`Fortunately, your game is automatically saved every time you leave a planet. To load your most recent saved game, press <Show main menu> to return to the main menu, then click on "Load / Save" and "Enter Ship."`
30+
`Fortunately, your game is automatically saved every time you leave a planet. To load your most recent saved game, press <Show main menu> to return to the main menu, then click on "Manage Pilots" and "Enter Ship."`
3131

3232
help "disabled"
3333
`Your ship just got disabled! Before an enemy ship finishes you off, you should find someone to help you.`

data/_ui/interfaces.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ interface "main menu"
266266
dimensions 90 30
267267

268268
visible
269-
button l "_Load / Save..."
269+
button m "_Manage Pilots..."
270270
center 300 155
271271
dimensions 120 30
272272

data/globals.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ mission "Hai Start Unlocked"
3434
conversation
3535
scene "scene/hai start"
3636
`By completing the <campaign> campaign and discovering the conflict between the Hai and Unfettered Hai, you have unlocked the "Hai Origins" start for future playthroughs.`
37-
` (To begin a new game with this start, open the "Load/Save" panel on the main menu and select "New Pilot.")`
37+
` (To begin a new game with this start, open the "Manage Pilots" panel on the main menu and select "New Pilot.")`
3838
decline

data/governments.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,7 @@ government "New Houses"
13451345
"House Seineq" 1
13461346
"House Aqrabe" 1
13471347
"People's Houses (Hostile)" -0.01
1348+
"bribe" 0
13481349
"penalty for"
13491350
assist 0
13501351
"friendly hail" "new houses friendly hail"
@@ -1365,6 +1366,7 @@ government "Old Houses"
13651366
"House Myurej" 1
13661367
"House Sioeora" 1
13671368
"People's Houses (Hostile)" -0.01
1369+
"bribe" 0
13681370
"penalty for"
13691371
assist 0
13701372
"friendly hail" "old houses friendly hail"

data/human/free worlds 4 epilogue.txt

+45
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,51 @@ mission "FW Epilogue: Freya"
144144
` "You sound frustrated."`
145145
` "You know, the war is over, you can relax if you want to."`
146146
` "I know, I know," she says. "I complain, but really there's nowhere else I would rather be. Even if everything we're discovering here is nothing more than what they intended for us to discover, it's still the most interesting work I could possibly be doing right now. So, don't feel sorry for me. Really."`
147+
branch surname
148+
has "last name: Winters"
149+
` You talk for a while longer, and she tells you she'll be sure to be in touch if they ever get to the root of the Pug's motivation. "Until then," she says, "good luck in your travels. I hope the galaxy never runs out of ways to surprise you."`
150+
decline
151+
152+
label surname
153+
` "By the way, can I ask you something, <first>? About you? Sorry if this is rather abrupt. I've been too busy to talk during the war."`
154+
choice
155+
` "Sure. What is it?"`
156+
goto permitted
157+
` "Sorry, I'd prefer if you didn't."`
158+
goto conclusion
159+
160+
label permitted
161+
` "Do you happen to know anyone named Lavinia? Married to someone named Marcus?"`
162+
` Both names sound oddly familiar, but you can't remember where you heard them.`
163+
choice
164+
` "I think so, but I need a minute to remember exactly who."`
165+
goto heritage
166+
` "No, I don't."`
167+
168+
label denial
169+
` "Oh, okay. I think I've been mistaken, then. Never mind."`
170+
goto conclusion
171+
label heritage
172+
` You try to recall exactly where you've heard those names before, racking your brain for any information on these vaguely familiar names, then all of a sudden, it hits you. Marcus and Lavinia were two of your great-grandparents. You wonder why someone you've never met until around the time you joined the Free Worlds is suddenly asking about your ancestors. Maybe she was thinking of a different Marcus and Lavinia.`
173+
` "Yeah, I do know a Marcus and Lavinia, but they're my great-grandparents. Are you sure you're asking the right person?" you ask.`
174+
` "Oh my God," Freya says. "I can't believe it."`
175+
` "What?"`
176+
` "I think we're related. Second cousins. Marcus and Lavinia Winters are also my great-grandparents."`
177+
choice
178+
` "Really?"`
179+
goto disbelief
180+
` "Well, then, hello, cousin. Nice to meet you."`
181+
goto joke
182+
label disbelief
183+
` "Yeah, I can hardly believe it myself. I think it's nice, though. A pleasant surprise." You agree.`
184+
goto conclusion
185+
186+
label joke
187+
` "Heh. Nice to meet you, too. Looks like we brought some prestige to the Winters family name, haven't we, cousin?"`
188+
` You both laugh at her reply.`
189+
` "Never thought I'd go about saving the galaxy with a second cousin I'd never met," she continues, "but in a war where some previously-unknown hyperlane-manipulating aliens intervene to try and make both sides unite, I guess anything's possible."`
190+
191+
label conclusion
147192
` You talk for a while longer, and she tells you she'll be sure to be in touch if they ever get to the root of the Pug's motivation. "Until then," she says, "good luck in your travels. I hope the galaxy never runs out of ways to surprise you."`
148193
decline
149194

data/human/human missions.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -4353,8 +4353,8 @@ mission "Spaceport Reminder Setter"
43534353
"spaceport reminder month" = "month"
43544354
fail
43554355

4356-
# Use of "00" at the start of the mission name is to make it offer only if no other missions have.
4357-
mission "00 Spaceport Reminder Resetter"
4356+
# Use of "aa" at the start of the mission name is to make it offer only if no other missions have.
4357+
mission "aa Spaceport Reminder Resetter"
43584358
minor
43594359
invisible
43604360
repeat

data/human/ships.txt

+10-10
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ ship "Behemoth"
500500
"required crew" 12
501501
"bunks" 30
502502
"mass" 1120
503-
"drag" 18.2
503+
"drag" 14.6
504504
"heat dissipation" .26
505505
"fuel capacity" 600
506506
"cargo space" 490
@@ -752,7 +752,7 @@ ship "Bulk Freighter"
752752
"required crew" 12
753753
"bunks" 21
754754
"mass" 1510
755-
"drag" 21
755+
"drag" 16.8
756756
"heat dissipation" .27
757757
"fuel capacity" 900
758758
"cargo space" 640
@@ -972,7 +972,7 @@ ship "Class C Freighter"
972972
"required crew" 18
973973
"bunks" 43
974974
"mass" 1525
975-
"drag" 21
975+
"drag" 16.8
976976
"heat dissipation" .27
977977
"fuel capacity" 900
978978
"cargo space" 20
@@ -1154,7 +1154,7 @@ ship "Container Transport"
11541154
"required crew" 6
11551155
"bunks" 18
11561156
"mass" 1525
1157-
"drag" 26.4
1157+
"drag" 21.1
11581158
"heat dissipation" .4
11591159
"fuel capacity" 600
11601160
"cargo space" 550
@@ -2074,7 +2074,7 @@ ship "Hauler"
20742074
"required crew" 3
20752075
"bunks" 12
20762076
"mass" 490
2077-
"drag" 14.7
2077+
"drag" 9.8
20782078
"heat dissipation" .43
20792079
"fuel capacity" 400
20802080
"cargo space" 130
@@ -2133,7 +2133,7 @@ ship "Hauler II"
21332133
"required crew" 3
21342134
"bunks" 12
21352135
"mass" 640
2136-
"drag" 16.1
2136+
"drag" 10.7
21372137
"heat dissipation" .43
21382138
"fuel capacity" 400
21392139
"cargo space" 260
@@ -2194,7 +2194,7 @@ ship "Hauler III"
21942194
"required crew" 3
21952195
"bunks" 12
21962196
"mass" 790
2197-
"drag" 17.5
2197+
"drag" 11.6
21982198
"heat dissipation" .43
21992199
"fuel capacity" 400
22002200
"cargo space" 390
@@ -2855,7 +2855,7 @@ ship "Nest"
28552855
"required crew" 5
28562856
"bunks" 14
28572857
"mass" 510
2858-
"drag" 14.7
2858+
"drag" 9.8
28592859
"heat dissipation" .48
28602860
"fuel capacity" 500
28612861
"cargo space" 40
@@ -3262,7 +3262,7 @@ ship "Roost"
32623262
"required crew" 7
32633263
"bunks" 16
32643264
"mass" 680
3265-
"drag" 16.1
3265+
"drag" 10.7
32663266
"heat dissipation" .48
32673267
"fuel capacity" 600
32683268
"cargo space" 80
@@ -3530,7 +3530,7 @@ ship "Skein"
35303530
"required crew" 7
35313531
"bunks" 18
35323532
"mass" 850
3533-
"drag" 17.5
3533+
"drag" 11.6
35343534
"heat dissipation" .51
35353535
"fuel capacity" 700
35363536
"cargo space" 120

data/map planets.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5535,7 +5535,7 @@ planet Tuur-Aasa-Kaska
55355535
government "Old Houses"
55365536
shipyard "Successor Basics"
55375537
outfitter "High Houses Light"
5538-
"required reputation" 15
5538+
"required reputation" 1
55395539

55405540
planet Tuur-Oa-Sola
55415541
attributes "bold tourism" successor uninhabited

source/AI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4544,7 +4544,7 @@ void AI::MovePlayer(Ship &ship, Command &activeCommands)
45444544
AutoFire(ship, firingCommands, false, true);
45454545

45464546
const bool mouseTurning = activeCommands.Has(Command::MOUSE_TURNING_HOLD);
4547-
if(mouseTurning && !ship.IsBoarding() && !ship.IsReversing())
4547+
if(mouseTurning && !ship.IsBoarding() && (!ship.IsReversing() || ship.Attributes().Get("reverse thrust")))
45484548
command.SetTurn(TurnToward(ship, mousePosition));
45494549

45504550
if(activeCommands)

source/ConditionSet.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -364,17 +364,17 @@ void ConditionSet::Add(const DataNode &node)
364364
bool ConditionSet::Add(const string &firstToken, const string &secondToken)
365365
{
366366
// Each "unary" operator can be mapped to an equivalent binary expression.
367-
if(firstToken == "not")
367+
if(firstToken == "not" && DataNode::IsConditionName(secondToken))
368368
expressions.emplace_back(secondToken, "==", "0");
369-
else if(firstToken == "has")
369+
else if(firstToken == "has" && DataNode::IsConditionName(secondToken))
370370
expressions.emplace_back(secondToken, "!=", "0");
371-
else if(firstToken == "set")
371+
else if(firstToken == "set" && DataNode::IsConditionName(secondToken))
372372
expressions.emplace_back(secondToken, "=", "1");
373-
else if(firstToken == "clear")
373+
else if(firstToken == "clear" && DataNode::IsConditionName(secondToken))
374374
expressions.emplace_back(secondToken, "=", "0");
375-
else if(secondToken == "++")
375+
else if(secondToken == "++" && DataNode::IsConditionName(firstToken))
376376
expressions.emplace_back(firstToken, "+=", "1");
377-
else if(secondToken == "--")
377+
else if(secondToken == "--" && DataNode::IsConditionName(firstToken))
378378
expressions.emplace_back(firstToken, "-=", "1");
379379
else
380380
return false;
@@ -390,7 +390,11 @@ bool ConditionSet::Add(const string &name, const string &op, const string &value
390390
{
391391
// If the operator is recognized, map it to a binary function.
392392
BinFun fun = Op(op);
393-
if(!fun)
393+
// For assignments we only allow condition-names on the left side.
394+
// For all others we allow numbers and condition-names on both sides.
395+
if(!fun || (!DataNode::IsConditionName(name) && !DataNode::IsNumber(name)) ||
396+
(DataNode::IsNumber(name) && IsAssignment(op)) ||
397+
(!DataNode::IsConditionName(value) && !DataNode::IsNumber(value)))
394398
return false;
395399

396400
hasAssign |= !IsComparison(op);

source/ConditionsStore.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ ConditionsStore::ConditionsStore(const map<string, int64_t> &initialConditions)
164164
void ConditionsStore::Load(const DataNode &node)
165165
{
166166
for(const DataNode &child : node)
167+
{
168+
if(!DataNode::IsConditionName(child.Token(0)))
169+
child.PrintTrace("Invalid condition during savegame-load:");
167170
Set(child.Token(0), (child.Size() >= 2) ? child.Value(1) : 1);
171+
}
168172
}
169173

170174

source/DataNode.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,23 @@ bool DataNode::IsBool(const string &token)
271271

272272

273273

274+
bool DataNode::IsConditionName(const string &token)
275+
{
276+
// For now check if condition names start with an alphabetic character, and that is all we check for now.
277+
// Token "'" is required for backwards compatibility (used for illegal tokens).
278+
// Boolean keywords are not valid conditionNames, so we also check for that.
279+
return
280+
!token.empty() &&
281+
!IsBool(token) &&
282+
(
283+
(token == "'") ||
284+
(token[0] >= 'a' && token[0] <= 'z') ||
285+
(token[0] >= 'A' && token[0] <= 'Z')
286+
);
287+
}
288+
289+
290+
274291
// Add a new child. The child's parent must be this node.
275292
void DataNode::AddChild(const DataNode &child)
276293
{

source/DataNode.h

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class DataNode {
6464
// as a string.
6565
bool IsBool(int index) const;
6666
static bool IsBool(const std::string &token);
67+
// Check if the token can be used as name for a condition.
68+
static bool IsConditionName(const std::string &token);
6769

6870
// Add a new child. The child's parent must be this node.
6971
void AddChild(const DataNode &child);

0 commit comments

Comments
 (0)