Unstable 0.16.5.0
This commit is contained in:
@@ -406,6 +406,7 @@ namespace Barotrauma
|
||||
if (npc.CampaignInteractionType == CampaignMode.InteractionType.None || npc.Submarine != character.Submarine || npc.IsDead || npc.IsIncapacitated) { continue; }
|
||||
|
||||
var iconStyle = GUI.Style.GetComponentStyle("CampaignInteractionIcon." + npc.CampaignInteractionType);
|
||||
if (iconStyle == null) { continue; }
|
||||
Range<float> visibleRange = new Range<float>(npc.CurrentHull == Character.Controlled.CurrentHull ? 500.0f : 100.0f, float.PositiveInfinity);
|
||||
if (npc.CampaignInteractionType == CampaignMode.InteractionType.Examine)
|
||||
{
|
||||
|
||||
@@ -956,7 +956,7 @@ namespace Barotrauma
|
||||
|
||||
public void DrawHUD(SpriteBatch spriteBatch)
|
||||
{
|
||||
if (GUI.DisableHUD) { return; }
|
||||
if (GUI.DisableHUD || Character.Removed) { return; }
|
||||
if (GameMain.GraphicsWidth != screenResolution.X ||
|
||||
GameMain.GraphicsHeight != screenResolution.Y ||
|
||||
Math.Abs(inventoryScale - Inventory.UIScale) > 0.01f ||
|
||||
@@ -997,14 +997,16 @@ namespace Barotrauma
|
||||
{
|
||||
healthBar.RectTransform.ScreenSpaceOffset = healthBarShadow.RectTransform.ScreenSpaceOffset = Point.Zero;
|
||||
}
|
||||
|
||||
// If manning a turret the portrait doesn't get rendered so we push the health bar to remove the empty gap
|
||||
healthBarHolder.RectTransform.ScreenSpaceOffset = Character.ShouldLockHud() ? new Point(0, HUDLayoutSettings.PortraitArea.Height) : Point.Zero;
|
||||
|
||||
if (healthBarHolder != null)
|
||||
{
|
||||
// If manning a turret the portrait doesn't get rendered so we push the health bar to remove the empty gap
|
||||
healthBarHolder.RectTransform.ScreenSpaceOffset = Character.ShouldLockHud() ? new Point(0, HUDLayoutSettings.PortraitArea.Height) : Point.Zero;
|
||||
}
|
||||
|
||||
DrawStatusHUD(spriteBatch);
|
||||
}
|
||||
|
||||
|
||||
private (Affliction affliction, string text)? highlightedAfflictionIcon;
|
||||
public void DrawStatusHUD(SpriteBatch spriteBatch)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsAtCompletionState => State > 0 && requireRescue.None();
|
||||
public override bool IsAtFailureState => State == HostagesKilledState;
|
||||
public override bool DisplayAsCompleted => State > 0 && requireRescue.None();
|
||||
public override bool DisplayAsFailed => State == HostagesKilledState;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace Barotrauma
|
||||
{
|
||||
partial class AlienRuinMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => State > 0;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => State > 0;
|
||||
public override bool DisplayAsFailed => false;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
partial class BeaconMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => false;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => State > 0;
|
||||
public override bool DisplayAsFailed => false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ namespace Barotrauma
|
||||
{
|
||||
partial class CargoMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => false;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => false;
|
||||
public override bool DisplayAsFailed => false;
|
||||
|
||||
public override string GetMissionRewardText(Submarine sub)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsAtCompletionState => false;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => false;
|
||||
public override bool DisplayAsFailed => false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace Barotrauma
|
||||
{
|
||||
partial class EscortMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => false;
|
||||
public override bool IsAtFailureState => State == 1;
|
||||
public override bool DisplayAsCompleted => false;
|
||||
public override bool DisplayAsFailed => State == 1;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
partial class GoToMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => false;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => false;
|
||||
public override bool DisplayAsFailed => false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ namespace Barotrauma
|
||||
{
|
||||
partial class MineralMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => false;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => false;
|
||||
public override bool DisplayAsFailed => false;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -20,13 +20,13 @@ namespace Barotrauma
|
||||
public virtual IEnumerable<Entity> HudIconTargets => Enumerable.Empty<Entity>();
|
||||
|
||||
/// <summary>
|
||||
/// State at which the only thing left to do is to reach the end of the level. Use for UI references.
|
||||
/// Is the mission at a state at which the only thing left to do is to reach the end of the level?
|
||||
/// </summary>
|
||||
public abstract bool IsAtCompletionState { get; }
|
||||
public abstract bool DisplayAsCompleted { get; }
|
||||
/// <summary>
|
||||
/// State at which the mission cannot be completed anymore. Use for UI references.
|
||||
/// Is the mission at a state at which the mission cannot be completed anymore?
|
||||
/// </summary>
|
||||
public abstract bool IsAtFailureState { get; }
|
||||
public abstract bool DisplayAsFailed { get; }
|
||||
|
||||
public Color GetDifficultyColor()
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace Barotrauma
|
||||
{
|
||||
partial class MonsterMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => State > 0;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => State > 0;
|
||||
public override bool DisplayAsFailed => false;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@ namespace Barotrauma
|
||||
{
|
||||
partial class NestMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => State > 0 && !requireDelivery;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => State > 0 && !requireDelivery;
|
||||
public override bool DisplayAsFailed => false;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace Barotrauma
|
||||
{
|
||||
partial class PirateMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => State > 1;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => State > 1;
|
||||
public override bool DisplayAsFailed => false;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@ namespace Barotrauma
|
||||
{
|
||||
partial class SalvageMission : Mission
|
||||
{
|
||||
public override bool IsAtCompletionState => false;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => false;
|
||||
public override bool DisplayAsFailed => false;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsAtCompletionState => false;
|
||||
public override bool IsAtFailureState => false;
|
||||
public override bool DisplayAsCompleted => false;
|
||||
public override bool DisplayAsFailed => false;
|
||||
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
|
||||
@@ -629,7 +629,10 @@ namespace Barotrauma
|
||||
CharacterInfo? healInfo = crewMember.FindCharacterInfo(MedicalClinic.GetCrewCharacters());
|
||||
if (healInfo is null) { return; }
|
||||
|
||||
GUIFrame pendingHealBackground = new GUIFrame(new RectTransform(new Vector2(1f, 0.25f), parent.RectTransform));
|
||||
GUIFrame pendingHealBackground = new GUIFrame(new RectTransform(new Vector2(1f, 0.25f), parent.RectTransform), style: "ListBoxElement")
|
||||
{
|
||||
CanBeFocused = false
|
||||
};
|
||||
GUILayoutGroup pendingHealLayout = new GUILayoutGroup(new RectTransform(new Vector2(0.95f), pendingHealBackground.RectTransform, Anchor.Center));
|
||||
|
||||
GUILayoutGroup topHeaderLayout = new GUILayoutGroup(new RectTransform(new Vector2(1f, 0.3f), pendingHealLayout.RectTransform), isHorizontal: true, Anchor.CenterLeft) { Stretch = true };
|
||||
@@ -658,7 +661,10 @@ namespace Barotrauma
|
||||
|
||||
private void CreatePendingAffliction(GUIListBox parent, MedicalClinic.NetCrewMember crewMember, MedicalClinic.NetAffliction affliction, PendingHealElement healElement)
|
||||
{
|
||||
GUIFrame backgroundFrame = new GUIFrame(new RectTransform(new Vector2(1f, 0.33f), parent.Content.RectTransform), style: "ListBoxElement");
|
||||
GUIFrame backgroundFrame = new GUIFrame(new RectTransform(new Vector2(1f, 0.33f), parent.Content.RectTransform), style: "ListBoxElement")
|
||||
{
|
||||
CanBeFocused = false
|
||||
};
|
||||
GUILayoutGroup parentLayout = new GUILayoutGroup(new RectTransform(Vector2.One, backgroundFrame.RectTransform), isHorizontal: true) { Stretch = true };
|
||||
|
||||
if (!(affliction.Prefab is { } prefab)) { return; }
|
||||
@@ -760,7 +766,7 @@ namespace Barotrauma
|
||||
mainFrame.RectTransform.ScreenSpaceOffset = new Point((int)location.X, GameMain.GraphicsHeight - mainFrame.Rect.Height);
|
||||
}
|
||||
|
||||
GUITextBlock feedbackBlock = new GUITextBlock(new RectTransform(Vector2.One, mainFrame.RectTransform), TextManager.Get("pleasewaitupnp"), textAlignment: Alignment.Center, font: GUI.LargeFont)
|
||||
GUITextBlock feedbackBlock = new GUITextBlock(new RectTransform(Vector2.One, mainFrame.RectTransform), TextManager.Get("pleasewaitupnp"), textAlignment: Alignment.Center, font: GUI.LargeFont, wrap: true)
|
||||
{
|
||||
Visible = true
|
||||
};
|
||||
|
||||
@@ -1069,11 +1069,11 @@ namespace Barotrauma
|
||||
{
|
||||
if (mission == null || missionIcon == null) { return; }
|
||||
string style = string.Empty;
|
||||
if (mission.IsAtFailureState)
|
||||
if (mission.DisplayAsFailed)
|
||||
{
|
||||
style = "MissionFailedIcon";
|
||||
}
|
||||
else if (mission.IsAtCompletionState)
|
||||
else if (mission.DisplayAsCompleted)
|
||||
{
|
||||
style = "MissionCompletedIcon";
|
||||
}
|
||||
|
||||
@@ -1218,11 +1218,7 @@ namespace Barotrauma
|
||||
|
||||
new GUIButton(new RectTransform(new Vector2(1.0f, 1.0f), linkHolder.RectTransform), TextManager.Get("bugreportgithubform"), style: "MainMenuGUIButton", textAlignment: Alignment.Left)
|
||||
{
|
||||
#if UNSTABLE
|
||||
UserData = "https://barotraumagame.com/unstable-3rf3w5t4ter/",
|
||||
#else
|
||||
UserData = "https://github.com/Regalis11/Barotrauma/issues/new?template=bug_report.md",
|
||||
#endif
|
||||
OnClicked = (btn, userdata) =>
|
||||
{
|
||||
ShowOpenUrlInWebBrowserPrompt(userdata as string);
|
||||
|
||||
@@ -153,12 +153,6 @@ namespace Barotrauma
|
||||
return container.Inventory;
|
||||
}
|
||||
|
||||
protected override void PutItem(Item item, int i, Character user, bool removeItem = true, bool createNetworkEvent = true)
|
||||
{
|
||||
base.PutItem(item, i, user, removeItem, createNetworkEvent);
|
||||
CreateSlots();
|
||||
}
|
||||
|
||||
public override void CreateSlots()
|
||||
{
|
||||
visualSlots ??= new VisualSlot[capacity];
|
||||
|
||||
@@ -3557,6 +3557,11 @@ namespace Barotrauma.Networking
|
||||
case ClientNetError.MISSING_ENTITY:
|
||||
outMsg.Write(eventID);
|
||||
outMsg.Write(entityID);
|
||||
outMsg.Write((byte)Submarine.Loaded.Count);
|
||||
foreach (Submarine sub in Submarine.Loaded)
|
||||
{
|
||||
outMsg.Write(sub.Info.Name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
clientPeer.Send(outMsg, DeliveryMethod.Reliable);
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
using Barotrauma.Extensions;
|
||||
using Barotrauma.Networking;
|
||||
using Barotrauma.Steam;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Barotrauma.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using Barotrauma.Steam;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
partial class NetLobbyScreen : Screen
|
||||
{
|
||||
//private readonly List<Sprite> jobPreferenceSprites = new List<Sprite>();
|
||||
|
||||
private readonly GUIFrame infoFrame, modeFrame;
|
||||
private readonly GUILayoutGroup infoFrameContent;
|
||||
private readonly GUIFrame myCharacterFrame;
|
||||
@@ -1346,9 +1342,9 @@ namespace Barotrauma
|
||||
StartButton.Visible = GameMain.Client.HasPermission(ClientPermissions.ManageRound) && !GameMain.Client.GameStarted && !CampaignSetupFrame.Visible && !CampaignFrame.Visible;
|
||||
ServerName.Readonly = !GameMain.Client.HasPermission(ClientPermissions.ManageSettings);
|
||||
ServerMessage.Readonly = !GameMain.Client.HasPermission(ClientPermissions.ManageSettings);
|
||||
shuttleTickBox.Enabled = GameMain.Client.HasPermission(ClientPermissions.ManageSettings);
|
||||
shuttleTickBox.Enabled = GameMain.Client.HasPermission(ClientPermissions.ManageSettings) && !GameMain.Client.GameStarted;
|
||||
SubList.Enabled = !CampaignFrame.Visible && (GameMain.Client.ServerSettings.Voting.AllowSubVoting || GameMain.Client.HasPermission(ClientPermissions.SelectSub));
|
||||
ShuttleList.Enabled = ShuttleList.ButtonEnabled = GameMain.Client.HasPermission(ClientPermissions.SelectSub);
|
||||
ShuttleList.Enabled = ShuttleList.ButtonEnabled = GameMain.Client.HasPermission(ClientPermissions.SelectSub) && !GameMain.Client.GameStarted;
|
||||
ModeList.Enabled = GameMain.Client.ServerSettings.Voting.AllowModeVoting || GameMain.Client.HasPermission(ClientPermissions.SelectMode);
|
||||
LogButtons.Visible = GameMain.Client.HasPermission(ClientPermissions.ServerLog);
|
||||
GameMain.Client.ShowLogButton.Visible = GameMain.Client.HasPermission(ClientPermissions.ServerLog);
|
||||
|
||||
Reference in New Issue
Block a user