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:
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user