(3dc4135ce) v0.9.5.1

This commit is contained in:
Regalis
2019-11-21 18:22:25 +01:00
parent b39922a074
commit 5c95c53118
287 changed files with 12655 additions and 5048 deletions
@@ -80,6 +80,7 @@ namespace Barotrauma.Items.Components
public override void OnItemLoaded()
{
base.OnItemLoaded();
if (rechargeSpeedSlider != null)
{
rechargeSpeedSlider.BarScroll = rechargeSpeed / MaxRechargeSpeed;
@@ -1,5 +1,6 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Xml.Linq;
namespace Barotrauma.Items.Components
@@ -46,19 +47,26 @@ namespace Barotrauma.Items.Components
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.2f), textContainer.RectTransform), "", textColor: Color.LightGreen)
{
ToolTip = TextManager.Get("PowerTransferTipPower"),
TextGetter = () => { return powerStr.Replace("[power]", ((int)(-currPowerConsumption)).ToString()); }
TextGetter = () => { return powerStr.Replace("[power]", ((int)Math.Round(-currPowerConsumption)).ToString()); }
};
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), textContainer.RectTransform),
TextManager.Get("PowerTransferLoadLabel"), font: GUI.LargeFont)
{
ToolTip = TextManager.Get("PowerTransferTipLoad")
};
string loadStr = TextManager.Get("PowerTransferLoad");
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.2f), textContainer.RectTransform), "", textColor: Color.LightBlue)
{
ToolTip = TextManager.Get("PowerTransferTipLoad"),
TextGetter = () => { return loadStr.Replace("[load]", ((int)(powerLoad)).ToString()); }
TextGetter = () =>
{
return loadStr.Replace("[load]",
this is RelayComponent relay ?
((int)Math.Round(relay.DisplayLoad)).ToString() :
((int)Math.Round(powerLoad)).ToString());
}
};
}