v1.0.13.1 (first post-1.0 patch)
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Barotrauma
|
||||
public override void DebugDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
|
||||
{
|
||||
if (Character == Character.Controlled) { return; }
|
||||
if (!debugai) { return; }
|
||||
if (!DebugAI) { return; }
|
||||
Vector2 pos = Character.WorldPosition;
|
||||
pos.Y = -pos.Y;
|
||||
Vector2 textOffset = new Vector2(-40, -160);
|
||||
|
||||
@@ -19,6 +19,17 @@ namespace Barotrauma
|
||||
|
||||
private IEnumerable<CoroutineStatus> FadeOutColors(float time)
|
||||
{
|
||||
|
||||
Dictionary<MapEntity, Color> originalColors = new Dictionary<MapEntity, Color>();
|
||||
foreach (var item in thalamusItems)
|
||||
{
|
||||
originalColors.Add(item, item.SpriteColor);
|
||||
}
|
||||
foreach (var structure in thalamusStructures)
|
||||
{
|
||||
originalColors.Add(structure, structure.SpriteColor);
|
||||
}
|
||||
|
||||
float timer = 0;
|
||||
while (timer < time)
|
||||
{
|
||||
@@ -26,15 +37,16 @@ namespace Barotrauma
|
||||
float m = MathHelper.Lerp(1, Config.DeadEntityColorMultiplier, MathUtils.InverseLerp(0, time, timer));
|
||||
foreach (var item in thalamusItems)
|
||||
{
|
||||
if (item.Color.A == 0) { continue; }
|
||||
if (item.Prefab.BrokenSprites.None())
|
||||
{
|
||||
Color c = item.Prefab.SpriteColor;
|
||||
Color c = originalColors[item];
|
||||
item.SpriteColor = new Color(c.R / 255f * m, c.G / 255f * m, c.B / 255f * m, c.A / 255f);
|
||||
}
|
||||
}
|
||||
foreach (var structure in thalamusStructures)
|
||||
{
|
||||
Color c = structure.Prefab.SpriteColor;
|
||||
Color c = originalColors[structure];
|
||||
structure.SpriteColor = new Color(c.R / 255f * m, c.G / 255f * m, c.B / 255f * m, c.A / 255f);
|
||||
}
|
||||
yield return CoroutineStatus.Running;
|
||||
|
||||
@@ -6,11 +6,17 @@ namespace Barotrauma
|
||||
{
|
||||
partial class Attack
|
||||
{
|
||||
[Serialize("StructureBlunt", IsPropertySaveable.Yes), Editable()]
|
||||
[Serialize("StructureBlunt", IsPropertySaveable.Yes, description: "Name of the sound effect the attack makes when it hits a structure."), Editable()]
|
||||
public string StructureSoundType { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sound to play when the attack deals damage.
|
||||
/// </summary>
|
||||
private RoundSound sound;
|
||||
|
||||
/// <summary>
|
||||
/// Particle emitter to use when the attack deals damage.
|
||||
/// </summary>
|
||||
private ParticleEmitter particleEmitter;
|
||||
|
||||
partial void InitProjSpecific(ContentXElement element)
|
||||
|
||||
@@ -582,7 +582,7 @@ namespace Barotrauma
|
||||
float closestItemDistance = Math.Max(aimAssistAmount, 2.0f);
|
||||
foreach (MapEntity entity in entityList)
|
||||
{
|
||||
if (!(entity is Item item))
|
||||
if (entity is not Item item)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -153,6 +153,7 @@ namespace Barotrauma
|
||||
private static readonly List<BossProgressBar> bossProgressBars = new List<BossProgressBar>();
|
||||
|
||||
private static readonly Dictionary<Identifier, LocalizedString> cachedHudTexts = new Dictionary<Identifier, LocalizedString>();
|
||||
private static LanguageIdentifier cachedHudTextLanguage = LanguageIdentifier.None;
|
||||
|
||||
private static GUILayoutGroup bossHealthContainer;
|
||||
|
||||
@@ -202,10 +203,15 @@ namespace Barotrauma
|
||||
|
||||
public static LocalizedString GetCachedHudText(string textTag, InputType keyBind)
|
||||
{
|
||||
if (cachedHudTextLanguage != GameSettings.CurrentConfig.Language)
|
||||
{
|
||||
cachedHudTexts.Clear();
|
||||
}
|
||||
Identifier key = (textTag + keyBind).ToIdentifier();
|
||||
if (cachedHudTexts.TryGetValue(key, out LocalizedString text)) { return text; }
|
||||
text = TextManager.GetWithVariable(textTag, "[key]", GameSettings.CurrentConfig.KeyMap.KeyBindText(keyBind)).Value;
|
||||
cachedHudTexts.Add(key, text);
|
||||
cachedHudTextLanguage = GameSettings.CurrentConfig.Language;
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
@@ -701,10 +701,11 @@ namespace Barotrauma
|
||||
blurStrength = Math.Max(blurStrength, affliction.GetScreenBlurStrength());
|
||||
radialDistortStrength = Math.Max(radialDistortStrength, affliction.GetRadialDistortStrength());
|
||||
chromaticAberrationStrength = Math.Max(chromaticAberrationStrength, affliction.GetChromaticAberrationStrength());
|
||||
|
||||
float afflictionGrainStrength = affliction.GetScreenGrainStrength();
|
||||
if (afflictionGrainStrength > 0.0f)
|
||||
{
|
||||
grainStrength = Math.Max(grainStrength, affliction.GetScreenGrainStrength());
|
||||
grainStrength = Math.Max(grainStrength, afflictionGrainStrength);
|
||||
Color afflictionGrainColor = affliction.GetActiveEffect()?.GrainColor ?? Color.White;
|
||||
grainColor = Color.Lerp(grainColor, afflictionGrainColor, (float)Math.Pow(1.0f - oxygenLowStrength, 2));
|
||||
}
|
||||
@@ -1020,12 +1021,8 @@ namespace Barotrauma
|
||||
foreach (KeyValuePair<Affliction, LimbHealth> kvp in afflictions)
|
||||
{
|
||||
var affliction = kvp.Key;
|
||||
if (affliction.Prefab.AfflictionOverlay != null)
|
||||
{
|
||||
Sprite ScreenAfflictionOverlay = affliction.Prefab.AfflictionOverlay;
|
||||
ScreenAfflictionOverlay?.Draw(spriteBatch, Vector2.Zero, Color.White * affliction.GetAfflictionOverlayMultiplier(), Vector2.Zero, 0.0f,
|
||||
new Vector2(GameMain.GraphicsWidth / DamageOverlay.size.X, GameMain.GraphicsHeight / DamageOverlay.size.Y));
|
||||
}
|
||||
affliction.Prefab.AfflictionOverlay?.Draw(spriteBatch, Vector2.Zero, Color.White * affliction.GetAfflictionOverlayMultiplier(), Vector2.Zero, 0.0f,
|
||||
new Vector2(GameMain.GraphicsWidth / DamageOverlay.size.X, GameMain.GraphicsHeight / DamageOverlay.size.Y));
|
||||
}
|
||||
|
||||
float damageOverlayAlpha = DamageOverlayTimer;
|
||||
|
||||
Reference in New Issue
Block a user