Content ecs containers (#22484)
This commit is contained in:
@@ -263,7 +263,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
}
|
||||
|
||||
_joints.RecursiveClearJoints(toInsert);
|
||||
if (!component.Contents.Insert(toInsert, EntityManager))
|
||||
if (!_container.Insert(toInsert, component.Contents))
|
||||
return false;
|
||||
|
||||
var inside = EnsureComp<InsideEntityStorageComponent>(toInsert);
|
||||
@@ -280,7 +280,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
return false;
|
||||
|
||||
RemComp<InsideEntityStorageComponent>(toRemove);
|
||||
component.Contents.Remove(toRemove, EntityManager);
|
||||
_container.Remove(toRemove, component.Contents);
|
||||
var pos = TransformSystem.GetWorldPosition(xform) + TransformSystem.GetWorldRotation(xform).RotateVec(component.EnteringOffset);
|
||||
TransformSystem.SetWorldPosition(toRemove, pos);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user