Faction Test 100.11.0.0

This commit is contained in:
Markus Isberg
2022-12-09 20:08:17 +02:00
parent e0c3754621
commit 1650735468
24 changed files with 210 additions and 457 deletions
@@ -1023,12 +1023,15 @@ namespace Barotrauma
}
if (ic.statusEffectLists == null) { continue; }
if (statusEffectLists == null)
if (ic.InheritStatusEffects)
{
statusEffectLists = new Dictionary<ActionType, List<StatusEffect>>();
// Inherited status effects are added when the ItemComponent is initialized at ItemComponent.cs:332.
// Don't create duplicate effects here.
continue;
}
statusEffectLists ??= new Dictionary<ActionType, List<StatusEffect>>();
//go through all the status effects of the component
//and add them to the corresponding statuseffect list
foreach (List<StatusEffect> componentEffectList in ic.statusEffectLists.Values)