Add AddLinked to MapEntity

MapEntity.linkedTo is readonly and arrives as a table on lua side, making it impossible to add new Links.

Introducing AddLinked as an Addition makes it possible to link things.
This commit is contained in:
Roland Firmont
2022-03-21 16:24:42 +01:00
committed by GitHub
parent a3263ce3eb
commit caac190a05

View File

@@ -90,6 +90,14 @@ namespace Barotrauma
}
}
abstract partial class MapEntity
{
public void AddLinked(MapEntity entity)
{
linkedTo.Add(entity);
}
}
}
namespace Barotrauma.Items.Components
@@ -103,4 +111,4 @@ namespace Barotrauma.Items.Components
partial struct Signal
{
}
}
}