Unstable 0.1500.7.0 (No edition)

This commit is contained in:
Markus Isberg
2021-10-14 00:42:06 +09:00
parent c8943ef9c4
commit de917c5d74
105 changed files with 871 additions and 443 deletions
@@ -444,9 +444,9 @@ namespace Barotrauma.Items.Components
public virtual void DrawHUD(SpriteBatch spriteBatch, Character character) { }
public virtual void AddToGUIUpdateList()
public virtual void AddToGUIUpdateList(int order = 0)
{
GuiFrame?.AddToGUIUpdateList();
GuiFrame?.AddToGUIUpdateList(order: order);
}
public virtual void UpdateHUD(Character character, float deltaTime, Camera cam) { }
@@ -410,13 +410,13 @@ namespace Barotrauma.Items.Components
return true;
}
public override void AddToGUIUpdateList()
public override void AddToGUIUpdateList(int order = 0)
{
base.AddToGUIUpdateList();
hullInfoFrame.AddToGUIUpdateList(order: 1);
base.AddToGUIUpdateList(order);
hullInfoFrame.AddToGUIUpdateList(order: order + 1);
if (currentMode == MiniMapMode.ItemFinder && searchBar.Selected)
{
searchAutoComplete.AddToGUIUpdateList(order: 1);
searchAutoComplete.AddToGUIUpdateList(order: order + 1);
}
}
@@ -14,9 +14,9 @@ namespace Barotrauma.Items.Components
currentTarget?.UpdateHUD(cam, character,deltaTime);
}
public override void AddToGUIUpdateList()
public override void AddToGUIUpdateList(int order = 0)
{
currentTarget?.AddToGUIUpdateList();
currentTarget?.AddToGUIUpdateList(order: -1);
}
}
}
@@ -88,11 +88,6 @@ namespace Barotrauma.Items.Components
return character == Character.Controlled && character == user && character.SelectedConstruction == item;
}
public override void AddToGUIUpdateList()
{
GuiFrame?.AddToGUIUpdateList();
}
public override void UpdateHUD(Character character, float deltaTime, Camera cam)
{
if (character != Character.Controlled || character != user || character.SelectedConstruction != item) { return; }
@@ -118,9 +118,9 @@ namespace Barotrauma.Items.Components
// This method is overrided instead of the UpdateHUD method because this ensures the input box is selected
// even when the terminal component is selected for the very first time. Doing the input box selection in the
// UpdateHUD method only selects the input box on every terminal selection except for the very first time.
public override void AddToGUIUpdateList()
public override void AddToGUIUpdateList(int order = 0)
{
base.AddToGUIUpdateList();
base.AddToGUIUpdateList(order: order);
if (shouldSelectInputBox)
{
inputBox.Select();
@@ -5,9 +5,9 @@ namespace Barotrauma.Items.Components
{
partial class Wearable
{
private void GetDamageModifierText(ref string description, float damageMultiplier, string afflictionIdentifier)
private void GetDamageModifierText(ref string description, DamageModifier damageModifier, string afflictionIdentifier)
{
int roundedValue = (int)Math.Round((1 - damageMultiplier) * 100);
int roundedValue = (int)Math.Round((1 - damageModifier.DamageMultiplier * damageModifier.ProbabilityMultiplier) * 100);
if (roundedValue == 0) { return; }
string colorStr = XMLExtensions.ColorToString(GUI.Style.Green);
description += $"\n ‖color:{colorStr}‖{roundedValue.ToString("-0;+#")}%‖color:end‖ {AfflictionPrefab.List.FirstOrDefault(ap => ap.Identifier.Equals(afflictionIdentifier, StringComparison.OrdinalIgnoreCase))?.Name ?? afflictionIdentifier}";
@@ -15,7 +15,7 @@ namespace Barotrauma.Items.Components
public override void AddTooltipInfo(ref string name, ref string description)
{
if (damageModifiers.Any(d => !MathUtils.NearlyEqual(d.DamageMultiplier, 1f)) || SkillModifiers.Any())
if (damageModifiers.Any(d => !MathUtils.NearlyEqual(d.DamageMultiplier, 1f) || !MathUtils.NearlyEqual(d.ProbabilityMultiplier, 1f)) || SkillModifiers.Any())
{
description += "\n";
}
@@ -31,11 +31,11 @@ namespace Barotrauma.Items.Components
foreach (string afflictionIdentifier in damageModifier.ParsedAfflictionIdentifiers)
{
GetDamageModifierText(ref description, damageModifier.DamageMultiplier, afflictionIdentifier);
GetDamageModifierText(ref description, damageModifier, afflictionIdentifier);
}
foreach (string afflictionIdentifier in damageModifier.ParsedAfflictionTypes)
{
GetDamageModifierText(ref description, damageModifier.DamageMultiplier, afflictionIdentifier);
GetDamageModifierText(ref description, damageModifier, afflictionIdentifier);
}
}
}