Client LuaCsForBarotrauma
BarotraumaClient/ClientSource/Items/Components/Quality.cs
1
using
Microsoft.Xna.Framework;
2
using
System;
3
using
System.Collections.Generic;
4
using
System.Xml.Linq;
5
6
namespace
Barotrauma.Items.Components
7
{
8
partial class
Quality : ItemComponent
9
{
10
public
override
void
AddTooltipInfo
(ref
LocalizedString
name
, ref
LocalizedString
description)
11
{
12
foreach
(var statValue
in
statValues)
13
{
14
int
roundedValue = (int)Math.Round(statValue.Value * qualityLevel * 100);
15
if
(roundedValue == 0) {
return
; }
16
string
colorStr = XMLExtensions.ColorToString(GUIStyle.Green);
17
description += $
"\n ‖color:{colorStr}‖{roundedValue.ToString("
+0;-#
")}%‖color:end‖ {TextManager.Get("
qualitystattypenames.
" + statValue.Key.ToString()).Fallback(statValue.Key.ToString())}"
;
18
}
19
}
20
}
21
}
Barotrauma.Items.Components.ItemComponent.name
string name
Definition:
BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs:38
Barotrauma.Items.Components.Quality.AddTooltipInfo
override void AddTooltipInfo(ref LocalizedString name, ref LocalizedString description)
Definition:
BarotraumaClient/ClientSource/Items/Components/Quality.cs:10
Barotrauma.LocalizedString
Definition:
LocalizedString.cs:8
Barotrauma.Items.Components
Definition:
BarotraumaShared/SharedSource/Items/Components/DockingPort.cs:15
Barotrauma
BarotraumaClient
ClientSource
Items
Components
Quality.cs
Generated by
1.9.1