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
@@ -252,7 +252,9 @@ namespace Barotrauma.Items.Components
/// Can be used by status effects or conditionals to the speed of the item
/// </summary>
public float Speed => item.Speed;
public readonly bool InheritStatusEffects;
public ItemComponent(Item item, ContentXElement element)
{
this.item = item;
@@ -313,6 +315,7 @@ namespace Barotrauma.Items.Components
string inheritStatusEffectsFrom = element.GetAttributeString("inheritstatuseffectsfrom", "");
if (!string.IsNullOrEmpty(inheritStatusEffectsFrom))
{
InheritStatusEffects = true;
var component = item.Components.Find(ic => ic.Name.Equals(inheritStatusEffectsFrom, StringComparison.OrdinalIgnoreCase));
if (component == null)
{