Faction Test 100.4.0.0
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Barotrauma.Networking;
|
||||
|
||||
@@ -6,7 +7,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
partial class Wearable : Pickable, IServerSerializable
|
||||
{
|
||||
private void GetDamageModifierText(ref LocalizedString description, DamageModifier damageModifier, Identifier afflictionIdentifier)
|
||||
private static void GetDamageModifierText(ref LocalizedString description, DamageModifier damageModifier, Identifier afflictionIdentifier)
|
||||
{
|
||||
int roundedValue = (int)Math.Round((1 - damageModifier.DamageMultiplier * damageModifier.ProbabilityMultiplier) * 100);
|
||||
if (roundedValue == 0) { return; }
|
||||
@@ -19,8 +20,13 @@ namespace Barotrauma.Items.Components
|
||||
if (!description.IsNullOrWhiteSpace()) { description += '\n'; }
|
||||
description += $" ‖color:{colorStr}‖{roundedValue.ToString("-0;+#")}%‖color:end‖ {afflictionName}";
|
||||
}
|
||||
|
||||
|
||||
public override void AddTooltipInfo(ref LocalizedString name, ref LocalizedString description)
|
||||
{
|
||||
AddTooltipInfo(damageModifiers, SkillModifiers, ref description);
|
||||
}
|
||||
|
||||
public static void AddTooltipInfo(IReadOnlyList<DamageModifier> damageModifiers, IReadOnlyDictionary<Identifier, float> skillModifiers, ref LocalizedString description)
|
||||
{
|
||||
if (damageModifiers.Any())
|
||||
{
|
||||
@@ -41,9 +47,9 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
}
|
||||
if (SkillModifiers.Any())
|
||||
if (skillModifiers.Any())
|
||||
{
|
||||
foreach (var skillModifier in SkillModifiers)
|
||||
foreach (var skillModifier in skillModifiers)
|
||||
{
|
||||
string colorStr = XMLExtensions.ToStringHex(GUIStyle.Green);
|
||||
int roundedValue = (int)Math.Round(skillModifier.Value);
|
||||
|
||||
Reference in New Issue
Block a user