Unstable 0.1500.7.0 (No edition)
This commit is contained in:
+6
-5
@@ -497,7 +497,6 @@ namespace Barotrauma.CharacterEditor
|
||||
}
|
||||
if (PlayerInput.KeyHit(InputType.Run))
|
||||
{
|
||||
// TODO: refactor this horrible hacky index manipulation mess
|
||||
int index = 0;
|
||||
bool isSwimming = character.AnimController.ForceSelectAnimationType == AnimationType.SwimFast || character.AnimController.ForceSelectAnimationType == AnimationType.SwimSlow;
|
||||
bool isMovingFast = character.AnimController.ForceSelectAnimationType == AnimationType.Run || character.AnimController.ForceSelectAnimationType == AnimationType.SwimFast;
|
||||
@@ -505,23 +504,25 @@ namespace Barotrauma.CharacterEditor
|
||||
{
|
||||
if (isSwimming || !character.AnimController.CanWalk)
|
||||
{
|
||||
index = !character.AnimController.CanWalk ? 0 : (int)AnimationType.SwimSlow - 1;
|
||||
index = !character.AnimController.CanWalk ? (int)AnimationType.SwimFast : (int)AnimationType.SwimSlow;
|
||||
}
|
||||
else
|
||||
{
|
||||
index = (int)AnimationType.Walk - 1;
|
||||
index = (int)AnimationType.Walk;
|
||||
}
|
||||
index -= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isSwimming || !character.AnimController.CanWalk)
|
||||
{
|
||||
index = !character.AnimController.CanWalk ? 1 : (int)AnimationType.SwimFast - 1;
|
||||
index = !character.AnimController.CanWalk ? (int)AnimationType.SwimSlow : (int)AnimationType.SwimFast;
|
||||
}
|
||||
else
|
||||
{
|
||||
index = (int)AnimationType.Run - 1;
|
||||
index = (int)AnimationType.Run;
|
||||
}
|
||||
index -= 1;
|
||||
}
|
||||
if (animSelection.SelectedIndex != index)
|
||||
{
|
||||
|
||||
@@ -92,8 +92,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (GameMain.GameSession != null) GameMain.GameSession.AddToGUIUpdateList();
|
||||
|
||||
GameMain.GameSession?.AddToGUIUpdateList();
|
||||
Character.AddAllToGUIUpdateList();
|
||||
}
|
||||
|
||||
@@ -139,7 +138,7 @@ namespace Barotrauma
|
||||
for (int i = 0; i < Submarine.MainSubs.Length; i++)
|
||||
{
|
||||
if (Submarine.MainSubs[i] == null) continue;
|
||||
if (Level.Loaded != null && Submarine.MainSubs[i].WorldPosition.Y < Level.MaxEntityDepth) continue;
|
||||
if (Level.Loaded != null && Submarine.MainSubs[i].WorldPosition.Y < Level.MaxEntityDepth) { continue; }
|
||||
|
||||
Vector2 position = Submarine.MainSubs[i].SubBody != null ? Submarine.MainSubs[i].WorldPosition : Submarine.MainSubs[i].HiddenSubPosition;
|
||||
|
||||
@@ -151,6 +150,14 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (!GUI.DisableHUD)
|
||||
{
|
||||
foreach (Character c in Character.CharacterList)
|
||||
{
|
||||
c.DrawGUIMessages(spriteBatch, cam);
|
||||
}
|
||||
}
|
||||
|
||||
GUI.Draw(cam, spriteBatch);
|
||||
|
||||
spriteBatch.End();
|
||||
|
||||
@@ -1737,9 +1737,10 @@ namespace Barotrauma
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), content.RectTransform), TextManager.GetWithVariable("startingequipmentname", "[number]", (variant + 1).ToString()), font: GUI.SubHeadingFont, textAlignment: Alignment.Center);
|
||||
|
||||
var itemIdentifiers = jobPrefab.ItemIdentifiers[variant]
|
||||
.Distinct()
|
||||
.Where(id => jobPrefab.ShowItemPreview[variant][id]);
|
||||
var itemIdentifiers = jobPrefab.PreviewItems[variant]
|
||||
.Where(it => it.ShowPreview)
|
||||
.Select(it => it.ItemIdentifier)
|
||||
.Distinct();
|
||||
|
||||
int itemsPerRow = 5;
|
||||
int rows = (int)Math.Max(Math.Ceiling(itemIdentifiers.Count() / (float)itemsPerRow), 1);
|
||||
@@ -2624,9 +2625,10 @@ namespace Barotrauma
|
||||
|
||||
private void DrawJobVariantItems(SpriteBatch spriteBatch, GUICustomComponent component, Pair<JobPrefab, int> jobPrefab, int itemsPerRow)
|
||||
{
|
||||
var itemIdentifiers = jobPrefab.First.ItemIdentifiers[jobPrefab.Second]
|
||||
.Distinct()
|
||||
.Where(id => jobPrefab.First.ShowItemPreview[jobPrefab.Second][id]);
|
||||
var itemIdentifiers = jobPrefab.First.PreviewItems[jobPrefab.Second]
|
||||
.Where(it => it.ShowPreview)
|
||||
.Select(it => it.ItemIdentifier)
|
||||
.Distinct();
|
||||
|
||||
Point slotSize = new Point(component.Rect.Height);
|
||||
int spacing = (int)(5 * GUI.Scale);
|
||||
@@ -2645,7 +2647,7 @@ namespace Barotrauma
|
||||
int i = 0;
|
||||
Rectangle tooltipRect = Rectangle.Empty;
|
||||
string tooltip = null;
|
||||
foreach (string itemIdentifier in itemIdentifiers)
|
||||
foreach (var itemIdentifier in itemIdentifiers)
|
||||
{
|
||||
if (!(MapEntityPrefab.Find(null, identifier: itemIdentifier, showErrorMessages: false) is ItemPrefab itemPrefab)) { continue; }
|
||||
|
||||
@@ -2664,7 +2666,7 @@ namespace Barotrauma
|
||||
float iconScale = Math.Min(Math.Min(slotSize.X / icon.size.X, slotSize.Y / icon.size.Y), 2.0f) * 0.9f;
|
||||
icon.Draw(spriteBatch, slotPos + slotSize.ToVector2() * 0.5f, scale: iconScale);
|
||||
|
||||
int count = jobPrefab.First.ItemIdentifiers[jobPrefab.Second].Count(id => id == itemIdentifier);
|
||||
int count = jobPrefab.First.PreviewItems[jobPrefab.Second].Count(it => it.ShowPreview && it.ItemIdentifier == itemIdentifier);
|
||||
if (count > 1)
|
||||
{
|
||||
string itemCountText = "x" + count;
|
||||
|
||||
Reference in New Issue
Block a user