(df244251c) Fixed: Electric devices that are underwater and are broken by flooding being repairable forever, due to condition never staying at full condition for long enough for the repairing to stop
This commit is contained in:
@@ -478,45 +478,6 @@ namespace Barotrauma
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
public static void AddSelection(MapEntity entity)
|
||||
{
|
||||
if (selectedList.Contains(entity)) { return; }
|
||||
selectedList.Add(entity);
|
||||
if (entity is Item i)
|
||||
{
|
||||
var door = i.GetComponent<Door>();
|
||||
if (door != null)
|
||||
{
|
||||
var gap = door.LinkedGap;
|
||||
if (gap != null)
|
||||
{
|
||||
door.RefreshLinkedGap();
|
||||
if (!selectedList.Contains(gap))
|
||||
{
|
||||
selectedList.Add(gap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveSelection(MapEntity entity)
|
||||
{
|
||||
selectedList.Remove(entity);
|
||||
if (entity is Item i)
|
||||
{
|
||||
var door = i.GetComponent<Door>();
|
||||
if (door != null)
|
||||
{
|
||||
var gap = door.LinkedGap;
|
||||
if (gap != null)
|
||||
{
|
||||
selectedList.Remove(gap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static partial void UpdateAllProjSpecific(float deltaTime)
|
||||
{
|
||||
@@ -585,7 +546,6 @@ namespace Barotrauma
|
||||
|
||||
public static void UpdateEditor(Camera cam)
|
||||
{
|
||||
FilteredSelectedList.Clear();
|
||||
if (highlightedListBox != null) highlightedListBox.UpdateManually((float)Timing.Step);
|
||||
|
||||
if (editingHUD != null)
|
||||
@@ -603,16 +563,11 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
if (selectedList.Count == 0) return;
|
||||
foreach (var e in selectedList)
|
||||
|
||||
if (editingHUD != null)
|
||||
{
|
||||
if (e is Gap) { continue; }
|
||||
FilteredSelectedList.Add(e);
|
||||
}
|
||||
var first = FilteredSelectedList.FirstOrDefault();
|
||||
if (first != null)
|
||||
{
|
||||
first.UpdateEditing(cam);
|
||||
if (first.ResizeHorizontal || first.ResizeVertical)
|
||||
selectedList[0].UpdateEditing(cam);
|
||||
if (selectedList[0].ResizeHorizontal || selectedList[0].ResizeVertical)
|
||||
{
|
||||
first.UpdateResizing(cam);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user