(6e187d247) Fixed contained items' status effects being added twice to the list of an ItemContainer's active status effects when swapping items. For example, when swapping a fuel rod with another one, the status effect that increases AvailableFuel would be applied twice, causing the reactor to act as if there were 2 rods in it. Closes #1643 + merge fix
This commit is contained in:
@@ -2109,10 +2109,7 @@ namespace Barotrauma
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
if (MapEntity.SelectedList.Count == 1)
|
||||
{
|
||||
MapEntity.SelectedList[0].AddToGUIUpdateList();
|
||||
}
|
||||
MapEntity.FilteredSelectedList.FirstOrDefault()?.AddToGUIUpdateList();
|
||||
if (MapEntity.HighlightedListBox != null)
|
||||
{
|
||||
MapEntity.HighlightedListBox.AddToGUIUpdateList();
|
||||
@@ -2293,9 +2290,9 @@ namespace Barotrauma
|
||||
dummyCharacter.SelectedConstruction = null;
|
||||
}*/
|
||||
}
|
||||
else if (MapEntity.SelectedList.Count == 1)
|
||||
else if (MapEntity.FilteredSelectedList.Count == 1)
|
||||
{
|
||||
(MapEntity.SelectedList[0] as Item)?.UpdateHUD(cam, dummyCharacter, (float)deltaTime);
|
||||
(MapEntity.FilteredSelectedList[0] as Item)?.UpdateHUD(cam, dummyCharacter, (float)deltaTime);
|
||||
}
|
||||
|
||||
CharacterHUD.Update((float)deltaTime, dummyCharacter, cam);
|
||||
|
||||
Reference in New Issue
Block a user