Unstable v0.1100.0.4 (November 11th 2020)

This commit is contained in:
Joonas Rikkonen
2020-11-06 20:12:15 +02:00
parent 6b36bf809d
commit b772654326
297 changed files with 12502 additions and 4277 deletions
@@ -439,7 +439,7 @@ namespace Barotrauma
protected virtual void ControlInput(Camera cam)
{
// Note that these targets are static. Therefore the outcome is the same if this method is called multiple times or only once.
if (selectedSlot != null && !DraggingItemToWorld)
if (selectedSlot != null && !DraggingItemToWorld && cam.GetZoomAmountFromPrevious() <= 0.25f)
{
cam.Freeze = true;
}
@@ -461,7 +461,7 @@ namespace Barotrauma
}*/
bool mouseOn = interactRect.Contains(PlayerInput.MousePosition) && !Locked && !mouseOnGUI && !slot.Disabled;
// Delete item from container in sub editor
if (SubEditorScreen.IsSubEditor() && PlayerInput.IsCtrlDown())
{
@@ -477,8 +477,12 @@ namespace Barotrauma
SoundPlayer.PlayUISound(GUISoundType.PickItem);
}
SubEditorScreen.BulkItemBufferInUse = true;
SubEditorScreen.BulkItemBuffer.Add(new AddOrDeleteCommand(new List<MapEntity> { item }, true));
if (!item.Removed)
{
SubEditorScreen.BulkItemBufferInUse = SubEditorScreen.ItemRemoveMutex;
SubEditorScreen.BulkItemBuffer.Add(new AddOrDeleteCommand(new List<MapEntity> { item }, true));
}
item.OwnInventory?.DeleteAllItems();
item.Remove();
}
@@ -688,6 +692,18 @@ namespace Barotrauma
subInventory.Update(deltaTime, cam, true);
}
public void ClearSubInventories()
{
if (highlightedSubInventorySlots.Count == 0) return;
foreach (SlotReference highlightedSubInventorySlot in highlightedSubInventorySlots)
{
highlightedSubInventorySlot.Inventory.HideTimer = 0.0f;
}
highlightedSubInventorySlots.Clear();
}
public virtual void Draw(SpriteBatch spriteBatch, bool subInventory = false)
{
if (slots == null || isSubInventory != subInventory) return;