Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1.5/Languages/English/Keyed/Letters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<SoS.EnemyScanDesc>Using your ship's sensors, {0} has detected a nearby ship. The ship appears to be {1}. It does not respond to hails, but makes no move to attack. You can use your bridge to order an attack, or wait for it to leave peaceably.</SoS.EnemyScanDesc>
<SoS.DerelictScan>Derelict detected</SoS.DerelictScan>
<SoS.DerelictScanDesc>Using your ship's sensors, {0} has detected a nearby derelict. The ship appears to be {1}. It does not respond to hails and appears to be powered down. You can use your bridge to order an investigation, or wait for it to burn up in the atmosphere.</SoS.DerelictScanDesc>
<SoS.ContentPackDescription>\nThe ship was identified to be coming from: {0}</SoS.ContentPackDescription>
<SoS.FoundOrbitalSite>Starship bow detected!</SoS.FoundOrbitalSite>
<SoS.FoundSiteAI>its AI</SoS.FoundSiteAI>
<SoS.FoundSiteSpecial>Using your ship's sensors, {0} has detected a large, relatively intact piece of debris. It appears to be part of the very same ship which brought your original colonists to this world!\n\nThis could be your best chance to acquire a working Johnson-Tanaka drive, or even rescue any of your fellow travelers who remain in cryptosleep, but do not underestimate the dangers you will face here.</SoS.FoundSiteSpecial>
Expand Down
18 changes: 14 additions & 4 deletions Source/1.5/Comp/CompShipScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ public void ScannedRoom()
}
}

private string GetContentPackDescription(ShipDef ship)
{
if (ship == null || ship.modContentPack.Name == "Save Our Ship 2")
{
return "";
}
return "SoS.ContentPackDescription".Translate(ship.modContentPack.Name);

}
protected void FoundMinerals(Pawn worker)
{
this.daysWorkingSinceLastMinerals = 0f;
Expand Down Expand Up @@ -213,9 +222,9 @@ protected void FoundMinerals(Pawn worker)
Log.Message("SOS2: ".Colorize(Color.cyan) + "Found ship with def: " + ship.derelictShip + " fac: " + ship.shipFaction + " navy: " + ship.spaceNavyDef);
parent.Map.passingShipManager.AddShip(ship);
if (worker != null)
Find.LetterStack.ReceiveLetter("SoS.DerelictScan".Translate(), "SoS.DerelictScanDesc".Translate(worker, ship.derelictShip), LetterDefOf.PositiveEvent);
Find.LetterStack.ReceiveLetter("SoS.DerelictScan".Translate(), "SoS.DerelictScanDesc".Translate(worker, ship.derelictShip) + GetContentPackDescription(ship.derelictShip), LetterDefOf.PositiveEvent);
else
Find.LetterStack.ReceiveLetter("SoS.DerelictScan".Translate(), "SoS.DerelictScanDesc".Translate("its AI", ship.derelictShip), LetterDefOf.PositiveEvent);
Find.LetterStack.ReceiveLetter("SoS.DerelictScan".Translate(), "SoS.DerelictScanDesc".Translate("its AI", ship.derelictShip) + GetContentPackDescription(ship.derelictShip), LetterDefOf.PositiveEvent);
}
else if (chance > 7 && chance < 12) //tradeship, already has faction, navy resolves in SpawnEnemyShip
{
Expand Down Expand Up @@ -253,10 +262,11 @@ protected void FoundMinerals(Pawn worker)

Log.Message("SOS2: ".Colorize(Color.cyan) + "Found ship with def: " + ship.attackableShip + " fac: " + ship.shipFaction + " navy: " + ship.spaceNavyDef);
parent.Map.passingShipManager.AddShip(ship);

if (worker != null)
Find.LetterStack.ReceiveLetter("SoS.EnemyScan".Translate(), "SoS.EnemyScanDesc".Translate(worker, ship.attackableShip), LetterDefOf.PositiveEvent);
Find.LetterStack.ReceiveLetter("SoS.EnemyScan".Translate(), "SoS.EnemyScanDesc".Translate(worker, ship.attackableShip) + GetContentPackDescription(ship.attackableShip), LetterDefOf.PositiveEvent);
else
Find.LetterStack.ReceiveLetter("SoS.EnemyScan".Translate(), "SoS.EnemyScanDesc".Translate("its AI", ship.attackableShip), LetterDefOf.PositiveEvent);
Find.LetterStack.ReceiveLetter("SoS.EnemyScan".Translate(), "SoS.EnemyScanDesc".Translate("its AI", ship.attackableShip) + GetContentPackDescription(ship.attackableShip), LetterDefOf.PositiveEvent);
}
}

Expand Down