(fdc49c8c) Unstable 0.9.7.1
This commit is contained in:
@@ -210,13 +210,17 @@ namespace Barotrauma
|
||||
|
||||
#region Reports
|
||||
var chatBox = ChatBox ?? GameMain.Client?.ChatBox;
|
||||
chatBox.ToggleButton = new GUIButton(new RectTransform(new Point((int)(182f * GUI.Scale * 0.4f), (int)(99f * GUI.Scale * 0.4f)), guiFrame.RectTransform), style: "ChatToggleButton");
|
||||
chatBox.ToggleButton.RectTransform.AbsoluteOffset = new Point(0, HUDLayoutSettings.ChatBoxArea.Height - chatBox.ToggleButton.Rect.Height);
|
||||
chatBox.ToggleButton.OnClicked += (GUIButton btn, object userdata) =>
|
||||
if (chatBox != null)
|
||||
{
|
||||
chatBox.ToggleOpen = !chatBox.ToggleOpen;
|
||||
return true;
|
||||
};
|
||||
chatBox.ToggleButton = new GUIButton(new RectTransform(new Point((int)(182f * GUI.Scale * 0.4f), (int)(99f * GUI.Scale * 0.4f)), guiFrame.RectTransform), style: "ChatToggleButton");
|
||||
chatBox.ToggleButton.RectTransform.AbsoluteOffset = new Point(0, HUDLayoutSettings.ChatBoxArea.Height - chatBox.ToggleButton.Rect.Height);
|
||||
chatBox.ToggleButton.OnClicked += (GUIButton btn, object userdata) =>
|
||||
{
|
||||
chatBox.ToggleOpen = !chatBox.ToggleOpen;
|
||||
chatBox.CloseAfterMessageSent = false;
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
var reports = Order.PrefabList.FindAll(o => o.TargetAllCharacters && o.SymbolSprite != null);
|
||||
if (reports.None())
|
||||
@@ -257,7 +261,7 @@ namespace Barotrauma
|
||||
ToolTip = order.Name
|
||||
};
|
||||
|
||||
new GUIFrame(new RectTransform(new Vector2(1.5f), btn.RectTransform, Anchor.Center), "InnerGlowCircular")
|
||||
new GUIFrame(new RectTransform(new Vector2(1.5f), btn.RectTransform, Anchor.Center), "OuterGlowCircular")
|
||||
{
|
||||
Color = GUI.Style.Red * 0.8f,
|
||||
HoverColor = GUI.Style.Red * 1.0f,
|
||||
@@ -728,18 +732,28 @@ namespace Barotrauma
|
||||
if (characterFrame == null) { return; }
|
||||
|
||||
GUILayoutGroup layoutGroup = (GUILayoutGroup)characterFrame.FindChild(c => c is GUILayoutGroup);
|
||||
layoutGroup.RemoveChild(GetPreviousOrderComponent(layoutGroup));
|
||||
var currentOrderComponent = GetCurrentOrderComponent(layoutGroup);
|
||||
|
||||
if (order != null && currentOrderComponent != null)
|
||||
if (order != null)
|
||||
{
|
||||
var currentOrderInfo = (OrderInfo)currentOrderComponent.UserData;
|
||||
var prevOrderComponent = GetPreviousOrderComponent(layoutGroup);
|
||||
if (currentOrderComponent?.UserData is OrderInfo currentOrderInfo)
|
||||
{
|
||||
if (order.Identifier == currentOrderInfo.Order.Identifier &&
|
||||
option == currentOrderInfo.OrderOption &&
|
||||
order.TargetEntity == currentOrderInfo.Order.TargetEntity) { return; }
|
||||
|
||||
if (order.Identifier == currentOrderInfo.Order.Identifier &&
|
||||
option == currentOrderInfo.OrderOption &&
|
||||
order.TargetEntity == currentOrderInfo.Order.TargetEntity) { return; }
|
||||
|
||||
DisplayPreviousCharacterOrder(character, layoutGroup, currentOrderInfo);
|
||||
layoutGroup.RemoveChild(prevOrderComponent);
|
||||
DisplayPreviousCharacterOrder(character, layoutGroup, currentOrderInfo);
|
||||
}
|
||||
else if (order.Identifier != dismissedOrderPrefab.Identifier &&
|
||||
prevOrderComponent?.UserData is OrderInfo prevOrderInfo &&
|
||||
order.Identifier == prevOrderInfo.Order.Identifier &&
|
||||
option == prevOrderInfo.OrderOption &&
|
||||
order.TargetEntity == prevOrderInfo.Order.TargetEntity)
|
||||
{
|
||||
layoutGroup.RemoveChild(prevOrderComponent);
|
||||
}
|
||||
}
|
||||
|
||||
layoutGroup.RemoveChild(currentOrderComponent);
|
||||
@@ -973,7 +987,7 @@ namespace Barotrauma
|
||||
if (PlayerInput.KeyDown(InputType.Command) && (GUI.KeyboardDispatcher.Subscriber == null || GUI.KeyboardDispatcher.Subscriber == crewList) &&
|
||||
commandFrame == null && !clicklessSelectionActive && CanIssueOrders)
|
||||
{
|
||||
CreateCommandUI(GUI.MouseOn?.UserData as Character);
|
||||
CreateCommandUI(HUDLayoutSettings.PortraitArea.Contains(PlayerInput.MousePosition) ? Character.Controlled : GUI.MouseOn?.UserData as Character);
|
||||
clicklessSelectionActive = isOpeningClick = true;
|
||||
}
|
||||
|
||||
@@ -1152,8 +1166,11 @@ namespace Barotrauma
|
||||
{
|
||||
ChatBox.InputBox.AddToGUIUpdateList();
|
||||
ChatBox.GUIFrame.Flash(Color.DarkGreen, 0.5f);
|
||||
ChatBox.CloseAfterMessageSent = !ChatBox.ToggleOpen;
|
||||
ChatBox.ToggleOpen = true;
|
||||
if (!ChatBox.ToggleOpen)
|
||||
{
|
||||
ChatBox.CloseAfterMessageSent = !ChatBox.ToggleOpen;
|
||||
ChatBox.ToggleOpen = true;
|
||||
}
|
||||
ChatBox.InputBox.Select(ChatBox.InputBox.Text.Length);
|
||||
}
|
||||
|
||||
@@ -1161,8 +1178,11 @@ namespace Barotrauma
|
||||
{
|
||||
ChatBox.InputBox.AddToGUIUpdateList();
|
||||
ChatBox.GUIFrame.Flash(Color.YellowGreen, 0.5f);
|
||||
ChatBox.CloseAfterMessageSent = !ChatBox.ToggleOpen;
|
||||
ChatBox.ToggleOpen = true;
|
||||
if (!ChatBox.ToggleOpen)
|
||||
{
|
||||
ChatBox.CloseAfterMessageSent = !ChatBox.ToggleOpen;
|
||||
ChatBox.ToggleOpen = true;
|
||||
}
|
||||
|
||||
if (!ChatBox.InputBox.Text.StartsWith(ChatBox.RadioChatString))
|
||||
{
|
||||
|
||||
+2
-2
@@ -293,7 +293,7 @@ namespace Barotrauma
|
||||
|
||||
summaryScreen.RemoveChild(summaryScreen.Children.FirstOrDefault(c => c is GUIButton));
|
||||
|
||||
var okButton = new GUIButton(new RectTransform(new Vector2(0.2f, 1.0f), buttonArea.RectTransform),
|
||||
var okButton = new GUIButton(new RectTransform(new Vector2(0.25f, 1.0f), buttonArea.RectTransform),
|
||||
TextManager.Get("LoadGameButton"))
|
||||
{
|
||||
OnClicked = (GUIButton button, object obj) =>
|
||||
@@ -305,7 +305,7 @@ namespace Barotrauma
|
||||
}
|
||||
};
|
||||
|
||||
var quitButton = new GUIButton(new RectTransform(new Vector2(0.2f, 1.0f), buttonArea.RectTransform),
|
||||
var quitButton = new GUIButton(new RectTransform(new Vector2(0.25f, 1.0f), buttonArea.RectTransform),
|
||||
TextManager.Get("QuitButton"));
|
||||
quitButton.OnClicked += GameMain.LobbyScreen.QuitToMainMenu;
|
||||
quitButton.OnClicked += (GUIButton button, object obj) =>
|
||||
|
||||
+4
-1
@@ -368,7 +368,10 @@ namespace Barotrauma.Tutorials
|
||||
{
|
||||
//Disabled pulse until it's replaced by a better effect
|
||||
//CharacterHealth.OpenHealthWindow.CPRButton.Pulsate(Vector2.One, Vector2.One * 1.5f, 1.0f);
|
||||
CharacterHealth.OpenHealthWindow.CPRButton.Flash();
|
||||
if (CharacterHealth.OpenHealthWindow.CPRButton.FlashTimer <= 0.0f)
|
||||
{
|
||||
CharacterHealth.OpenHealthWindow.CPRButton.Flash(highlightColor);
|
||||
}
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
|
||||
+7
@@ -124,6 +124,11 @@ namespace Barotrauma.Tutorials
|
||||
officer_gunIcon = gunOrder.SymbolSprite;
|
||||
officer_gunIconColor = gunOrder.Color;
|
||||
|
||||
var bandage = FindOrGiveItem(officer, "antibleeding1");
|
||||
bandage.Unequip(officer);
|
||||
officer.Inventory.RemoveItem(bandage);
|
||||
FindOrGiveItem(officer, "antibleeding1");
|
||||
|
||||
// Other tutorial items
|
||||
tutorial_mechanicFinalDoorLight = Item.ItemList.Find(i => i.HasTag("tutorial_mechanicfinaldoorlight")).GetComponent<LightComponent>();
|
||||
tutorial_submarineSteering = Item.ItemList.Find(i => i.HasTag("command")).GetComponent<Steering>();
|
||||
@@ -200,6 +205,8 @@ namespace Barotrauma.Tutorials
|
||||
{
|
||||
while (GameMain.Instance.LoadingScreenOpen) yield return null;
|
||||
|
||||
yield return new WaitForSeconds(0.01f);
|
||||
|
||||
// Room 1
|
||||
SoundPlayer.PlayDamageSound("StructureBlunt", 10, Character.Controlled.WorldPosition);
|
||||
while (shakeTimer > 0.0f) // Wake up, shake
|
||||
|
||||
+2
-2
@@ -302,11 +302,11 @@ namespace Barotrauma.Tutorials
|
||||
protected Item FindOrGiveItem(Character character, string identifier)
|
||||
{
|
||||
var item = character.Inventory.FindItemByIdentifier(identifier);
|
||||
if (item != null) { return item; }
|
||||
if (item != null && !item.Removed) { return item; }
|
||||
|
||||
ItemPrefab itemPrefab = MapEntityPrefab.Find(name: null, identifier: identifier) as ItemPrefab;
|
||||
item = new Item(itemPrefab, Vector2.Zero, submarine: null);
|
||||
character.Inventory.TryPutItem(item, character);
|
||||
character.Inventory.TryPutItem(item, character, item.AllowedSlots);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user