v1.6.19.1 (Unto the Breach Hotfix 1)
This commit is contained in:
@@ -918,5 +918,12 @@ namespace Barotrauma
|
||||
DebugConsole.ThrowError($"GUITextBox: Invalid selection: ({exception})");
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetDelegates()
|
||||
{
|
||||
OnKeyHit = null;
|
||||
OnEnterPressed = null;
|
||||
OnTextChanged = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1031,7 +1031,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (selectedItem == null) { return false; }
|
||||
if (fabricatedItem == null &&
|
||||
!outputContainer.Inventory.CanBePut(selectedItem.TargetItem, selectedItem.OutCondition * selectedItem.TargetItem.Health))
|
||||
!outputContainer.Inventory.CanProbablyBePut(selectedItem.TargetItem, selectedItem.OutCondition * selectedItem.TargetItem.Health))
|
||||
{
|
||||
outputSlot.Flash(GUIStyle.Red);
|
||||
return false;
|
||||
|
||||
@@ -2726,7 +2726,7 @@ namespace Barotrauma
|
||||
UpdateJobPreferences(GameMain.Client?.CharacterInfo ?? Character.Controlled?.Info);
|
||||
JobSelectionFrame = null;
|
||||
RefreshChatrow(); // to enable/disable team chat according to current selection
|
||||
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -4772,19 +4772,29 @@ namespace Barotrauma
|
||||
{
|
||||
TeamChatSelected = false;
|
||||
}
|
||||
|
||||
chatInput = new GUITextBox(new RectTransform(new Vector2(0.75f, 1.0f), chatRow.RectTransform, Anchor.CenterRight))
|
||||
{
|
||||
MaxTextLength = ChatMessage.MaxLength,
|
||||
Font = GUIStyle.SmallFont,
|
||||
DeselectAfterMessage = false
|
||||
};
|
||||
|
||||
micIcon = new GUIImage(new RectTransform(new Vector2(0.05f, 1.0f), chatRow.RectTransform), style: "GUIMicrophoneUnavailable");
|
||||
|
||||
chatInput.Select();
|
||||
if (chatInput != null)
|
||||
{
|
||||
chatInput.RectTransform.Parent = chatRow.RectTransform;
|
||||
}
|
||||
else
|
||||
{
|
||||
chatInput = new GUITextBox(new RectTransform(new Vector2(0.75f, 1.0f), chatRow.RectTransform, Anchor.CenterRight))
|
||||
{
|
||||
MaxTextLength = ChatMessage.MaxLength,
|
||||
Font = GUIStyle.SmallFont,
|
||||
DeselectAfterMessage = false
|
||||
};
|
||||
|
||||
micIcon = new GUIImage(new RectTransform(new Vector2(0.05f, 1.0f), chatRow.RectTransform), style: "GUIMicrophoneUnavailable");
|
||||
chatInput.Select();
|
||||
}
|
||||
|
||||
//this needs to be done even if we're using the existing chatinput instance instead of creating a new one,
|
||||
//because the client might not have existed when the input box was first created
|
||||
if (GameMain.Client != null)
|
||||
{
|
||||
chatInput.ResetDelegates();
|
||||
chatInput.OnEnterPressed = GameMain.Client.EnterChatMessage;
|
||||
chatInput.OnTextChanged += GameMain.Client.TypingChatMessage;
|
||||
chatInput.OnDeselected += (sender, key) =>
|
||||
|
||||
@@ -5937,7 +5937,7 @@ namespace Barotrauma
|
||||
newItem.Remove();
|
||||
}
|
||||
}
|
||||
else if (itemContainer != null && itemContainer.Inventory.CanBePut(itemPrefab))
|
||||
else if (itemContainer != null && itemContainer.Inventory.CanProbablyBePut(itemPrefab))
|
||||
{
|
||||
bool placedItem = itemContainer.Inventory.TryPutItem(newItem, dummyCharacter);
|
||||
spawnedItem |= placedItem;
|
||||
|
||||
Reference in New Issue
Block a user