Unstable v0.1300.0.1
This commit is contained in:
@@ -39,6 +39,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private Pair<Rectangle, string> tooltip;
|
||||
|
||||
private GUITextBlock requiredTimeBlock;
|
||||
|
||||
partial void InitProjSpecific()
|
||||
{
|
||||
CreateGUI();
|
||||
@@ -522,7 +524,7 @@ namespace Barotrauma.Items.Components
|
||||
AutoScaleHorizontal = true,
|
||||
};
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedReqFrame.RectTransform), ToolBox.SecondsToReadableTime(requiredTime),
|
||||
requiredTimeBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedReqFrame.RectTransform), ToolBox.SecondsToReadableTime(requiredTime),
|
||||
font: GUI.SmallFont);
|
||||
return true;
|
||||
}
|
||||
@@ -606,6 +608,12 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
partial void UpdateRequiredTimeProjSpecific()
|
||||
{
|
||||
if (requiredTimeBlock == null) { return; }
|
||||
requiredTimeBlock.Text = ToolBox.SecondsToReadableTime(timeUntilReady > 0.0f ? timeUntilReady : requiredTime);
|
||||
}
|
||||
|
||||
public void ClientWrite(IWriteMessage msg, object[] extraData = null)
|
||||
{
|
||||
int itemIndex = pendingFabricatedItem == null ? -1 : fabricationRecipes.IndexOf(pendingFabricatedItem);
|
||||
|
||||
@@ -1380,6 +1380,7 @@ namespace Barotrauma.Items.Components
|
||||
MathHelper.Clamp(c.Mass * 0.03f, 0.1f, 2.0f));
|
||||
if (!passive && !CheckBlipVisibility(blip, transducerPos)) { continue; }
|
||||
sonarBlips.Add(blip);
|
||||
HintManager.OnSonarSpottedCharacter(Item, c);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -1399,6 +1400,7 @@ namespace Barotrauma.Items.Components
|
||||
MathHelper.Clamp(limb.Mass * 0.1f, 0.1f, 2.0f));
|
||||
if (!passive && !CheckBlipVisibility(blip, transducerPos)) { continue; }
|
||||
sonarBlips.Add(blip);
|
||||
HintManager.OnSonarSpottedCharacter(Item, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,8 +357,8 @@ namespace Barotrauma.Items.Components
|
||||
DockingSources.Any(d => d.Docked && (d.DockingTarget?.Item.Submarine?.Info?.IsOutpost ?? false)))
|
||||
{
|
||||
// Undocking from an outpost
|
||||
campaign.CampaignUI.SelectTab(CampaignMode.InteractionType.Map);
|
||||
campaign.ShowCampaignUI = true;
|
||||
campaign.CampaignUI.SelectTab(CampaignMode.InteractionType.Map);
|
||||
return false;
|
||||
}
|
||||
else if (!Level.IsLoadedOutpost && DockingModeEnabled && ActiveDockingSource != null &&
|
||||
@@ -748,7 +748,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
if (!AutoPilot && Character.DisableControls && GUI.KeyboardDispatcher.Subscriber == null)
|
||||
{
|
||||
steeringAdjustSpeed = character == null ? 0.2f : MathHelper.Lerp(0.2f, 1.0f, character.GetSkillLevel("helm") / 100.0f);
|
||||
steeringAdjustSpeed = character == null ? DefaultSteeringAdjustSpeed : MathHelper.Lerp(0.2f, 1.0f, character.GetSkillLevel("helm") / 100.0f);
|
||||
Vector2 input = Vector2.Zero;
|
||||
if (PlayerInput.KeyDown(InputType.Left)) { input -= Vector2.UnitX; }
|
||||
if (PlayerInput.KeyDown(InputType.Right)) { input += Vector2.UnitX; }
|
||||
|
||||
@@ -98,8 +98,11 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override void UpdateHUD(Character character, float deltaTime, Camera cam)
|
||||
{
|
||||
float chargeRatio = charge / capacity;
|
||||
chargeIndicator.Color = ToolBox.GradientLerp(chargeRatio, Color.Red, Color.Orange, Color.Green);
|
||||
if (chargeIndicator != null)
|
||||
{
|
||||
float chargeRatio = charge / capacity;
|
||||
chargeIndicator.Color = ToolBox.GradientLerp(chargeRatio, Color.Red, Color.Orange, Color.Green);
|
||||
}
|
||||
}
|
||||
|
||||
public void Draw(SpriteBatch spriteBatch, bool editing = false, float itemDepth = -1)
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Barotrauma.Items.Components
|
||||
SpriteEffects.None,
|
||||
depth);
|
||||
}
|
||||
}
|
||||
}
|
||||
private static Sprite defaultWireSprite;
|
||||
private Sprite overrideSprite;
|
||||
private Sprite wireSprite;
|
||||
|
||||
Reference in New Issue
Block a user