v1.6.17.0 (Unto the Breach update)

This commit is contained in:
Regalis11
2024-10-22 17:29:04 +03:00
parent e74b3cdb17
commit 6e6c17e100
417 changed files with 17166 additions and 5870 deletions
@@ -15,7 +15,8 @@ namespace Barotrauma
public override bool IsVisible(Rectangle worldView)
{
return Screen.Selected == GameMain.SubEditorScreen || GameMain.DebugDraw;
if (Screen.Selected != GameMain.SubEditorScreen && !GameMain.DebugDraw) { return false; }
return base.IsVisible(worldView);
}
public override bool SelectableInEditor
@@ -92,6 +93,11 @@ namespace Barotrauma
if (sprite != null)
{
float spriteScale = iconSize / (float)sprite.SourceRect.Width;
if (Ladders == null && ConnectedDoor == null && ConnectedGap != null)
{
clr = Color.White;
spriteScale *= 1.5f;
}
sprite.Draw(spriteBatch, drawPos, clr, origin: sprite.size / 2, scale: spriteScale, depth: 0.001f);
sprite2?.Draw(spriteBatch, drawPos + sprite.size * spriteScale * 0.5f, clr, origin: sprite2.size / 2, scale: spriteScale, depth: 0.001f);
}
@@ -100,27 +106,39 @@ namespace Barotrauma
{
AssignedJob.Icon.Draw(spriteBatch, drawPos, AssignedJob.UIColor, scale: iconSize / (float)AssignedJob.Icon.SourceRect.Width * 0.8f, depth: 0.0f);
}
foreach (MapEntity e in linkedTo)
// alternate line drawing for when cloning the waypoint: line goes from current position to original position, where moving started
if (StartMovingPos != Vector2.Zero && SelectedList.Contains(this) && PlayerInput.IsCtrlDown())
{
GUI.DrawLine(spriteBatch,
drawPos,
new Vector2(e.DrawPosition.X, -e.DrawPosition.Y),
new Vector2(StartMovingPos.X, -StartMovingPos.Y),
(IsTraversable ? GUIStyle.Green : Color.Gray) * 0.7f, width: 5, depth: 0.002f);
}
else
{
foreach (MapEntity e in linkedTo)
{
GUI.DrawLine(spriteBatch,
drawPos,
new Vector2(e.DrawPosition.X, -e.DrawPosition.Y),
(IsTraversable ? GUIStyle.Green : Color.Gray) * 0.7f, width: 5, depth: 0.002f);
}
}
if (ConnectedGap != null)
{
GUI.DrawLine(spriteBatch,
drawPos,
new Vector2(ConnectedGap.DrawPosition.X, -ConnectedGap.DrawPosition.Y),
GUIStyle.Green * 0.5f, width: 1);
Color.White, width: 1);
}
if (Ladders != null)
{
GUI.DrawLine(spriteBatch,
drawPos,
new Vector2(Ladders.Item.DrawPosition.X, -Ladders.Item.DrawPosition.Y),
GUIStyle.Green * 0.5f, width: 1);
Color.White, width: 1);
}
var color = Color.WhiteSmoke;
@@ -419,6 +437,7 @@ namespace Barotrauma
jobDropDown.AddItem(TextManager.Get("Any"), null);
foreach (JobPrefab jobPrefab in JobPrefab.Prefabs)
{
if (jobPrefab.HiddenJob) { continue; }
jobDropDown.AddItem(jobPrefab.Name, jobPrefab);
}
jobDropDown.SelectItem(AssignedJob);
@@ -432,7 +451,7 @@ namespace Barotrauma
};
propertyBox.OnTextChanged += (textBox, text) =>
{
tags = text.Split(',').ToIdentifiers().ToHashSet();
tags = text.ToIdentifiers().ToHashSet();
return true;
};
propertyBox.OnEnterPressed += (textBox, text) =>