mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* Allow component trees to be disabled * forgot * I'm pretty sure this wasn't working as intended * also outdated * reduce branches in QueueTreeUpdate * remove update hashset * try fix * Use Entity<T> and add ray overloads * Move InRangeUnoccluded to engine * reduce code duplication * move _initialized check * release notes
33 lines
984 B
C#
33 lines
984 B
C#
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Physics;
|
|
|
|
namespace Robust.Shared.ComponentTrees;
|
|
|
|
public interface IComponentTreeComponent<TComp> where TComp : Component, IComponentTreeEntry<TComp>
|
|
{
|
|
public DynamicTree<ComponentTreeEntry<TComp>> Tree { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Interface that must be implemented by components that can be stored on component trees.
|
|
/// </summary>
|
|
public interface IComponentTreeEntry<TComp> where TComp : Component
|
|
{
|
|
/// <summary>
|
|
/// The tree that the component is currently stored on.
|
|
/// </summary>
|
|
public EntityUid? TreeUid { get; set; }
|
|
|
|
/// <summary>
|
|
/// The tree that the component is currently stored on.
|
|
/// </summary>
|
|
public DynamicTree<ComponentTreeEntry<TComp>>? Tree { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether the component should currently be added to a tree.
|
|
/// </summary>
|
|
public bool AddToTree { get; }
|
|
|
|
public bool TreeUpdateQueued { get; set; }
|
|
}
|