Build 0.18.4.0
This commit is contained in:
@@ -98,7 +98,7 @@ namespace Barotrauma
|
||||
OnClicked = (btn, userData) =>
|
||||
{
|
||||
Rand.SetSyncedSeed(ToolBox.StringToInt(this.Seed));
|
||||
Generate();
|
||||
Generate(GameMain.GameSession.GameMode is CampaignMode campaign ? campaign.Settings : CampaignSettings.Empty);
|
||||
InitProjectSpecific();
|
||||
return true;
|
||||
}
|
||||
@@ -642,11 +642,11 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (GameMain.DebugDraw && location == HighlightedLocation && (!location.Discovered || !location.HasOutpost()))
|
||||
if (GameMain.DebugDraw)
|
||||
{
|
||||
if (location.Reputation != null)
|
||||
Vector2 dPos = pos;
|
||||
if (location == HighlightedLocation && (!location.Discovered || !location.HasOutpost()) && location.Reputation != null)
|
||||
{
|
||||
Vector2 dPos = pos;
|
||||
dPos.Y += 48;
|
||||
string name = $"Reputation: {location.Name}";
|
||||
Vector2 nameSize = GUIStyle.SmallFont.MeasureString(name);
|
||||
@@ -663,6 +663,8 @@ namespace Barotrauma
|
||||
GUI.DrawString(spriteBatch, dPos + (new Vector2(256, 32) / 2) - (repValueSize / 2), reputationValue, Color.White, Color.Black, font: GUIStyle.SubHeadingFont);
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle((int)dPos.X, (int)dPos.Y, 256, 32), Color.White);
|
||||
}
|
||||
dPos.Y += 48;
|
||||
GUI.DrawString(spriteBatch, dPos, $"Difficulty: {location.LevelData.Difficulty.FormatZeroDecimal()}", Color.White, Color.Black * 0.8f, 4, font: GUIStyle.SmallFont);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,13 +154,13 @@ namespace Barotrauma
|
||||
crewSizeText.RectTransform.MinSize = new Point(0, crewSizeText.Children.First().Rect.Height);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(RecommendedCrewExperience))
|
||||
if (RecommendedCrewExperience != CrewExperienceLevel.Unknown)
|
||||
{
|
||||
var crewExperienceText = new GUITextBlock(new RectTransform(new Vector2(leftPanelWidth, 0), parent.Content.RectTransform),
|
||||
TextManager.Get("RecommendedCrewExperience"), textAlignment: Alignment.TopLeft, font: font, wrap: true)
|
||||
{ CanBeFocused = false };
|
||||
new GUITextBlock(new RectTransform(new Vector2(rightPanelWidth, 0.0f), crewExperienceText.RectTransform, Anchor.TopRight, Pivot.TopLeft),
|
||||
TextManager.Get(RecommendedCrewExperience), textAlignment: Alignment.TopLeft, font: font, wrap: true)
|
||||
TextManager.Get(RecommendedCrewExperience.ToIdentifier()), textAlignment: Alignment.TopLeft, font: font, wrap: true)
|
||||
{ CanBeFocused = false };
|
||||
crewExperienceText.RectTransform.MinSize = new Point(0, crewExperienceText.Children.First().Rect.Height);
|
||||
}
|
||||
|
||||
@@ -100,12 +100,16 @@ namespace Barotrauma
|
||||
GUIListBox specsContainer = null;
|
||||
|
||||
new GUICustomComponent(new RectTransform(Vector2.One, innerPadded.RectTransform, Anchor.Center),
|
||||
(spriteBatch, component) => {
|
||||
(spriteBatch, component) =>
|
||||
{
|
||||
if (isDisposed) { return; }
|
||||
camera.UpdateTransform(interpolate: true, updateListener: false);
|
||||
Rectangle drawRect = new Rectangle(component.Rect.X + 1, component.Rect.Y + 1, component.Rect.Width - 2, component.Rect.Height - 2);
|
||||
RenderSubmarine(spriteBatch, drawRect, component);
|
||||
},
|
||||
(deltaTime, component) => {
|
||||
(deltaTime, component) =>
|
||||
{
|
||||
if (isDisposed) { return; }
|
||||
bool isMouseOnComponent = GUI.MouseOn == component;
|
||||
camera.MoveCamera(deltaTime, allowZoom: isMouseOnComponent, followSub: false);
|
||||
if (isMouseOnComponent &&
|
||||
@@ -294,8 +298,8 @@ namespace Barotrauma
|
||||
|
||||
private void BakeMapEntity(XElement element)
|
||||
{
|
||||
string identifier = element.GetAttributeString("identifier", "");
|
||||
if (string.IsNullOrEmpty(identifier)) { return; }
|
||||
Identifier identifier = element.GetAttributeIdentifier("identifier", Identifier.Empty);
|
||||
if (identifier.IsEmpty) { return; }
|
||||
Rectangle rect = element.GetAttributeRect("rect", Rectangle.Empty);
|
||||
if (rect.Equals(Rectangle.Empty)) { return; }
|
||||
|
||||
@@ -308,7 +312,16 @@ namespace Barotrauma
|
||||
|
||||
float rotation = element.GetAttributeFloat("rotation", 0f);
|
||||
|
||||
MapEntityPrefab prefab = MapEntityPrefab.List.FirstOrDefault(p => p.Identifier == identifier);
|
||||
MapEntityPrefab prefab = null;
|
||||
if (element.Name.ToString().Equals("item", StringComparison.OrdinalIgnoreCase) &&
|
||||
ItemPrefab.Prefabs.TryGet(identifier, out ItemPrefab ip))
|
||||
{
|
||||
prefab = ip;
|
||||
}
|
||||
else
|
||||
{
|
||||
prefab = MapEntityPrefab.List.FirstOrDefault(p => p.Identifier == identifier);
|
||||
}
|
||||
if (prefab == null) { return; }
|
||||
|
||||
var texture = prefab.Sprite.Texture;
|
||||
@@ -329,7 +342,6 @@ namespace Barotrauma
|
||||
|
||||
bool overrideSprite = false;
|
||||
ItemPrefab itemPrefab = prefab as ItemPrefab;
|
||||
StructurePrefab structurePrefab = prefab as StructurePrefab;
|
||||
if (itemPrefab != null)
|
||||
{
|
||||
BakeItemComponents(itemPrefab, rect, color, scale, rotation, depth, out overrideSprite);
|
||||
@@ -337,7 +349,7 @@ namespace Barotrauma
|
||||
|
||||
if (!overrideSprite)
|
||||
{
|
||||
if (structurePrefab != null)
|
||||
if (prefab is StructurePrefab structurePrefab)
|
||||
{
|
||||
ParseUpgrades(structurePrefab.ConfigElement, ref scale);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user