More hard-coded text removal, fixed StatusHUD displaying husk infection state incorrectly
This commit is contained in:
@@ -178,7 +178,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (GameMain.NetworkMember != null && Character.controlled == this)
|
if (GameMain.NetworkMember != null && Character.controlled == this)
|
||||||
{
|
{
|
||||||
string chatMessage = TextManager.Get("Self_CauseOfDeath." + causeOfDeath.ToString());
|
string chatMessage = TextManager.Get("Self_CauseOfDeathDescription." + causeOfDeath.ToString());
|
||||||
if (GameMain.Client != null) chatMessage += " Your chat messages will only be visible to other dead players.";
|
if (GameMain.Client != null) chatMessage += " Your chat messages will only be visible to other dead players.";
|
||||||
|
|
||||||
GameMain.NetworkMember.AddChatMessage(chatMessage, ChatMessageType.Dead);
|
GameMain.NetworkMember.AddChatMessage(chatMessage, ChatMessageType.Dead);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace Barotrauma
|
|||||||
Character character = characterInfo.Character;
|
Character character = characterInfo.Character;
|
||||||
if (character == null || character.IsDead)
|
if (character == null || character.IsDead)
|
||||||
{
|
{
|
||||||
statusText = TextManager.Get("CauseOfDeath." + characterInfo.CauseOfDeath.ToString());
|
statusText = TextManager.Get("CauseOfDeathDescription." + characterInfo.CauseOfDeath.ToString());
|
||||||
statusColor = Color.DarkRed;
|
statusColor = Color.DarkRed;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,11 +8,30 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
partial class StatusHUD : ItemComponent
|
partial class StatusHUD : ItemComponent
|
||||||
{
|
{
|
||||||
private static readonly string[] BleedingTexts = { "Minor bleeding", "Bleeding", "Bleeding heavily", "Catastrophic Bleeding" };
|
private static readonly string[] BleedingTexts =
|
||||||
|
{
|
||||||
|
TextManager.Get("MinorBleeding"),
|
||||||
|
TextManager.Get("Bleeding"),
|
||||||
|
TextManager.Get("HeavyBleeding"),
|
||||||
|
TextManager.Get("CatastrophicBleeding")
|
||||||
|
};
|
||||||
|
|
||||||
private static readonly string[] HealthTexts = { "No visible injuries", "Minor injuries", "Injured", "Major injuries", "Critically injured" };
|
private static readonly string[] HealthTexts =
|
||||||
|
{
|
||||||
|
TextManager.Get("NoInjuries"),
|
||||||
|
TextManager.Get("MinorInjuries"),
|
||||||
|
TextManager.Get("Injuries"),
|
||||||
|
TextManager.Get("MajorInjuries"),
|
||||||
|
TextManager.Get("CriticalInjuries")
|
||||||
|
};
|
||||||
|
|
||||||
private static readonly string[] OxygenTexts = { "Oxygen level normal", "Gasping for air", "Signs of oxygen deprivation", "Not breathing" };
|
private static readonly string[] OxygenTexts =
|
||||||
|
{
|
||||||
|
TextManager.Get("OxygenNormal"),
|
||||||
|
TextManager.Get("OxygenReduced"),
|
||||||
|
TextManager.Get("OxygenLow"),
|
||||||
|
TextManager.Get("NotBreathing")
|
||||||
|
};
|
||||||
|
|
||||||
[Serialize(500.0f, false)]
|
[Serialize(500.0f, false)]
|
||||||
public float Range
|
public float Range
|
||||||
@@ -126,20 +145,20 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (target.IsDead)
|
if (target.IsDead)
|
||||||
{
|
{
|
||||||
texts.Add("Deceased");
|
texts.Add(TextManager.Get("Deceased"));
|
||||||
texts.Add("Cause of Death: " + target.CauseOfDeath.ToString());
|
texts.Add(TextManager.Get("CauseOfDeath") + ": " + TextManager.Get("CauseOfDeath." + target.CauseOfDeath.ToString()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (target.IsUnconscious) texts.Add("Unconscious");
|
if (target.IsUnconscious) texts.Add(TextManager.Get("Unconscious"));
|
||||||
if (target.Stun > 0.01f) texts.Add("Stunned");
|
if (target.Stun > 0.01f) texts.Add(TextManager.Get("Stunned"));
|
||||||
|
|
||||||
int healthTextIndex = target.Health > 95.0f ? 0 :
|
int healthTextIndex = target.Health > 95.0f ? 0 :
|
||||||
MathHelper.Clamp((int)Math.Ceiling((1.0f - (target.Health / 200.0f + 0.5f)) * HealthTexts.Length), 0, HealthTexts.Length - 1);
|
MathHelper.Clamp((int)Math.Ceiling((1.0f - (target.Health / 200.0f + 0.5f)) * HealthTexts.Length), 0, HealthTexts.Length - 1);
|
||||||
|
|
||||||
texts.Add(HealthTexts[healthTextIndex]);
|
texts.Add(HealthTexts[healthTextIndex]);
|
||||||
|
|
||||||
int oxygenTextIndex = MathHelper.Clamp((int)Math.Floor((1.0f - (target.Oxygen / 200.0f + 0.5f)) * OxygenTexts.Length), 0, OxygenTexts.Length - 1);
|
int oxygenTextIndex = MathHelper.Clamp((int)Math.Floor((1.0f - (target.Oxygen / 100.0f)) * OxygenTexts.Length), 0, OxygenTexts.Length - 1);
|
||||||
texts.Add(OxygenTexts[oxygenTextIndex]);
|
texts.Add(OxygenTexts[oxygenTextIndex]);
|
||||||
|
|
||||||
if (target.Bleeding > 0.0f)
|
if (target.Bleeding > 0.0f)
|
||||||
@@ -150,13 +169,13 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (target.huskInfection != null)
|
if (target.huskInfection != null)
|
||||||
{
|
{
|
||||||
if (target.huskInfection.State != HuskInfection.InfectionState.Transition)
|
if (target.huskInfection.State == HuskInfection.InfectionState.Transition)
|
||||||
{
|
{
|
||||||
texts.Add("Velonaceps calyx infection");
|
texts.Add(TextManager.Get("HuskInfectionTransition"));
|
||||||
}
|
}
|
||||||
else if (target.huskInfection.State != HuskInfection.InfectionState.Active)
|
else if (target.huskInfection.State == HuskInfection.InfectionState.Active)
|
||||||
{
|
{
|
||||||
texts.Add("Advanced Velonaceps calyx infection");
|
texts.Add(TextManager.Get("HuskInfectionActive"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,6 @@
|
|||||||
<Grabbing>Grabbing</Grabbing>
|
<Grabbing>Grabbing</Grabbing>
|
||||||
<Stun>Stun</Stun>
|
<Stun>Stun</Stun>
|
||||||
|
|
||||||
|
|
||||||
<!-- Status -->
|
<!-- Status -->
|
||||||
<StatusOK>OK</StatusOK>
|
<StatusOK>OK</StatusOK>
|
||||||
<Unconscious>Unconscious</Unconscious>
|
<Unconscious>Unconscious</Unconscious>
|
||||||
@@ -135,6 +134,7 @@
|
|||||||
<Crew>Crew</Crew>
|
<Crew>Crew</Crew>
|
||||||
<Store>Store</Store>
|
<Store>Store</Store>
|
||||||
<Hire>Hire</Hire>
|
<Hire>Hire</Hire>
|
||||||
|
<HireButton>Hire</HireButton>
|
||||||
<Location>Location</Location>
|
<Location>Location</Location>
|
||||||
<HireUnavailable>No-one available for hire.</HireUnavailable>
|
<HireUnavailable>No-one available for hire.</HireUnavailable>
|
||||||
<Mission>Mission</Mission>
|
<Mission>Mission</Mission>
|
||||||
@@ -280,28 +280,61 @@
|
|||||||
<TraitorEndMessageFailureTraitorDetained>[traitorname] was a traitor! [Genderpronounpossessive] task was to assassinate [targetname]. The task failed - [genderpronoun] was successfully detained.</TraitorEndMessageFailureTraitorDetained>
|
<TraitorEndMessageFailureTraitorDetained>[traitorname] was a traitor! [Genderpronounpossessive] task was to assassinate [targetname]. The task failed - [genderpronoun] was successfully detained.</TraitorEndMessageFailureTraitorDetained>
|
||||||
|
|
||||||
<!-- Causes of death -->
|
<!-- Causes of death -->
|
||||||
<CauseOfDeath.Damage>Succumbed to their injuries</CauseOfDeath.Damage>
|
<CauseOfDeath>Cause of death</CauseOfDeath>
|
||||||
<CauseOfDeath.Bloodloss>Bled out</CauseOfDeath.Bloodloss>
|
<CauseOfDeath.Damage>Damage</CauseOfDeath.Damage>
|
||||||
<CauseOfDeath.Drowning>Drowned</CauseOfDeath.Drowning>
|
<CauseOfDeath.Bloodloss>Bloodloss</CauseOfDeath.Bloodloss>
|
||||||
<CauseOfDeath.Suffocation>Suffocated</CauseOfDeath.Suffocation>
|
<CauseOfDeath.Drowning>Drowning</CauseOfDeath.Drowning>
|
||||||
<CauseOfDeath.Pressure>Crushed by water pressure</CauseOfDeath.Pressure>
|
<CauseOfDeath.Suffocation>Suffocation</CauseOfDeath.Suffocation>
|
||||||
<CauseOfDeath.Burn>Burned to death</CauseOfDeath.Burn>
|
<CauseOfDeath.Pressure>Pressure</CauseOfDeath.Pressure>
|
||||||
<CauseOfDeath.Husk>Taken over by a parasite</CauseOfDeath.Husk>
|
<CauseOfDeath.Burn>Burn</CauseOfDeath.Burn>
|
||||||
<CauseOfDeath.Disconnected>Disconnected</CauseOfDeath.Disconnected>
|
<CauseOfDeath.Husk>Husk infection</CauseOfDeath.Husk>
|
||||||
|
<CauseOfDeath.Disconnected>Braindead</CauseOfDeath.Disconnected>
|
||||||
|
|
||||||
<Self_CauseOfDeath.Damage>You have succumbed to your injuries.</Self_CauseOfDeath.Damage>
|
<CauseOfDeathDescription.Damage>Succumbed to their injuries</CauseOfDeathDescription.Damage>
|
||||||
<Self_CauseOfDeath.Bloodloss>You have bled out.</Self_CauseOfDeath.Bloodloss>
|
<CauseOfDeathDescription.Bloodloss>Bled out</CauseOfDeathDescription.Bloodloss>
|
||||||
<Self_CauseOfDeath.Drowning>You have drowned.</Self_CauseOfDeath.Drowning>
|
<CauseOfDeathDescription.Drowning>Drowned</CauseOfDeathDescription.Drowning>
|
||||||
<Self_CauseOfDeath.Suffocation>You have suffocated.</Self_CauseOfDeath.Suffocation>
|
<CauseOfDeathDescription.Suffocation>Suffocated</CauseOfDeathDescription.Suffocation>
|
||||||
<Self_CauseOfDeath.Pressure>You have been crushed by water pressure.</Self_CauseOfDeath.Pressure>
|
<CauseOfDeathDescription.Pressure>Crushed by water pressure</CauseOfDeathDescription.Pressure>
|
||||||
<Self_CauseOfDeath.Burn>You have burned to death.</Self_CauseOfDeath.Burn>
|
<CauseOfDeathDescription.Burn>Burned to death</CauseOfDeathDescription.Burn>
|
||||||
<Self_CauseOfDeath.Husk>The parasite has taken over your body.</Self_CauseOfDeath.Husk>
|
<CauseOfDeathDescription.Husk>Taken over by a parasite</CauseOfDeathDescription.Husk>
|
||||||
<Self_CauseOfDeath.Disconnected>You were disconnected from the server.</Self_CauseOfDeath.Disconnected>
|
<CauseOfDeathDescription.Disconnected>Disconnected</CauseOfDeathDescription.Disconnected>
|
||||||
|
|
||||||
|
<Self_CauseOfDeathDescription.Damage>You have succumbed to your injuries.</Self_CauseOfDeathDescription.Damage>
|
||||||
|
<Self_CauseOfDeathDescription.Bloodloss>You have bled out.</Self_CauseOfDeathDescription.Bloodloss>
|
||||||
|
<Self_CauseOfDeathDescription.Drowning>You have drowned.</Self_CauseOfDeathDescription.Drowning>
|
||||||
|
<Self_CauseOfDeathDescription.Suffocation>You have suffocated.</Self_CauseOfDeathDescription.Suffocation>
|
||||||
|
<Self_CauseOfDeathDescription.Pressure>You have been crushed by water pressure.</Self_CauseOfDeathDescription.Pressure>
|
||||||
|
<Self_CauseOfDeathDescription.Burn>You have burned to death.</Self_CauseOfDeathDescription.Burn>
|
||||||
|
<Self_CauseOfDeathDescription.Husk>The parasite has taken over your body.</Self_CauseOfDeathDescription.Husk>
|
||||||
|
<Self_CauseOfDeathDescription.Disconnected>You were disconnected from the server.</Self_CauseOfDeathDescription.Disconnected>
|
||||||
|
|
||||||
<GiveInButton>Give in</GiveInButton>
|
<GiveInButton>Give in</GiveInButton>
|
||||||
<GiveInHelpMultiplayer>Let go of your character and enter spectator mode (other players will no longer be able to revive you)</GiveInHelpMultiplayer>
|
<GiveInHelpMultiplayer>Let go of your character and enter spectator mode (other players will no longer be able to revive you)</GiveInHelpMultiplayer>
|
||||||
<GiveInHelpSingleplayer>"The character can no longer be revived if you give in."</GiveInHelpSingleplayer>
|
<GiveInHelpSingleplayer>"The character can no longer be revived if you give in."</GiveInHelpSingleplayer>
|
||||||
|
|
||||||
|
<!-- Status -->
|
||||||
|
<Deceased>Deceased</Deceased>
|
||||||
|
<Unconscious>Unconscious</Unconscious>
|
||||||
|
<Stunned>Stunned</Stunned>
|
||||||
|
<HuskInfectionTransition>Velonaceps calyx infection</HuskInfectionTransition>
|
||||||
|
<HuskInfectionActive>Advanced Velonaceps calyx infection</HuskInfectionActive>
|
||||||
|
|
||||||
|
<MinorBleeding>Minor bleeding</MinorBleeding>
|
||||||
|
<Bleeding>Bleeding</Bleeding>
|
||||||
|
<HeavyBleeding>Heavy bleeding</HeavyBleeding>
|
||||||
|
<CatastrophicBleeding>Catastrophic bleeding</CatastrophicBleeding>
|
||||||
|
|
||||||
|
<NoInjuries>No visible injuries</NoInjuries>
|
||||||
|
<MinorInjuries>Minor injuries</MinorInjuries>
|
||||||
|
<Injuries>Injured</Injuries>
|
||||||
|
<MajorInjuries>Major injuries</MajorInjuries>
|
||||||
|
<CriticalInjuries>Critically injured</CriticalInjuries>
|
||||||
|
|
||||||
|
<OxygenNormal>Oxygen level normal</OxygenNormal>
|
||||||
|
<OxygenReduced>Gasping for air</OxygenReduced>
|
||||||
|
<OxygenLow>Signs of oxygen deprivation</OxygenLow>
|
||||||
|
<NotBreathing>Not breathing</NotBreathing>
|
||||||
|
|
||||||
<!-- Huskification -->
|
<!-- Huskification -->
|
||||||
<HuskDormant>Your throat feels sore</HuskDormant>
|
<HuskDormant>Your throat feels sore</HuskDormant>
|
||||||
<HuskDormant>Your feel feverish</HuskDormant>
|
<HuskDormant>Your feel feverish</HuskDormant>
|
||||||
|
|||||||
Reference in New Issue
Block a user