Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
+8
-3
@@ -68,7 +68,7 @@ namespace Barotrauma
|
||||
public bool DivideByLimbCount { get; set; }
|
||||
|
||||
[Serialize(false, IsPropertySaveable.Yes, description: "Is the damage relative to the max vitality (percentage) or absolute (normal)"), Editable]
|
||||
public bool MultiplyByMaxVitality { get; private set; }
|
||||
public bool MultiplyByMaxVitality { get; set; }
|
||||
|
||||
public float DamagePerSecond;
|
||||
public float DamagePerSecondTimer;
|
||||
@@ -130,11 +130,16 @@ namespace Barotrauma
|
||||
public void Deserialize(XElement element)
|
||||
{
|
||||
SerializableProperties = SerializableProperty.DeserializeProperties(this, element);
|
||||
//backwards compatibility
|
||||
if (element.GetAttribute("amount") != null && element.GetAttribute("strength") == null)
|
||||
{
|
||||
Strength = element.GetAttributeFloat("amount", 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
public Affliction CreateMultiplied(float multiplier, Affliction affliction)
|
||||
{
|
||||
var instance = Prefab.Instantiate(NonClampedStrength * multiplier, Source);
|
||||
Affliction instance = Prefab.Instantiate(NonClampedStrength * multiplier, Source);
|
||||
instance.CopyProperties(affliction);
|
||||
return instance;
|
||||
}
|
||||
@@ -183,7 +188,7 @@ namespace Barotrauma
|
||||
|
||||
if (currentEffect.MultiplyByMaxVitality)
|
||||
{
|
||||
currVitalityDecrease *= characterHealth == null ? 100.0f : characterHealth.MaxVitality;
|
||||
currVitalityDecrease *= characterHealth?.MaxVitality ?? 100.0f;
|
||||
}
|
||||
|
||||
return currVitalityDecrease;
|
||||
|
||||
+12
-6
@@ -141,6 +141,9 @@ namespace Barotrauma
|
||||
if (prevDisplayedMessage.HasValue && prevDisplayedMessage.Value == State) { return; }
|
||||
if (highestStrength > Strength) { return; }
|
||||
|
||||
// Show initial husk warning by default, and disable it only if campaign difficulty settings explicitly disable it
|
||||
bool showHuskWarning = GameMain.GameSession?.Campaign?.Settings.ShowHuskWarning ?? true;
|
||||
|
||||
switch (State)
|
||||
{
|
||||
case InfectionState.Dormant:
|
||||
@@ -148,15 +151,18 @@ namespace Barotrauma
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (character == Character.Controlled)
|
||||
if (showHuskWarning)
|
||||
{
|
||||
if (character == Character.Controlled)
|
||||
{
|
||||
#if CLIENT
|
||||
GUI.AddMessage(TextManager.Get("HuskDormant"), GUIStyle.Red);
|
||||
GUI.AddMessage(TextManager.Get("HuskDormant"), GUIStyle.Red);
|
||||
#endif
|
||||
}
|
||||
else if (character.IsBot)
|
||||
{
|
||||
character.Speak(TextManager.Get("dialoghuskdormant").Value, delay: Rand.Range(0.5f, 5.0f), identifier: "huskdormant".ToIdentifier());
|
||||
}
|
||||
else if (character.IsBot)
|
||||
{
|
||||
character.Speak(TextManager.Get("dialoghuskdormant").Value, delay: Rand.Range(0.5f, 5.0f), identifier: "huskdormant".ToIdentifier());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case InfectionState.Transition:
|
||||
|
||||
Reference in New Issue
Block a user