Skip to content

Commit

Permalink
Use IncidentDef letter translations instead of keyed translations
Browse files Browse the repository at this point in the history
  • Loading branch information
sumghai committed Aug 18, 2024
1 parent b223a4c commit 773ac34
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 134 deletions.
Binary file modified 1.5/Assemblies/Replimat.dll
Binary file not shown.
12 changes: 0 additions & 12 deletions Common/Languages/ChineseSimplified/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>营养原料总存量 {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>食品合成器原料泄漏</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere. -->
<LetterTextReplimatSpill>你的一台{0}发生故障,并泄漏了营养原料。</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>食品合成器故障</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed. -->
<LetterTextReplimatMalfunctionKibble>你的一台{0}发生故障,并复制了大量的饲料。</LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>需要连接到食品合成系统主计算机</NotConnectedToComputer>

Expand Down
12 changes: 0 additions & 12 deletions Common/Languages/ChineseTraditional/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>營養原料總存量 {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>食品合成器原料洩漏</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere. -->
<LetterTextReplimatSpill>你的一台{0}發生故障,並洩漏了營養原料。</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>食品合成器故障</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed. -->
<LetterTextReplimatMalfunctionKibble>你的一台{0}發生故障,並複製了大量的飼料。</LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>需要連接到食品合成系統主電腦</NotConnectedToComputer>

Expand Down
12 changes: 0 additions & 12 deletions Common/Languages/Czech/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>Celková uskladnìná smìs živin {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>Nehoda v Replimatu</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere. -->
<LetterTextReplimatSpill>Pøístroj {0} se porouchal a všude rozlil smìs živin.</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>Porucha Replimatu</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed. -->
<LetterTextReplimatMalfunctionKibble>{0} se porouchal a vyrobil velké množství krmiva pro zvíøata.</LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>Vyžaduje pøipojení k poèítaèi Replimatu.</NotConnectedToComputer>

Expand Down
6 changes: 0 additions & 6 deletions Common/Languages/English/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
<FeedstockStored>Feedstock stored {0} / {1} L</FeedstockStored>
<TotalFeedstockStored>Total feedstock stored {0} / {1} L</TotalFeedstockStored>

<LetterLabelReplimatSpill>Replimat Spill</LetterLabelReplimatSpill>
<LetterTextReplimatSpill>A {0} has malfunctioned, spilling nutrient feedstock everywhere.</LetterTextReplimatSpill>

<LetterLabelReplimatMalfunctionKibble>Replimat Malfunction</LetterLabelReplimatMalfunctionKibble>
<LetterTextReplimatMalfunctionKibble>A {0} has malfunctioned, producing large quantities of animal feed.</LetterTextReplimatMalfunctionKibble>

<NotConnectedToComputer>Requires connection to Replimat Computer</NotConnectedToComputer>
<NotEnoughFeedstock>Insufficient Feedstock</NotEnoughFeedstock>

Expand Down
12 changes: 0 additions & 12 deletions Common/Languages/German/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>Gesamte gespeicherte Rohnahrung {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>Replikator leckt</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere. -->
<LetterTextReplimatSpill>Ein {0} hat eine Fehlfunktion, Rohnahrung wurde überall verschüttet</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>Replikator Fehlfunktion</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed. -->
<LetterTextReplimatMalfunctionKibble>Ein {0} hat eine Fehlfunktion, große Mengen Tierfutter wurden produziert</LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>Benötigt eine Verbindung zum Replikator-Computer</NotConnectedToComputer>

Expand Down
12 changes: 0 additions & 12 deletions Common/Languages/Japanese/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>原料総量 {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>レプリマット漏出</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere. -->
<LetterTextReplimatSpill>{0}が故障し,栄養原料がいたるところに漏出しています.</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>レプリマット故障</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed. -->
<LetterTextReplimatMalfunctionKibble>{0}が故障し,大量のペットフードを合成しています.</LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>レプリマットコンピューターとの接続が必要です.</NotConnectedToComputer>

Expand Down
12 changes: 0 additions & 12 deletions Common/Languages/Korean/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>저장한 원료 총량 {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>레플리매트 누출</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere -->
<LetterTextReplimatSpill>{0}이 오작동해 영양 원료를 여기저기 누출하고 있습니다.</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>레플리매트 오작동</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed -->
<LetterTextReplimatMalfunctionKibble>{0}이 오작동해 대량의 동물 먹이를 생산하고 있습니다.</LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>레플리매트 컴퓨터와 연결 필요</NotConnectedToComputer>

Expand Down
12 changes: 0 additions & 12 deletions Common/Languages/PortugueseBrazilian/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>Total de matéria-prima armazenada {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>Derramamento de Replimat</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere. -->
<LetterTextReplimatSpill>Um {0} tem um mau funcionamento, derramando matéria-prima nutriente em todos os lugares.</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>Mau funcionamento do Replimat</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed. -->
<LetterTextReplimatMalfunctionKibble>Um {0} tem um mau funcionamento, produzindo grandes quantidades de ração animal. </LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>Requer conexão com o Computador Replimat</NotConnectedToComputer>

Expand Down
12 changes: 0 additions & 12 deletions Common/Languages/Russian/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>Всего сырья хранится {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>Поток сырья</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere. -->
<LetterTextReplimatSpill>A {0} неисправен, разливая питательное сырье повсюду.</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>Неисправность создания</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed. -->
<LetterTextReplimatMalfunctionKibble>Произошел сбой {0}, что привело к образованию большого количества корма для животных.</LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>Требуется подключение к компьютеру Реплимат</NotConnectedToComputer>

Expand Down
12 changes: 0 additions & 12 deletions Common/Languages/Ukrainian/Keyed/Replimat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
<!-- EN: Total feedstock stored {0} / {1} L -->
<TotalFeedstockStored>загальна кількість сировини що зберігається {0} / {1} L</TotalFeedstockStored>

<!-- EN: Replimat Spill -->
<LetterLabelReplimatSpill>розлив репімату</LetterLabelReplimatSpill>

<!-- EN: A {0} has malfunctioned, spilling nutrient feedstock everywhere. -->
<LetterTextReplimatSpill>Один {0} розбився, розливши поживні речовини на всі боки.</LetterTextReplimatSpill>

<!-- EN: Replimat Malfunction -->
<LetterLabelReplimatMalfunctionKibble>несправність реплімату</LetterLabelReplimatMalfunctionKibble>

<!-- EN: A {0} has malfunctioned, producing large quantities of animal feed. -->
<LetterTextReplimatMalfunctionKibble>Один {0} вийшов з ладу, виробляючи велику кількість кормів для тварин.</LetterTextReplimatMalfunctionKibble>

<!-- EN: Requires connection to Replimat Computer -->
<NotConnectedToComputer>Потребує підключення до комп'ютера реплікатора</NotConnectedToComputer>

Expand Down
10 changes: 3 additions & 7 deletions Source/Incidents/IncidentWorker_ReplimatMalfunctionKibble.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override bool TryExecuteWorker(IncidentParms parms)

if (!list.Any())
{
// If there are no Terminals or Animal Feeders, break out of execution early
// If there are no Terminals, break out of execution early
return false;
}

Expand All @@ -38,12 +38,8 @@ public override bool TryExecuteWorker(IncidentParms parms)
t.stackCount = unitsOfKibble;
GenPlace.TryPlaceThing(t, building_ReplimatTerminal.InteractionCell, map, ThingPlaceMode.Near);

string letterLabel = "LetterLabelReplimatMalfunctionKibble".Translate();

string letterText = "LetterTextReplimatMalfunctionKibble".Translate(new object[]
{
currentTerminal.def.label
});
TaggedString letterLabel = def.letterLabel;
TaggedString letterText = def.letterText.Formatted(currentTerminal.def.label).Resolve();

Find.LetterStack.ReceiveLetter(letterLabel, letterText, LetterDefOf.NegativeEvent, new TargetInfo(building_ReplimatTerminal.Position, map, false), null);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override bool TryExecuteWorker(IncidentParms parms)

if (!list.Any())
{
// If there are no Terminals or Animal Feeders, break out of execution early
// If there are no Terminals, break out of execution early
return false;
}

Expand Down
16 changes: 4 additions & 12 deletions Source/Incidents/IncidentWorker_ReplimatSpill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ public override bool TryExecuteWorker(IncidentParms parms)
ThingDef filthSlime = ThingDefOf.Filth_Slime;
FilthMaker.TryMakeFilth(targetTerminal.InteractionCell, map, filthSlime, Rand.Range(10, 12));

string letterLabel = "LetterLabelReplimatSpill".Translate();

string letterText = "LetterTextReplimatSpill".Translate(new object[]
{
currentTerminal.def.label
});
TaggedString letterLabel = def.letterLabel;
TaggedString letterText = def.letterText.Formatted(currentTerminal.def.label).Resolve();

Find.LetterStack.ReceiveLetter(letterLabel, letterText, LetterDefOf.NegativeEvent, new TargetInfo(targetTerminal.Position, map));
return true;
Expand All @@ -59,12 +55,8 @@ public override bool TryExecuteWorker(IncidentParms parms)
ThingDef filthSlime = ThingDefOf.Filth_Slime;
FilthMaker.TryMakeFilth(targetTerminal.InteractionCell, map, filthSlime, Rand.Range(10, 12));

string letterLabel = "LetterLabelReplimatSpill".Translate();

string letterText = "LetterTextReplimatSpill".Translate(new object[]
{
currentAnimalFeeder.def.label
});
TaggedString letterLabel = def.letterLabel;
TaggedString letterText = def.letterText.Formatted(currentAnimalFeeder.def.label).Resolve();

Find.LetterStack.ReceiveLetter(letterLabel, letterText, LetterDefOf.NegativeEvent, new TargetInfo(targetTerminal.Position, map));
return true;
Expand Down

0 comments on commit 773ac34

Please sign in to comment.